* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Bar */
.nav-bar {
    background: #fff;
    border-bottom: 1px solid #e1e4e8;
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-logo:hover {
    color: #0366d6;
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

.nav-button {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-button:hover {
    background: #e9ecef;
    color: #1a1a1a;
}

.nav-button.primary {
    background: #0366d6;
    color: white;
}

.nav-button.primary:hover {
    background: #0256c5;
}

/* Header & Search */
.search-header {
    background: #fff;
    padding: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-box {
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 3px rgba(3,102,214,0.1);
}

.search-btn {
    padding: 15px 40px;
    background: #0366d6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-btn:hover {
    background: #0256c5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3,102,214,0.3);
}

/* Filter Options */
.filter-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 10px 0;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    min-width: 80px;
    padding-top: 2px;
}

.filter-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    user-select: none;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 2px rgba(3,102,214,0.1);
}

.filter-select:hover {
    border-color: #adb5bd;
}

/* Search Info */
.search-info {
    padding: 20px 0;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e1e4e8;
    margin-bottom: 20px;
}

.search-info strong {
    color: #0366d6;
}

/* Error Message */
.error-message {
    background: #fff5f5;
    border-left: 4px solid #fc8181;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #c53030;
}

/* Results */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.result-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.result-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f1f3f5;
    position: relative;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.result-card:hover .result-image img {
    transform: scale(1.05);
}

.result-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 14px;
    background: #f8f9fa;
}

.result-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.result-category {
    background: #e7f5ff;
    color: #0366d6;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.result-date {
    color: #868e96;
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-title a:hover {
    color: #0366d6;
}

.result-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: auto;
}

/* Highlight */
.result-title em,
.result-description em {
    color: #d73a49;
    font-style: normal;
    font-weight: 600;
    background: #fff5f5;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 40px 0;
}

.pagination li {
    display: inline-block;
}

.pagination a {
    display: block;
    padding: 10px 16px;
    background: white;
    color: #0366d6;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination a:hover {
    background: #f6f8fa;
    border-color: #0366d6;
}

.pagination .active a {
    background: #0366d6;
    color: white;
    border-color: #0366d6;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.no-results p {
    color: #666;
    font-size: 16px;
}

/* Hot Query */
.hot-query {
    background: white;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hot-query h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.hot-query-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hot-query-item {
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    font-size: 14px;
}

.hot-query-item:hover {
    background: #e7f5ff;
    color: #0366d6;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-logo {
        font-size: 18px;
    }

    .nav-buttons {
        gap: 8px;
    }

    .nav-button {
        padding: 6px 12px;
        font-size: 13px;
    }

    .search-header {
        padding: 20px 0;
    }

    .search-input {
        font-size: 14px;
        padding: 12px 15px;
    }

    .search-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .filter-container {
        padding: 15px;
    }

    .filter-row {
        gap: 10px;
        margin-bottom: 12px;
    }

    .filter-label {
        min-width: 70px;
        font-size: 13px;
    }

    .filter-options {
        gap: 10px;
    }

    .radio-label,
    .checkbox-label {
        font-size: 13px;
        gap: 4px;
    }

    .radio-label input[type="radio"],
    .checkbox-label input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }

    .filter-select {
        min-width: 120px;
        font-size: 13px;
        padding: 6px 10px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .result-title {
        font-size: 16px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }

    .pagination a {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }

    .nav-logo {
        font-size: 16px;
    }

    .nav-buttons {
        gap: 6px;
    }

    .nav-button {
        padding: 5px 10px;
        font-size: 12px;
        gap: 4px;
    }

    .search-input {
        font-size: 13px;
        padding: 10px 12px;
    }

    .search-btn {
        padding: 10px 20px;
        font-size: 13px;
        white-space: nowrap;
    }

    .filter-container {
        padding: 12px;
    }

    .filter-row {
        gap: 8px;
        margin-bottom: 10px;
    }

    .filter-label {
        min-width: 60px;
        font-size: 12px;
    }

    .filter-options {
        gap: 8px;
    }

    .radio-label,
    .checkbox-label {
        font-size: 12px;
    }

    .filter-select {
        min-width: 100px;
        font-size: 12px;
        padding: 5px 8px;
    }

    .result-content {
        padding: 15px;
    }
}
