/* ============================
   GB标准导航 - 行业标杆风格
   ============================ */

/* 全局变量 */
:root {
    --primary: #1a56db;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --success: #10b981;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* 顶部导航 */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon { font-size: 1.8rem; }

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.header-nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 主搜索区 */
.hero-search {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 20px 80px;
    text-align: center;
    position: relative;
}

.hero-search::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
}

.hero-subtitle .highlight {
    background: var(--accent);
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 700;
}

/* 搜索框 */
.search-container {
    display: flex;
    background: white;
    border-radius: 16px;
    padding: 6px;
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    margin: 0 auto 24px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 18px 24px;
    font-size: 1.1rem;
    outline: none;
    border-radius: 12px 0 0 12px;
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.search-btn:hover { background: var(--primary-dark); }

/* 热门标签 */
.hot-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hot-label {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.hot-tag {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.hot-tag:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* 搜索建议下拉 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 700px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    display: none;
    overflow: hidden;
    z-index: 200;
}

.search-suggestions.active { display: block; }

.suggestion-item {
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #f0f9ff; }

.suggestion-code {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.suggestion-title {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-left: 16px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-kw {
    color: var(--accent);
    font-size: 0.85rem;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 主体内容 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.section { margin-bottom: 48px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.section-more {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.section-more:hover { text-decoration: underline; }

/* 分类网格 - 左侧快捷入口，右侧分类网格15个一行 */
.categories-section {
    display: block;
}

.categories-section .section-header {
    display: none;
}

/* 分类主体区域 */
.category-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.categories-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-row {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 8px;
}

.featured-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

}

.featured-row .category-card.featured {
    padding: 12px 14px;
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%);
}

.featured-row .category-card .category-icon {
    font-size: 1.1rem;
}

.featured-row .category-card .category-name {
    font-size: 0.82rem;
    font-weight: 500;
}

.featured-row .category-card.featured .category-icon {
    font-size: 1.3rem;
}

.featured-row .category-card.featured .category-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.featured-row .category-card.featured .category-count {
    font-size: 0.75rem;
    color: var(--text-light);
}

.category-card .category-icon {
    font-size: 0.95rem;
}

.category-card .category-name {
    font-size: 0.72rem;
    color: var(--text);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* 最新收录 + 侧边栏 */
.latest-section {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
}

.latest-main {}

.latest-list {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.latest-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.latest-item:last-child { border-bottom: none; }
.latest-item:hover { background: #f0f9ff; }

.latest-code {
    font-weight: 700;
    color: var(--primary);
    min-width: 140px;
    font-size: 0.95rem;
}

.latest-title {
    flex: 1;
    color: var(--text);
    font-size: 0.95rem;
}

.latest-year {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: 16px;
}

/* 侧边栏 */
.latest-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    text-align: center;
    color: var(--text-light);
}

.ad-placeholder .ad-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.ad-placeholder small {
    font-size: 0.8rem;
    color: var(--text-light);
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.help-list {
    list-style: none;
}

.help-list li {
    margin-bottom: 10px;
}

.help-list a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.help-list a:hover { text-decoration: underline; }

/* 帮助弹窗 */
.help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.help-modal.active {
    display: flex;
}

.help-content {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.help-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
}

.help-close:hover {
    color: var(--text);
}

.help-content h4 {
    font-size: 1.1rem;
    color: var(--text);
    margin: 16px 0 8px;
    padding-right: 24px;
}

.help-content h4:first-child {
    margin-top: 0;
}

.help-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
}

.help-content ul {
    margin: 0 0 12px 20px;
}

.help-content li {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 6px;
    line-height: 1.5;
}

/* 筛选区 */
.filter-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.back-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-info {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-desc {
    color: var(--text-light);
    font-weight: 400;
    margin-left: 8px;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.type-filter, .year-filter {
    display: flex;
    gap: 6px;
}

.type-filter button, .year-filter button {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.type-filter button:hover, .year-filter button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.type-filter button.active, .year-filter button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.clear-filter {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
}

.clear-filter:hover { color: var(--primary); }

/* 结果网格 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.standard-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
}

.standard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.standard-card .code {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.standard-card .title {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.5;
}

.standard-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-tag {
    background: #e0f2fe;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.standard-card .year {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* 无结果 */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--text-light);
}

/* 快捷入口 */
.quick-access {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* 数据统计 */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 反馈区域 */
.feedback-section {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.feedback-toggle {
    background: var(--primary);
    color: white;
    padding: 14px 20px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}

.feedback-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

.feedback-form {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    width: 300px;
    box-shadow: var(--shadow-lg);
}

.feedback-form.active { display: block; }

.feedback-header {
    display: block;
    margin-bottom: 8px;
    position: relative;
}

.feedback-header h3 {
    margin: 0;
    padding-right: 30px;
}

.feedback-close {
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    position: absolute;
    top: 0;
    right: 0;
}

.feedback-close:hover {
    color: var(--text);
}

.feedback-form h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 4px;
}

.feedback-form p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 10px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
    border-color: var(--primary);
}

.feedback-form textarea {
    height: 80px;
    resize: none;
}

.feedback-form button {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.feedback-form button:hover { background: var(--primary-dark); }

.feedback-success {
    margin-top: 12px;
    padding: 10px;
    background: #ecfdf5;
    color: var(--success);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.85rem;
}

/* 快捷反馈入口 */
.quick-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    border: 1px solid #f59e0b;
}

.feedback-hint {
    color: #92400e;
    font-size: 0.95rem;
}

.feedback-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* 页脚 */
.site-footer {
    background: var(--primary-dark);
    color: white;
    padding: 48px 20px 24px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-desc {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    max-width: 400px;
}

.footer-links {
    display: flex;
    gap: 48px;
}

.footer-col h4 {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-col a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* 响应式 */
@media (max-width: 900px) {
    .latest-section {
        grid-template-columns: 1fr;
    }
    .latest-sidebar {
        display: none;
    }
    .quick-access {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .header-nav { display: none; }
    .hero-title { font-size: 1.8rem; }
    .search-container { flex-direction: column; padding: 8px; }
    .search-btn { border-radius: 10px; justify-content: center; }
    .quick-access { grid-template-columns: 1fr; }
    .stats-section { grid-template-columns: repeat(2, 1fr); }
    .filter-bar { flex-direction: column; align-items: flex-start; }
    .results-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
    .footer-links { flex-direction: column; gap: 24px; }
}