/* ============================================
   六合彩开奖结果 - 样式表
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2235;
    --bg-card-hover: #1f2a40;
    --text-primary: #f0f4ff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --border-color: rgba(148, 163, 184, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Ball Colors */
    --ball-red: #ef4444;
    --ball-blue: #3b82f6;
    --ball-green: #22c55e;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-gold: #d97706;
    --accent-gold-light: #f59e0b;
    --border-color: rgba(148, 163, 184, 0.25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.08);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .logo h1 {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Nav dropdown (mobile) */
[data-theme="light"] .nav {
    background: rgba(255, 255, 255, 0.98);
}

/* Cards with hardcoded dark gradients */
[data-theme="light"] .user-info-card {
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .bet-period-card {
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Section headers */
[data-theme="light"] .section-header h2 {
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ball containers */
[data-theme="light"] .ball {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Input / form elements */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.3);
    color: #1e293b;
}

/* Auth card */
[data-theme="light"] .auth-card {
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Countdown items */
[data-theme="light"] .countdown-item {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
}

/* Robot chat */
[data-theme="light"] .robot-chat-box {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .robot-chat-bubble {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

/* Modal overlay */
[data-theme="light"] .modal-overlay {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .modal-content {
    background: #ffffff;
}

/* Table */
[data-theme="light"] .history-table th {
    background: #f1f5f9;
}

[data-theme="light"] .history-table tr:hover {
    background: #f8fafc;
}

/* Toast */
[data-theme="light"] .toast {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Bet type tabs */
[data-theme="light"] .bet-type-tab {
    background: #f1f5f9;
    color: #475569;
}

[data-theme="light"] .bet-type-tab.active {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #ffffff;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(245, 158, 11, 0.1);
}

.nav-link.active {
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Theme Toggle */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    transform: rotate(15deg) scale(1.1);
}

/* Draw Time Display */
.draw-time-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--accent-purple);
    font-weight: 500;
}

.draw-time-display .draw-time-icon {
    font-size: 14px;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 100px 0 60px;
}

.section:first-of-type {
    padding-top: 120px;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Latest Draw Section
   ============================================ */
.draw-info {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.draw-period {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #000;
    padding: 4px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
}

.draw-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.latest-result-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.latest-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple), var(--accent-blue));
}

.balls-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.ball {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: ballAppear 0.6s ease-out backwards;
    cursor: default;
    transition: transform 0.3s ease;
}

.ball:hover {
    transform: scale(1.1) translateY(-5px);
}

.ball::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 12px;
    width: 20px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: rotate(-30deg);
}

.ball-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.ball-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ball-green { background: linear-gradient(135deg, #22c55e, #16a34a); }

@keyframes ballAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
    60% {
        transform: scale(1.2) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.ball:nth-child(1) { animation-delay: 0.1s; }
.ball:nth-child(2) { animation-delay: 0.2s; }
.ball:nth-child(3) { animation-delay: 0.3s; }
.ball:nth-child(4) { animation-delay: 0.4s; }
.ball:nth-child(5) { animation-delay: 0.5s; }
.ball:nth-child(6) { animation-delay: 0.6s; }

.special-divider {
    font-size: 2rem;
    color: var(--accent-gold);
    font-weight: 700;
    padding: 0 10px;
}

.special-ball-container .ball {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
    animation-delay: 0.8s;
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
    border: 3px solid var(--accent-gold);
}

/* Result Details */
.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.detail-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.detail-card:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-gold);
}

/* Countdown */
.next-draw-countdown {
    margin-top: 40px;
    text-align: center;
}

.countdown-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.countdown-timer {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.countdown-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    border: 1px solid var(--border-color);
    min-width: 80px;
}

.countdown-number {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.countdown-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   History Section
   ============================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select,
.filter-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.filter-input {
    width: 160px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-search {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #000;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.3);
}

.history-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table thead {
    background: var(--bg-card);
}

.history-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.history-table td {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    white-space: nowrap;
}

.history-table tbody tr {
    transition: var(--transition);
}

.history-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.history-ball {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    margin-right: 4px;
}

.history-ball-special {
    border: 2px solid var(--accent-gold);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

/* ============================================
   Stats Section
   ============================================ */
.stats-tabs {
    display: flex;
    gap: 8px;
}

.stats-tab {
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.stats-tab:hover {
    color: var(--text-primary);
}

.stats-tab.active {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
    font-weight: 600;
}

.stats-panel {
    display: none;
}

.stats-panel.active {
    display: block;
}

.frequency-chart,
.missing-chart {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 10px;
}

.stat-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

.stat-item .stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.stat-item .stat-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-bottom: 4px;
    overflow: hidden;
}

.stat-item .stat-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

.stat-item .stat-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.summary-icon {
    font-size: 2rem;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.summary-value {
    font-weight: 700;
    color: var(--accent-gold);
}

/* ============================================
   Zodiac Section
   ============================================ */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.zodiac-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.zodiac-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.zodiac-emoji {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.zodiac-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--accent-gold);
}

.zodiac-numbers {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.color-legend {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
}

.color-legend h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.color-dot-red { background: var(--ball-red); }
.color-dot-blue { background: var(--ball-blue); }
.color-dot-green { background: var(--ball-green); }

.color-numbers {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        border-bottom: 1px solid var(--border-color);
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 1rem;
    }

    .section {
        padding: 80px 0 40px;
    }

    .section:first-of-type {
        padding-top: 100px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .latest-result-card {
        padding: 30px 20px;
    }

    .ball {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }

    .special-ball-container .ball {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }

    .balls-container {
        gap: 10px;
    }

    .result-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .countdown-timer {
        gap: 10px;
    }

    .countdown-item {
        padding: 12px 16px;
        min-width: 60px;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input {
        width: 100%;
    }

    .history-table th,
    .history-table td {
        padding: 10px 12px;
    }

    .frequency-chart,
    .missing-chart {
        grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
        gap: 6px;
    }

    .stat-item {
        padding: 8px 4px;
    }

    .stat-item .stat-number {
        font-size: 0.9rem;
    }

    .zodiac-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .ball {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .special-ball-container .ball {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }

    .result-details {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .detail-card {
        padding: 14px;
    }

    .countdown-item {
        padding: 10px 12px;
        min-width: auto;
    }

    .countdown-number {
        font-size: 1.2rem;
    }

    .zodiac-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* ============================================
   Auth Section (Login/Register)
   ============================================ */
.auth-section {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 30px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #000;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 12px;
    min-height: 20px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.form-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ============================================
   User Dashboard
   ============================================ */
.user-info-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, #1a2235, #111827);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.user-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple), var(--accent-blue));
}

.user-avatar {
    font-size: 3rem;
    width: 70px;
    height: 70px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-gold);
    flex-shrink: 0;
}

.user-details h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.balance-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.user-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.btn-gold {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.3);
}

.btn-outline {
    padding: 10px 24px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-outline:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* User Tabs */
.user-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
}

.user-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.user-tab.active {
    background: var(--accent-gold);
    color: #000;
}

.user-panel {
    display: none;
}

.user-panel.active {
    display: block;
}

.panel-toolbar {
    margin-bottom: 16px;
}

.form-select {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

/* Record Cards */
.record-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    transition: var(--transition);
}

.record-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.record-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.record-period {
    font-weight: 700;
    color: var(--text-primary);
}

.record-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
}

.status-won {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-lost {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-cancelled {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

.record-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.record-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.record-type {
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.record-value {
    font-weight: 600;
    color: var(--text-primary);
}

.record-amount {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.record-amount strong {
    color: var(--text-primary);
}

.win-amount {
    color: #22c55e !important;
    font-weight: 700;
}

.record-time {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.record-amount-big {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.record-remark {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.empty-msg {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Pagination */
.list-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
}

.pg-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.pg-btn:hover,
.pg-btn.active {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

/* Quick Amounts */
.quick-amounts {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.quick-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.quick-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ============================================
   Toast
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.toast-success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-info { background: linear-gradient(135deg, #3b82f6, #2563eb); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ============================================
   Betting Page
   ============================================ */
.header-balance {
    display: flex;
    align-items: center;
}

.balance-badge {
    padding: 6px 14px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.bet-period-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a2235, #111827);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.bet-period-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple), var(--accent-blue));
}

.bet-period-info h2 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 8px;
}

.bet-period-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.bet-period-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.bet-countdown {
    text-align: right;
}

.countdown-compact {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: 2px;
}

.login-warning {
    padding: 14px 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--accent-gold);
}

.login-warning a {
    color: var(--accent-gold-light);
    font-weight: 700;
    text-decoration: underline;
}

/* Bet Type Tabs */
.bet-type-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.bet-type-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.bet-type-tab.active {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #000;
}

.bet-type-tab:hover:not(.active) {
    color: var(--text-primary);
}

/* Bet Panels */
.bet-panel {
    display: none;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.bet-panel.active {
    display: block;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.odds-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.odds-display strong {
    color: var(--accent-gold);
    font-size: 1rem;
}

/* Number Grid */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
}

.num-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.num-btn.num-red { background: rgba(239, 68, 68, 0.2); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.num-btn.num-blue { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.num-btn.num-green { background: rgba(34, 197, 94, 0.2); color: #22c55e; border-color: rgba(34, 197, 94, 0.3); }

.num-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.num-btn.num-red:hover, .num-btn.num-red.selected { background: #ef4444; color: #fff; border-color: #ef4444; box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
.num-btn.num-blue:hover, .num-btn.num-blue.selected { background: #3b82f6; color: #fff; border-color: #3b82f6; box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
.num-btn.num-green:hover, .num-btn.num-green.selected { background: #22c55e; color: #fff; border-color: #22c55e; box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }

/* Option Grid (big/small, odd/even, color) */
.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.option-btn {
    padding: 30px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.option-btn:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

.option-btn.selected {
    border-color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
}

.option-btn.color-red.selected { border-color: #ef4444; background: rgba(239, 68, 68, 0.15); }
.option-btn.color-blue.selected { border-color: #3b82f6; background: rgba(59, 130, 246, 0.15); }
.option-btn.color-green.selected { border-color: #22c55e; background: rgba(34, 197, 94, 0.15); }

.option-label {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.option-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Zodiac Bet Grid */
.zodiac-bet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.zodiac-btn {
    padding: 16px 10px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.zodiac-btn:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

.zodiac-btn.selected {
    border-color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
}

.zodiac-btn .zodiac-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 6px;
}

.zodiac-btn .zodiac-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Bet Submit Bar */
.bet-submit-bar {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.bet-selected {
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.selected-label {
    color: var(--text-muted);
}

.selected-value {
    font-weight: 700;
    color: var(--accent-gold);
}

.bet-amount-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.amount-input-wrap {
    flex: 1;
    min-width: 180px;
}

.amount-input-wrap label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.amount-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}

.amount-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.quick-amounts-row {
    display: flex;
    gap: 6px;
}

.quick-amt {
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.85rem;
}

.quick-amt:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.bet-potential {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.bet-potential strong {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    color: #22c55e;
}

.btn-bet-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-bet-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

.btn-bet-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* My Bets Section */
.my-bets-section {
    margin-bottom: 40px;
}

.my-bets-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.my-bet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.my-bet-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.my-bet-type {
    padding: 3px 8px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.my-bet-value {
    font-weight: 600;
    color: var(--text-primary);
}

.my-bet-amount {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Bet Main Section */
.bet-main-section {
    padding-top: 120px;
}

/* ============================================
   Betting Page Responsive
   ============================================ */
@media (max-width: 768px) {
    .bet-main-section {
        padding-top: 76px;
    }

    .user-info-card {
        flex-direction: column;
        text-align: center;
    }

    .user-actions {
        margin-left: 0;
    }

    .bet-period-card {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .bet-countdown {
        text-align: center;
    }

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

    .number-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .bet-amount-row {
        flex-direction: column;
    }

    .quick-amounts-row {
        width: 100%;
    }

    .quick-amt {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .number-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

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

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

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

    .auth-card {
        padding: 24px;
    }
}

/* ============================================
   Mobile Bottom Navigation
   ============================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-bottom-nav .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s ease;
    padding: 6px 0;
    position: relative;
}

.mobile-bottom-nav .bottom-nav-item.active {
    color: var(--accent-purple);
}

.mobile-bottom-nav .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.bottom-nav-icon {
    font-size: 20px;
    line-height: 1;
}

.bottom-nav-label {
    font-size: 0.68rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* 隐藏顶部导航链接，由底部导航栏替代 */
    .nav {
        display: none;
    }

    /* 隐藏汉堡按钮（不需要了） */
    .mobile-menu-btn {
        display: none !important;
    }

    /* 缩小 header */
    .header-inner {
        height: 56px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .logo-icon {
        font-size: 22px;
    }

    /* 缩小 section 顶部间距 */
    .section {
        padding: 80px 0 40px;
    }

    .section:first-of-type {
        padding-top: 80px;
    }

    .section-header {
        margin-bottom: 24px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    /* container 间距 */
    .container {
        padding: 0 16px;
    }

    /* 给页面底部留出导航栏的空间 */
    body {
        padding-bottom: 70px;
    }

    /* 手机端隐藏浮动机器人按钮（底部导航已有入口） */
    .robot-chat-bubble {
        display: none;
    }

    /* 余额显示优化 */
    .header-balance {
        display: flex !important;
    }

    .balance-badge {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    /* bet page 调整 */
    .bet-period-card {
        padding: 16px;
    }

    .bet-type-tabs {
        gap: 4px;
        flex-wrap: wrap;
    }

    .bet-type-tab {
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    .bet-submit-bar {
        padding: 16px;
    }
}

/* ============================================
   Robot Chat Widget
   ============================================ */

/* 浮动气泡按钮 */
.robot-chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4), 0 0 0 0 rgba(139, 92, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: robotPulse 2s infinite;
}

.robot-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6);
}

.robot-chat-bubble.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.robot-bubble-icon {
    font-size: 28px;
    line-height: 1;
}

@keyframes robotPulse {
    0% { box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4), 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4), 0 0 0 12px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4), 0 0 0 0 rgba(139, 92, 246, 0); }
}

/* 聊天窗口 */
.robot-chat-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 520px;
    background: rgba(26, 34, 53, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0) translateY(20px);
    opacity: 0;
    transform-origin: bottom right;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.robot-chat-box.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* 聊天头部 */
.robot-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.robot-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.robot-avatar {
    font-size: 24px;
    line-height: 1;
}

.robot-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.robot-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: statusBlink 2s infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.robot-chat-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.robot-chat-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* 消息区域 */
.robot-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}

.robot-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.robot-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.robot-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 2px;
}

/* 消息气泡 */
.robot-msg {
    display: flex;
    gap: 8px;
    max-width: 85%;
    animation: msgSlideIn 0.3s ease;
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.robot-msg-bot {
    align-self: flex-start;
}

.robot-msg-user {
    align-self: flex-end;
}

.robot-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.robot-msg-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.robot-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    word-break: break-word;
}

.robot-msg-bot .robot-msg-bubble {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--text-primary);
    border-top-left-radius: 4px;
}

.robot-msg-user .robot-msg-bubble {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    border-top-right-radius: 4px;
}

.robot-msg-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0 4px;
}

.robot-msg-user .robot-msg-time {
    text-align: right;
}

/* 输入区域 */
.robot-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    background: rgba(17, 24, 39, 0.6);
}

.robot-chat-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(26, 34, 53, 0.8);
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s;
    font-family: 'Noto Sans SC', sans-serif;
}

.robot-chat-input:focus {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.robot-chat-input::placeholder {
    color: var(--text-muted);
}

.robot-chat-send {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: 'Noto Sans SC', sans-serif;
}

.robot-chat-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.robot-chat-send:active {
    transform: translateY(0);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .robot-chat-box {
        bottom: 60px;
        right: 0;
        left: 0;
        width: 100%;
        height: calc(100% - 60px);
        border-radius: 16px 16px 0 0;
        max-height: calc(100dvh - 60px);
        transform-origin: bottom center;
    }

    .robot-chat-box.open {
        border-radius: 16px 16px 0 0;
    }
}

/* ============ 快捷按钮栏 ============ */
.robot-chat-quick-bar {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    scrollbar-width: none;
}

.robot-chat-quick-bar::-webkit-scrollbar {
    display: none;
}

.robot-quick-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans SC', sans-serif;
    white-space: nowrap;
}

.robot-quick-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-1px);
}

.robot-quick-btn:active {
    transform: translateY(0);
}

.robot-quick-btn.robot-quick-predict {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.1));
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--accent-gold-light);
    font-weight: 600;
}

.robot-quick-btn.robot-quick-predict:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(251, 191, 36, 0.2));
    border-color: rgba(245, 158, 11, 0.7);
}

/* ============ 预测一键下注按钮 ============ */
.robot-predict-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.robot-predict-bet-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans SC', sans-serif;
}

.robot-predict-bet-btn:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(34, 197, 94, 0.2);
}

.robot-predict-bet-btn:active {
    transform: translateY(0);
}

/* Light theme adjustments */
[data-theme="light"] .robot-chat-quick-bar {
    background: #f1f5f9;
}

[data-theme="light"] .robot-quick-btn {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
    color: #4c1d95;
}

[data-theme="light"] .robot-quick-btn.robot-quick-predict {
    color: #b45309;
}

[data-theme="light"] .robot-predict-actions {
    border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .robot-predict-bet-btn {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
}
