/* ============================================
   Flat Design — 7471 Homepage
   原则：纯色块、无阴影、无渐变、无模糊
   层级通过字号 / 字重 / 色深 / 留白表达
   ============================================ */

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

/* ── 色板 ── */
:root {
    color-scheme: light dark;
    --bg:           #ffffff;
    --surface:      #f6f8fa;
    --border:       #d0d7de;
    --text:         #1f2328;
    --text-muted:   #656d76;
    --heading:      #0f1419;
    --accent:       #0969da;
    --accent-hover: #0550ae;
    --accent-light: #ddf4ff;
    --accent-text:  #ffffff;
    --footer-text:  #656d76;
    --separator:    #d8dee4;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:           #0d1117;
        --surface:      #161b22;
        --border:       #30363d;
        --text:         #e6edf3;
        --text-muted:   #8b949e;
        --heading:      #f0f6fc;
        --accent:       #58a6ff;
        --accent-hover: #79c0ff;
        --accent-light: #121d2f;
        --accent-text:  #0d1117;
        --footer-text:  #8b949e;
        --separator:    #30363d;
    }
}

/* ── 布局 ── */
html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--text);
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* ── 顶部装饰条 ── */
.accent-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    z-index: 20;
}

/* ── 语言栏 ── */
.lang-bar {
    position: fixed;
    top: 3px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.lang-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-right: auto;
}

.lang-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 32px 6px 12px;
    font-size: 0.8125rem;
    line-height: 1.5;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23656d76' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.15s;
}

.lang-select:focus {
    border-color: var(--accent);
}

/* ── 主区域 ── */
.hero {
    text-align: center;
    max-width: 720px;
    width: 100%;
    padding: calc(48px + 3px + 24px) 24px 48px;
}

/* 图标徽章 */
.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 12px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.error-code {
    font-size: 5rem;
    font-weight: 800;
    color: var(--heading);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}

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

.countdown-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

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

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 28px;
    white-space: pre-line;
}

/* 分隔线 */
.hero-divider {
    width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 auto 28px;
}

/* ── 导航卡片 ── */
.hero-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}

.card::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--text-muted);
    border-bottom: 1.5px solid var(--text-muted);
    transform: rotate(-45deg);
    flex-shrink: 0;
    transition: border-color 0.15s, transform 0.15s;
}

.card:hover::after {
    border-color: var(--accent);
    transform: rotate(-45deg) translateX(2px);
}

.card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--accent);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.card:hover .card-icon {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

.card:hover .card-desc {
    color: var(--accent);
}

.card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.3;
}

.card-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
    transition: color 0.15s;
}

/* ── 页脚 ── */
.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    width: 100%;
    margin-top: auto;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--footer-text);
}

.footer-sep {
    color: var(--separator);
    font-size: 0.75rem;
    user-select: none;
}

.site-footer a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.15s;
    gap: 4px;
    font-size: 0.75rem;
}

.site-footer a:hover {
    color: var(--accent);
}

.site-footer img {
    display: block;
    height: 18px;
    border-radius: 3px;
}

.footer-travel img {
    width: 14px;
    height: 14px;
}

/* ── 移动端 ── */
@media (max-width: 600px) {
    .lang-bar {
        padding: 10px 12px;
    }

    .hero {
        padding: calc(48px + 3px + 16px) 16px 32px;
    }

    .hero-badge {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .hero-badge svg {
        width: 22px;
        height: 22px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .error-code {
        font-size: 3.5rem;
    }

    .hero-desc {
        font-size: 0.9375rem;
        margin-bottom: 24px;
    }

    .card {
        padding: 14px 16px;
    }

    .card-icon {
        width: 36px;
        height: 36px;
    }

    .hero-cards {
        grid-template-columns: 1fr;
    }

    .site-footer {
        gap: 10px;
        padding: 14px;
    }

    .footer-sep {
        display: none;
    }
}
