/* ==========================================
   CSS 变量 - 设计令牌
   ========================================== */
:root {
    --bg: #0c0c0e;
    --bg-elevated: #16161a;
    --bg-card: #1c1c22;
    --fg: #ececef;
    --fg-muted: #8b8b96;
    --fg-dim: #55555f;
    --accent: #E8530E;
    --accent-soft: rgba(232, 83, 14, 0.12);
    --accent-hover: #ff6b2b;
    --green: #22c55e;
    --yellow: #f59e0b;
    --red: #ef4444;
    --border: #2a2a32;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --max-w: 1200px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================
   全局重置与基础
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

    a:hover {
        color: var(--accent-hover);
    }

img {
    max-width: 100%;
    display: block;
}

/* ==========================================
   站点头部
   ========================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 12, 14, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    flex-shrink: 0;
}

    .logo:hover {
        color: var(--fg);
    }

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    gap: 4px;
}

    .main-nav a {
        color: var(--fg-muted);
        padding: 8px 14px;
        border-radius: var(--radius);
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s;
    }

        .main-nav a:hover {
            color: var(--fg);
            background: var(--accent-soft);
        }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

    .mobile-menu-btn span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--fg);
        border-radius: 2px;
        transition: 0.3s;
    }

/* ==========================================
   广告容器
   ========================================== */
.ad-container {
    max-width: var(--max-w);
    margin: 16px auto;
    padding: 0 24px;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-header {
    margin-top: 8px;
}

.ad-content-bottom {
    margin-bottom: 24px;
}

.ad-placeholder {
    width: 728px;
    max-width: 100%;
    height: 90px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-dim);
    font-size: 13px;
}

/* ==========================================
   主内容区
   ========================================== */
.main-content {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    min-height: 60vh;
}

/* ==========================================
   首页 Hero
   ========================================== */
.home-hero {
    position: relative;
    padding: 80px 24px 60px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(232, 83, 14, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 83, 14, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(232, 83, 14, 0.12) 0%, transparent 70%);
    filter: blur(40px);
    animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-accent {
    background: linear-gradient(135deg, var(--accent), #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--fg-muted);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 36px;
}

/* ==========================================
   搜索框
   ========================================== */
.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 6px 6px 6px 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

    .search-input-wrap:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 4px var(--accent-soft);
    }

.search-icon {
    flex-shrink: 0;
    color: var(--fg-dim);
    margin-right: 12px;
}

.search-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--fg);
    font-size: 16px;
    font-family: var(--font);
    padding: 10px 0;
}

    .search-input-wrap input::placeholder {
        color: var(--fg-dim);
    }

