/* ===== 驾考通 - 全局样式 ===== */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --accent: #ff6b35;
    --accent-light: #fff0eb;
    --success: #34a853;
    --warning: #fbbc04;
    --danger: #ea4335;
    --text: #1a1a2e;
    --text-secondary: #5f6368;
    --text-light: #9aa0a6;
    --bg: #f8f9fa;
    --bg-white: #ffffff;
    --border: #e8eaed;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ===== 导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 22px;
    font-weight: 700;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: white;
    background: rgba(255,255,255,0.15);
}

/* ===== 移动端菜单 ===== */
.menu-toggle {
    display: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* ===== 页面容器 ===== */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* ===== 英雄区域 ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0d47a1 100%);
    color: white;
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}

.hero-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ===== 卡片系统 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

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

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text);
}

.card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.card-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 12px;
}

.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-green { background: #e6f4ea; color: var(--success); }
.tag-orange { background: var(--accent-light); color: var(--accent); }
.tag-red { background: #fce8e6; color: var(--danger); }
.tag-purple { background: #f3e8fd; color: #7c3aed; }

/* ===== 内容区块 ===== */
.section {
    margin: 40px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title .icon {
    font-size: 32px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

/* ===== 技巧列表 ===== */
.tip-list {
    list-style: none;
}

.tip-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tip-item:hover {
    border-left-width: 6px;
    padding-left: 22px;
}

.tip-item strong {
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.tip-item span {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== 表格样式 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.data-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.data-table tr:hover td {
    background: var(--primary-light);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ===== 二维码区域 ===== */
.qrcode-section {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%);
    border-radius: var(--radius);
    padding: 32px;
    margin: 40px 0;
    text-align: center;
    border: 2px dashed var(--primary);
    position: relative;
}

.qrcode-section::before {
    content: '👆';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

.qrcode-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

.qrcode-img {
    width: 180px;
    height: 180px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    background: white;
    padding: 8px;
    object-fit: contain;
}

.qrcode-info {
    max-width: 400px;
    text-align: left;
}

.qrcode-info h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 12px;
}

.qrcode-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
}

.qrcode-info .highlight {
    background: var(--accent-light);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.qrcode-info .free-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--success) 0%, #2d8a3e 100%);
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== 底部二维码条 ===== */
.qrcode-bar {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.qrcode-bar img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.qrcode-bar-text {
    flex: 1;
}

.qrcode-bar-text h4 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 4px;
}

.qrcode-bar-text p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== 模拟考试样式 ===== */
.quiz-container {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.quiz-progress {
    font-size: 14px;
    color: var(--text-secondary);
}

.quiz-progress-bar {
    width: 200px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quiz-question {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.quiz-option.correct {
    border-color: var(--success);
    background: #e6f4ea;
}

.quiz-option.wrong {
    border-color: var(--danger);
    background: #fce8e6;
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.quiz-option.selected .option-letter { background: var(--primary); color: white; }
.quiz-option.correct .option-letter { background: var(--success); color: white; }
.quiz-option.wrong .option-letter { background: var(--danger); color: white; }

.quiz-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.btn {
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(26,115,232,0.3); }

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); }

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #2d8a3e 100%);
    color: white;
}

.btn-success:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(52,168,83,0.3); }

/* ===== 结果页 ===== */
.result-box {
    text-align: center;
    padding: 40px;
}

.result-score {
    font-size: 72px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-message {
    font-size: 20px;
    margin: 16px 0 32px;
    color: var(--text-secondary);
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 48px 24px 24px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

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

.footer-section a {
    display: block;
    color: rgba(255,255,255,0.6);
    padding: 6px 0;
    font-size: 14px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

/* ===== 下载区域 ===== */
.download-section {
    background: linear-gradient(135deg, var(--accent) 0%, #e55a2b 100%);
    color: white;
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    margin: 40px 0;
}

.download-section h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.download-section p {
    opacity: 0.9;
    margin-bottom: 24px;
}

.download-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--accent);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ===== 标签页 ===== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-white);
    padding: 6px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    flex: 1;
    min-width: 100px;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: var(--bg);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== 步骤流程 ===== */
.steps {
    display: flex;
    justify-content: space-between;
    margin: 32px 0;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.step {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-num {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 12px;
    border: 4px solid var(--bg);
}

.step-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ===== 通知条 ===== */
.notice-bar {
    background: linear-gradient(90deg, var(--warning), #f9a825);
    color: #333;
    padding: 12px 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    background: var(--primary-dark);
}


/* ===== 顶部二维码栏 ===== */
.top-qrcode-bar {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
}
.top-qrcode-bar img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}
.top-qrcode-bar-text {
    line-height: 1.5;
}
.top-qrcode-bar-text strong {
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}
.top-qrcode-bar-text span {
    opacity: 0.85;
    font-size: 12px;
}

/* ===== 移动端优化 ===== */
@media (max-width: 768px) {
    .page-container {
        padding: 16px;
    }

    .hero {
        padding: 36px 16px;
    }
    .hero h1 {
        font-size: 24px;
    }
    .hero p {
        font-size: 14px;
    }
    .hero-badges {
        gap: 6px;
    }
    .badge {
        padding: 5px 12px;
        font-size: 12px;
    }

    .section-title {
        font-size: 20px;
    }
    .section-subtitle {
        font-size: 14px;
    }

    .card {
        padding: 18px;
    }
    .card h3 {
        font-size: 17px;
    }
    .card p {
        font-size: 13px;
    }
    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .card-grid {
        gap: 12px;
    }

    .tip-item {
        padding: 14px 16px;
    }
    .tip-item strong {
        font-size: 14px;
    }
    .tip-item span {
        font-size: 13px;
    }

    .data-table {
        font-size: 12px;
    }
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .tabs {
        padding: 4px;
        gap: 2px;
    }
    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: auto;
        flex: 1 1 auto;
    }

    .steps {
        flex-direction: column;
        gap: 20px;
    }
    .steps::before {
        display: none;
    }
    .step-num {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-number {
        font-size: 28px;
    }
    .stat-label {
        font-size: 12px;
    }

    .qrcode-section {
        padding: 20px 16px;
    }
    .qrcode-section::before {
        font-size: 12px;
        padding: 3px 12px;
    }
    .qrcode-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    .qrcode-img {
        width: 140px;
        height: 140px;
    }
    .qrcode-info {
        text-align: center;
    }
    .qrcode-info h3 {
        font-size: 17px;
    }
    .qrcode-info p {
        font-size: 13px;
    }

    .qrcode-bar {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }
    .qrcode-bar img {
        width: 70px;
        height: 70px;
    }
    .qrcode-bar-text h4 {
        font-size: 14px;
    }
    .qrcode-bar-text p {
        font-size: 12px;
    }

    .download-section {
        padding: 28px 20px;
    }
    .download-section h2 {
        font-size: 20px;
    }
    .download-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .quiz-container {
        padding: 16px;
    }
    .quiz-question {
        font-size: 15px;
    }
    .quiz-option {
        padding: 12px 14px;
        font-size: 14px;
    }
    .option-letter {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .notice-bar {
        font-size: 12px;
        padding: 8px 12px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }
    .footer-section img {
        margin: 12px auto 0;
    }
}

/* 超小屏幕 */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 20px;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tab-btn {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--primary-dark); flex-direction: column; padding: 16px; }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
    .section-title { font-size: 22px; }
    .card-grid { grid-template-columns: 1fr; }
    .qrcode-wrapper { flex-direction: column; }
    .qrcode-img { width: 150px; height: 150px; }
    .steps { flex-direction: column; gap: 24px; }
    .steps::before { display: none; }
    .step-num { margin-bottom: 8px; }
    .quiz-container { padding: 20px; }
    .quiz-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
}

/* ===== 打印样式 ===== */
@media print {
    .navbar, .back-to-top, .download-section, .qrcode-section { display: none; }
    .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
    body { background: white; }
}
