/* ===== 反钓鱼小游戏公共样式 ===== */
:root {
    --primary: #1a6eff;
    --primary-light: #e8f1ff;
    --primary-dark: #0d4fc4;
    --primary-gradient: linear-gradient(135deg, #1a6eff 0%, #0d4fc4 100%);
    --text: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-light: #8a8aa0;
    --bg: #ffffff;
    --bg-warm: #f8fafc;
    --bg-card: #ffffff;
    --border: #e8ecf4;
    --shadow: 0 4px 24px rgba(26, 110, 255, 0.08);
    --shadow-hover: 0 12px 40px rgba(26, 110, 255, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --warning: #ff6b35;
    --warning-light: #fff3ed;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --gold: #f59e0b;
    --gold-light: #fffbeb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg-warm);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== GAME CONTAINER ===== */
.game-wrapper {
    padding-top: 72px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.game-main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 24px rgba(26, 110, 255, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(26, 110, 255, 0.45);
}
.btn-secondary {
    background: white;
    color: var(--text);
    border: 1.5px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}
.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3);
}
.btn-success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
}
.btn-lg { padding: 16px 40px; font-size: 17px; border-radius: 14px; }
.btn-sm { padding: 8px 18px; font-size: 13px; border-radius: 8px; }

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

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 36px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.92) translateY(20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
}
.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}
.modal-content h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
    text-align: center;
}
.modal-content .modal-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}
.modal-content .modal-icon.success {
    background: var(--success-light);
    color: var(--success);
}
.modal-content .modal-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}
.modal-content .modal-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}
.modal-content .modal-icon.info {
    background: var(--primary-light);
    color: var(--primary);
}
.modal-content .modal-body {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}
.modal-content .modal-body strong {
    color: var(--text);
}
.modal-content .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== GAME HUD ===== */
.game-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.game-hud .hud-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}
.game-hud .hud-item .label {
    color: var(--text-light);
    font-weight: 500;
}
.game-hud .hud-item .value {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}
.game-hud .hud-item .value.danger { color: var(--danger); }
.game-hud .hud-item .value.warning { color: var(--warning); }
.game-hud .hud-item .value.success { color: var(--success); }

/* ===== TIMER BAR ===== */
.timer-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 24px;
}
.timer-bar .timer-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.3s linear;
}
.timer-bar .timer-fill.warning { background: linear-gradient(90deg, #f59e0b, #ff6b35); }
.timer-bar .timer-fill.danger { background: linear-gradient(90deg, #dc2626, #b91c1c); }

/* ===== SCORE BOARD ===== */
.score-board {
    text-align: center;
    padding: 40px 20px;
}
.score-board .score-number {
    font-size: 72px;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.score-board .score-label {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}
.score-board .score-detail {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.score-board .score-detail .detail-item {
    text-align: center;
}
.score-board .score-detail .detail-item .num {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
}
.score-board .score-detail .detail-item .label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ===== BADGE ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-gold { background: var(--gold-light); color: var(--gold); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
@keyframes pop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.animate-fadeInUp { animation: fadeInUp 0.6s ease-out both; }
.animate-fadeIn { animation: fadeIn 0.4s ease-out both; }
.animate-pulse { animation: pulse 0.3s ease; }
.animate-shake { animation: shake 0.4s ease; }
.animate-pop { animation: pop 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .game-main { padding: 20px 16px; }
    .modal-content { padding: 24px; }
    .modal-content h3 { font-size: 18px; }
    .score-board .score-number { font-size: 56px; }
    .game-hud { padding: 10px 14px; }
    .game-hud .hud-item .value { font-size: 16px; }
    .btn-lg { padding: 14px 28px; font-size: 15px; }
}

/* ===== MOBILE NAV & FOOTER ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        gap: 4px;
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }
    .nav-links.active { display: flex !important; }
    .mobile-toggle {
        display: flex !important;
        width: 40px; height: 40px;
        border: none;
        background: var(--primary-light);
        border-radius: 10px;
        cursor: pointer;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }
    .mobile-toggle span {
        display: block;
        width: 20px; height: 2px;
        background: var(--primary);
        border-radius: 2px;
    }
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}