.search-btn {
    flex-shrink: 0;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

    .search-btn:hover {
        background: var(--accent-hover);
    }

    .search-btn:active {
        transform: scale(0.97);
    }

.search-hints {
    margin-top: 14px;
    font-size: 13px;
    color: var(--fg-dim);
}

    .search-hints a {
        color: var(--fg-muted);
        margin: 0 6px;
        font-weight: 500;
    }

        .search-hints a:hover {
            color: var(--accent);
        }

/* ==========================================
   通用区块标题
   ========================================== */
.section-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.section-desc {
    color: var(--fg-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

/* ==========================================
   前缀分类卡片
   ========================================== */
.prefix-section {
    padding: 48px 0;
}

.prefix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.prefix-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s;
    color: var(--fg);
}

    .prefix-card:hover {
        border-color: var(--accent);
        transform: translateY(-2px);
        box-shadow: var(--shadow);
        color: var(--fg);
    }

.prefix-letter {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    flex-shrink: 0;
}

.prefix-p .prefix-letter {
    background: rgba(232, 83, 14, 0.15);
    color: var(--accent);
}

.prefix-b .prefix-letter {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.prefix-c .prefix-letter {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.prefix-u .prefix-letter {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.prefix-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.prefix-info p {
    font-size: 12px;
    color: var(--fg-dim);
    line-height: 1.4;
}

.prefix-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--fg-dim);
    white-space: nowrap;
}

/* ==========================================
   热门故障码
   ========================================== */
.popular-section {
    padding: 48px 0;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.popular-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s;
    color: var(--fg);
}

    .popular-card:hover {
        border-color: var(--accent);
        transform: translateY(-1px);
        color: var(--fg);
    }

.popular-code {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.popular-desc {
    font-size: 14px;
    color: var(--fg-muted);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==========================================
   徽章/标签
   ========================================== */
.severity-badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--sev-color, var(--yellow)) 15%, transparent);
    color: var(--sev-color, var(--yellow));
}

.severity-1 {
    --sev-color: var(--green);
}

.severity-2 {
    --sev-color: var(--yellow);
}

.severity-3 {
    --sev-color: var(--red);
}

.system-tag {
    font-size: 12px;
    color: var(--fg-dim);
    padding: 3px 8px;
    background: var(--bg-elevated);
    border-radius: 6px;
}

.brand-tag {
    font-size: 12px;
    color: #3b82f6;
    padding: 3px 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
}

.generic-tag {
    font-size: 12px;
    color: var(--green);
    padding: 3px 8px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 6px;
}

/* ==========================================
   品牌入口
   ========================================== */
.brand-section {
    padding: 48px 0;
}

.brand-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.brand-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
    transition: all 0.2s;
}

    .brand-card:hover {
        border-color: var(--accent);
        color: var(--fg);
    }

.brand-count {
    font-size: 12px;
    color: var(--fg-dim);
    font-weight: 400;
}

.brand-more {
    color: var(--fg-muted);
    border-style: dashed;
}

    .brand-more:hover {
        color: var(--accent);
        border-color: var(--accent);
    }

/* ==========================================
   知识区域
   ========================================== */
.knowledge-section {
    padding: 48px 0 64px;
    border-top: 1px solid var(--border);
}

.knowledge-content {
    max-width: 800px;
}

    .knowledge-content h3 {
        font-size: 18px;
        font-weight: 700;
        margin: 28px 0 10px;
        color: var(--fg);
    }

        .knowledge-content h3:first-child {
            margin-top: 0;
        }

    .knowledge-content p {
        color: var(--fg-muted);
        font-size: 15px;
        margin-bottom: 12px;
    }

    .knowledge-content ul {
        color: var(--fg-muted);
        font-size: 15px;
        padding-left: 20px;
        margin-bottom: 12px;
    }

    .knowledge-content li {
        margin-bottom: 6px;
    }

    .knowledge-content strong {
        color: var(--fg);
    }

/* ==========================================
   面包屑
   ========================================== */
.breadcrumb {
    font-size: 13px;
    color: var(--fg-dim);
    margin-bottom: 20px;
    padding-top: 24px;
}

    .breadcrumb a {
        color: var(--fg-muted);
    }

        .breadcrumb a:hover {
            color: var(--accent);
        }

/* ==========================================
   搜索结果页
   ========================================== */
.search-page {
    padding-bottom: 48px;
}

.search-page-header {
    padding-top: 32px;
    margin-bottom: 24px;
}

.search-page-form {
    margin-top: 16px;
}

.search-results-info {
    font-size: 14px;
    color: var(--fg-muted);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.search-result-item {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 10px;
    transition: all 0.2s;
    color: var(--fg);
}

    .search-result-item:hover {
        border-color: var(--accent);
        color: var(--fg);
    }

.result-code {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.result-desc {
    font-size: 15px;
    margin: 6px 0 12px;
    color: var(--fg-muted);
}

.result-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--fg-muted);
}

    .no-results h3 {
        font-size: 20px;
        color: var(--fg);
        margin: 16px 0 8px;
    }

.no-results-tips {
    text-align: left;
    max-width: 500px;
    margin: 24px auto 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    font-size: 14px;
}

    .no-results-tips ul {
        padding-left: 20px;
        margin-top: 8px;
    }

    .no-results-tips li {
        margin-bottom: 4px;
    }

.search-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--fg-dim);
    font-size: 16px;
}

/* ==========================================
   分页
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

    .page-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .page-btn.active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

/* ==========================================
   故障码详情页
   ========================================== */
.detail-page {
    padding-bottom: 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.detail-header {
    margin-bottom: 28px;
}

.detail-code-badge {
    display: inline-block;
    font-size: 36px;
    font-weight: 900;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.detail-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-section {
    margin-bottom: 32px;
}

    .detail-section h2 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 14px;
        padding-left: 14px;
        border-left: 3px solid var(--accent);
    }

.detail-text {
    font-size: 15px;
    color: var(--fg-muted);
    line-height: 1.9;
}

.causes-text .cause-item {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.cause-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 10px;
}

.disclaimer-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 13px;
    color: var(--yellow);
    line-height: 1.7;
    margin-top: 32px;
}

    .disclaimer-box strong {
        color: var(--fg);
    }

/* 侧边栏 */
.detail-sidebar {
    position: sticky;
    top: 88px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

    .info-card h3 {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 14px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border);
    }

    .info-card dl {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 8px 16px;
        font-size: 14px;
    }

    .info-card dt {
        color: var(--fg-dim);
        white-space: nowrap;
    }

    .info-card dd {
        color: var(--fg-muted);
    }

