/* ===== 花匣 GameKit - Design System v2 ===== */
/* 明亮风格 · 分区卡片 · 花式美学 */

:root {
    /* 基调：亮色系 */
    --bg: #f4f6f9;
    --bg-card: #ffffff;
    --bg-input: #f0f2f5;
    --bg-header: rgba(255, 255, 255, 0.85);
    --border: #e3e6eb;
    --border-light: #eff1f4;

    /* 文字 */
    --text: #1a1b2e;
    --text-dim: #7a7f8e;
    --text-light: #a0a5b2;

    /* 品牌：花绿 */
    --accent: #00c853;
    --accent-hover: #00a844;
    --accent-glow: rgba(0, 200, 83, 0.15);
    --accent-secondary: #00b4d8;
    --accent-gradient: linear-gradient(135deg, #00c853, #00b4d8);

    /* 语义色 */
    --green: #00c853;
    --orange: #f59e0b;
    --red: #ef4444;

    /* 圆角 */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;

    /* 阴影 */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);

    /* 最大宽度 */
    --max-w: 1000px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-input);
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-glow);
    font-weight: 600;
}

/* ===== Main ===== */
.main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 28px 20px 64px;
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    margin-bottom: 28px;
    padding: 20px 0;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.hero-sub {
    color: var(--text-dim);
    font-size: 1rem;
}

/* ===== Category Section ===== */
.category-section {
    margin-bottom: 32px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.category-icon {
    font-size: 1.5rem;
}

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

.category-badge {
    font-size: 0.7rem;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-left: 4px;
}

/* ===== Tool Grid ===== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 641px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 200, 83, 0.4);
}

.tool-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    line-height: 1;
}

.tool-card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.tool-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.tool-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 3px 10px;
    border-radius: 20px;
}

.tool-tag-soon {
    color: var(--text-light) !important;
    background: rgba(160, 165, 178, 0.1) !important;
}

.tool-card-soon {
    opacity: 0.55;
    cursor: default;
}

.tool-card-soon:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: var(--shadow);
}

/* ===== Converter Card ===== */
.converter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.converter-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text);
}

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.input-group input[type="number"],
.input-group input[type="text"],
.input-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237a7f8e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.input-group input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    cursor: pointer;
}

.input-group input[type="color"] {
    width: 48px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: var(--radius-xs);
    cursor: pointer;
    padding: 2px;
}

/* ===== Game Row ===== */
.game-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}

.game-col h3 {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-weight: 600;
}

.swap-btn-wrap {
    display: flex;
    align-items: center;
    padding-top: 36px;
}

.swap-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== Result ===== */
.result-group {
    margin-bottom: 14px;
}

.result-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.result-value {
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all 0.2s;
    user-select: all;
}

.result-value:hover {
    background: rgba(0, 200, 83, 0.12);
    transform: scale(1.02);
}

/* ===== Ref Data ===== */
.ref-data {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

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

.ref-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.ref-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* ===== Info Section ===== */
.info-section {
    margin-top: 40px;
}

.info-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.info-text {
    color: var(--text-dim);
    font-size: 0.92rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.info-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.info-card h3 {
    font-size: 0.95rem;
    margin-bottom: 6px;
    font-weight: 700;
}

.info-card p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ===== Game Tags ===== */
.game-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.82rem;
    color: var(--text);
}

.game-tag small {
    color: var(--text-dim);
    margin-left: 4px;
}

/* ===== FAQ ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-item summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--accent);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item p {
    padding: 0 16px 14px;
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.7;
}

/* ===== QQ Section ===== */
.qq-section {
    margin-top: 36px;
}

.qq-card {
    background: var(--accent-glow);
    border: 1px solid rgba(0, 200, 83, 0.25);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow);
}

.qq-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.qq-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.qq-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.qq-btn {
    display: inline-block;
    background: var(--accent-gradient);
    color: #fff;
    padding: 10px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.qq-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 24px 20px;
    border-top: 1px solid var(--border-light);
    color: var(--text-light);
    font-size: 0.78rem;
}

.footer p + p {
    margin-top: 4px;
}

/* ===== Share Bar ===== */
.share-bar {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.share-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== Speed Indicator ===== */
.speed-indicator {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.speed-bar {
    background: var(--bg-input);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.speed-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.speed-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 4px;
}

.speed-desc {
    text-align: center;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* ===== Pro Table ===== */
.pro-table { margin-top: 12px; }

.pro-table-inner {
    width: 100%;
    border-collapse: collapse;
}

.pro-table-inner th {
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    padding: 8px 10px;
    border-bottom: 2px solid var(--border);
}

.pro-table-inner td {
    padding: 10px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-light);
}

.pro-name {
    font-weight: 700;
    color: var(--accent);
}

.pro-team {
    color: var(--text-dim);
}

.pro-edpi {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ===== FOV Visual ===== */
.fov-visual {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

#fov-canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.5rem; }

    .game-row { grid-template-columns: 1fr; }

    .swap-btn-wrap {
        padding-top: 0;
        justify-content: center;
    }

    .swap-btn { transform: rotate(90deg); }

    .info-grid { grid-template-columns: 1fr; }

    .ref-data { grid-template-columns: repeat(3, 1fr); }

    .converter-card { padding: 18px; }

    .nav { gap: 2px; }
    .nav-link { padding: 6px 8px; font-size: 0.8rem; }
}