.related-list {
    list-style: none;
}

    .related-list li {
        border-bottom: 1px solid var(--border);
    }

        .related-list li:last-child {
            border-bottom: none;
        }

    .related-list a {
        display: flex;
        gap: 10px;
        padding: 10px 0;
        font-size: 13px;
        color: var(--fg-muted);
    }

        .related-list a:hover {
            color: var(--accent);
        }

.rc-code {
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    min-width: 52px;
}

.rc-desc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   列表页（前缀/品牌）
   ========================================== */
.list-page {
    padding-bottom: 48px;
}

.list-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.prefix-highlight, .brand-highlight {
    color: var(--accent);
}

.list-desc {
    color: var(--fg-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.prefix-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.prefix-overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: all 0.3s;
    color: var(--fg);
}

    .prefix-overview-card:hover {
        border-color: var(--accent);
        transform: translateY(-2px);
        color: var(--fg);
    }

.po-letter {
    font-size: 48px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 8px;
}

.po-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.po-count {
    font-size: 13px;
    color: var(--fg-dim);
}

.brand-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.brand-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    color: var(--fg);
}

    .brand-list-card:hover {
        border-color: var(--accent);
        color: var(--fg);
    }

    .brand-list-card h3 {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .brand-list-card p {
        font-size: 13px;
        color: var(--fg-dim);
    }

/* 表格 */
.code-list-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.code-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .code-list-table th {
        text-align: left;
        padding: 12px 16px;
        background: var(--bg-elevated);
        color: var(--fg-dim);
        font-weight: 600;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
    }

    .code-list-table td {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
        color: var(--fg-muted);
        vertical-align: middle;
    }

    .code-list-table tr:hover td {
        background: var(--bg-card);
    }

.table-code-link {
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   文本页（隐私/关于）
   ========================================== */
.text-page {
    max-width: 720px;
    padding: 40px 0 64px;
}

    .text-page h1 {
        font-size: 28px;
        font-weight: 900;
        margin-bottom: 16px;
    }

    .text-page h2 {
        font-size: 18px;
        font-weight: 700;
        margin: 28px 0 10px;
    }

    .text-page p {
        color: var(--fg-muted);
        font-size: 15px;
        margin-bottom: 12px;
        line-height: 1.8;
    }

/* ==========================================
   404 页面
   ========================================== */
.not-found-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.not-found-content {
    text-align: center;
}

    .not-found-content h1 {
        font-size: 80px;
        font-weight: 900;
        color: var(--accent);
        line-height: 1;
    }

    .not-found-content h2 {
        font-size: 24px;
        font-weight: 700;
        margin: 12px 0 8px;
    }

    .not-found-content p {
        color: var(--fg-muted);
        margin-bottom: 24px;
    }

.not-found-search {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

    .not-found-search input {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 10px 16px;
        color: var(--fg);
        font-size: 14px;
        font-family: var(--font);
        outline: none;
        width: 260px;
    }

        .not-found-search input:focus {
            border-color: var(--accent);
        }

    .not-found-search button {
        background: var(--accent);
        color: #fff;
        border: none;
        border-radius: var(--radius);
        padding: 10px 20px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        font-family: var(--font);
    }

.back-home {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
}

/* ==========================================
   页脚
   ========================================== */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    margin-top: 0;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 48px 24px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--fg);
}

.footer-col p {
    font-size: 13px;
    color: var(--fg-dim);
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 13px;
    color: var(--fg-dim);
    transition: color 0.2s;
}

    .footer-col a:hover {
        color: var(--accent);
    }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--fg-dim);
}

/* ==========================================
   响应式
   ========================================== */
@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .header-inner {
        gap: 16px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px;
    }

        .main-nav.open {
            display: flex;
        }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .search-input-wrap {
        flex-direction: column;
        padding: 12px;
        gap: 8px;
    }

    .search-icon {
        display: none;
    }

    .search-btn {
        width: 100%;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .prefix-grid {
        grid-template-columns: 1fr;
    }

    .popular-grid {
        grid-template-columns: 1fr;
    }

    .detail-code-badge {
        font-size: 28px;
    }

    .detail-title {
        font-size: 20px;
    }

    .code-list-table {
        font-size: 13px;
    }

        .code-list-table th, .code-list-table td {
            padding: 10px 12px;
        }
}

/* ==========================================
   减少动画（无障碍）
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
