@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f0f4f8;
    --bg-secondary: #e2e8f0;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(0,0,0,0.1);
    --shadow-lg: rgba(0,0,0,0.15);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --modal-bg: #ffffff;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #fbbf24;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow: rgba(0,0,0,0.3);
    --shadow-lg: rgba(0,0,0,0.4);
    --card-bg: #1e293b;
    --input-bg: #0f172a;
    --modal-bg: #1e293b;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* Navbar */
.navbar {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 1rem;
}

[data-theme="dark"] .navbar {
    background: rgba(30, 41, 59, 0.95);
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-brand svg {
    color: var(--secondary);
}

.navbar-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

/* User Avatar in Navbar */
.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.nav-avatar:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Dark Mode Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(15,23,42,0.8), rgba(30,64,175,0.6)),
                url('https://images.unsplash.com/photo-1730739463889-34c7279277a9?w=1920') center/cover;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(37,99,235,0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
}

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

.btn-google {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-google:hover {
    background: #f8f8f8;
}

[data-theme="dark"] .btn-google {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border);
}

/* Stats Bar */
.stats-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ========== WEEKLY WINNERS ========== */
.weekly-winners-section {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
}

.weekly-winners-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.weekly-winners-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.weekly-winners-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding-bottom: 0.5rem;
}

.weekly-winners-scroll::-webkit-scrollbar {
    height: 5px;
}
.weekly-winners-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.weekly-winners-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.weekly-winners-track {
    display: flex;
    gap: 1rem;
    padding: 0.25rem 0;
}

/* Winner Card - Revealed */
.winner-card {
    min-width: 240px;
    max-width: 240px;
    border-radius: 14px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.winner-card:hover {
    transform: translateY(-3px);
}

.winner-card.revealed {
    background: linear-gradient(135deg, #fef9c3 0%, #fde68a 50%, #fbbf24 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .winner-card.revealed {
    background: linear-gradient(135deg, #78350f 0%, #92400e 50%, #a16207 100%);
    border-color: #d97706;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.3);
}

.winner-card.revealed .winner-card-week {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #92400e;
    margin-bottom: 0.15rem;
}

[data-theme="dark"] .winner-card.revealed .winner-card-week {
    color: #fde68a;
}

.winner-card.revealed .winner-card-dates {
    font-size: 0.72rem;
    color: #a16207;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .winner-card.revealed .winner-card-dates {
    color: #fcd34d;
}

.winner-card.revealed .winner-card-trophy {
    font-size: 2rem;
    margin-bottom: 0.4rem;
    line-height: 1;
}

.winner-card.revealed .winner-card-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #78350f;
    margin-bottom: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .winner-card.revealed .winner-card-name {
    color: #fefce8;
}

.winner-card.revealed .winner-card-prize {
    font-size: 0.78rem;
    font-weight: 600;
    color: #92400e;
    background: rgba(255,255,255,0.5);
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    line-height: 1.4;
}

[data-theme="dark"] .winner-card.revealed .winner-card-prize {
    color: #fef3c7;
    background: rgba(0,0,0,0.25);
}

/* Winner Card - Locked / Upcoming */
.winner-card.locked {
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0.65;
}

.winner-card.locked .winner-card-week {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.winner-card.locked .winner-card-dates {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.winner-card.locked .winner-card-mystery {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
}

.winner-card.locked .winner-card-mystery span {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-secondary);
}

.winner-card.locked .winner-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Current week - slightly highlighted locked card */
.winner-card.current {
    opacity: 0.85;
    border-color: var(--primary);
    border-style: dashed;
    background: var(--surface);
}

.winner-card.current .winner-card-mystery {
    background: rgba(37, 99, 235, 0.12);
}

.winner-card.current .winner-card-mystery span {
    color: var(--primary);
}

.winner-card.current .winner-card-label {
    color: var(--primary);
    font-weight: 700;
}

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

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Match Cards Grid */
.matches-grid,
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Match Card */
.match-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s;
}

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

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.match-status {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.match-status.upcoming {
    background: #dbeafe;
    color: #1d4ed8;
}

[data-theme="dark"] .match-status.upcoming {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.match-status.completed {
    background: #d1fae5;
    color: #059669;
}

[data-theme="dark"] .match-status.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.match-status.live,
.match-status.in_progress {
    background: #fee2e2;
    color: #dc2626;
    animation: pulse-live 2s ease-in-out infinite;
}

[data-theme="dark"] .match-status.live,
[data-theme="dark"] .match-status.in_progress {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.match-status.abandoned {
    background: #fef3c7;
    color: #92400e;
}

[data-theme="dark"] .match-status.abandoned {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.match-status.no_result,
.match-status.no.result {
    background: #f3e8ff;
    color: #7c3aed;
}

[data-theme="dark"] .match-status.no_result,
[data-theme="dark"] .match-status.no.result {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.match-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.team {
    flex: 1;
    text-align: center;
}

.team-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 0.5rem;
    background: var(--surface-hover);
}

.team-short {
    font-weight: 700;
    font-size: 0.95rem;
}

.team-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.vs-badge {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    font-weight: 900;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.match-venue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.match-action {
    width: 100%;
    justify-content: center;
}

/* Countdown Timer */
.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #1e40af;
    background: #dbeafe;
    font-weight: 500;
}

[data-theme="dark"] .countdown-timer {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.countdown-timer.live-timer {
    background: #fee2e2;
    color: #dc2626;
    font-weight: 700;
}

[data-theme="dark"] .countdown-timer.live-timer {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    display: inline-block;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

[data-theme="dark"] .live-dot {
    background: #f87171;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* Forms */
.form-section {
    background: var(--surface-hover);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input, .form-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

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

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
}

/* Leaderboard */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 16px;
    margin-bottom: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.leaderboard-item.rank-1 {
    border-color: #fbbf24;
    box-shadow: 0 4px 15px rgba(251,191,36,0.2);
}

.leaderboard-item.rank-2 {
    border-color: #94a3b8;
}

.leaderboard-item.rank-3 {
    border-color: #f97316;
}

.rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    color: #475569;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    color: white;
}

.rank-badge.default {
    background: var(--surface-hover);
    color: var(--text-secondary);
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 700;
}

.leaderboard-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.leaderboard-score {
    text-align: right;
}

.leaderboard-points {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
}

/* Badges */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.badge-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.badge-card.earned {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(37,99,235,0.15);
}

.badge-card.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.badge-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
}

.badge-name {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.badge-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Streak Display */
.streak-card {
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    text-align: center;
}

.streak-number {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.streak-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Results */
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.result-label {
    color: var(--text-secondary);
}

.result-value {
    font-weight: 600;
}

.diff-positive {
    color: var(--success);
    font-weight: 700;
}

.diff-negative {
    color: var(--danger);
    font-weight: 700;
}

.diff-exact {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 700;
}

/* Auth Forms */
.auth-container {
    max-width: 420px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px var(--shadow-lg);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.analytics-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.analytics-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}

.analytics-chart {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chart-bar {
    flex: 1;
    min-width: 28px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    min-height: 10px;
    transition: all 0.3s;
    position: relative;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-bar-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.chart-bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Prediction History */
.history-item {
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-match {
    flex: 1;
}

.history-match-title {
    font-weight: 600;
}

.history-match-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-score {
    text-align: right;
}

.history-points {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary);
}

.history-max {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
}

[data-theme="dark"] .footer {
    background: #0a0f1a;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

[data-theme="dark"] .modal-overlay {
    background: rgba(0,0,0,0.7);
}

.modal {
    background: var(--modal-bg);
    border-radius: 24px;
    padding: 1.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Admin */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.admin-tab {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    background: var(--surface);
    border: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow-lg);
    min-width: 200px;
    z-index: 50;
    display: none;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--surface-hover);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .navbar-links {
        gap: 0.25rem;
    }
    .navbar-links span {
        display: none;
    }
    .nav-link {
        padding: 0.5rem 0.65rem;
    }
    .navbar-brand {
        font-size: 0.95rem;
    }

    .hero {
        min-height: 35vh;
        padding: 1.5rem 1rem;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 0.95rem;
    }

    .stats-bar {
        padding: 1rem;
    }
    .stats-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
    .stat-value {
        font-size: 1.4rem;
    }

    .container {
        padding: 1rem 0.75rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .matches-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .match-card {
        padding: 1.15rem;
        border-radius: 16px;
    }
    .match-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .match-date {
        font-size: 0.78rem;
    }
    .team-logo {
        width: 48px;
        height: 48px;
    }
    .team-short {
        font-size: 0.85rem;
    }
    .team-name {
        font-size: 0.7rem;
    }
    .vs-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
    .match-venue {
        font-size: 0.78rem;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }
    .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
    .form-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .form-section {
        padding: 1rem;
        border-radius: 12px;
    }

    .card {
        padding: 1.15rem;
        border-radius: 16px;
    }

    .modal-overlay {
        padding: 0.5rem;
    }
    .modal {
        margin: 0;
        max-height: 95vh;
        padding: 1.15rem;
        border-radius: 16px;
    }
    .modal-title {
        font-size: 1.1rem;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    .table {
        font-size: 0.8rem;
        min-width: 500px;
    }
    .table th, .table td {
        padding: 0.5rem 0.4rem;
        white-space: nowrap;
    }

    .admin-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }
    .admin-tab {
        white-space: nowrap;
        font-size: 0.85rem;
    }

    .leaderboard-item {
        gap: 0.65rem;
        padding: 0.85rem;
    }
    .leaderboard-name {
        font-size: 0.9rem;
    }
    .leaderboard-stats {
        font-size: 0.75rem;
    }
    .leaderboard-points {
        font-size: 1.2rem;
    }

    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    .btn-sm {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .footer {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }
    
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 30vh;
        padding: 1rem 0.75rem;
    }
    .hero h1 {
        font-size: 1.35rem;
    }
    .hero p {
        font-size: 0.88rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .form-grid-4 {
        grid-template-columns: 1fr !important;
    }

    .team-logo {
        width: 42px;
        height: 42px;
    }
    .vs-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    .team-name {
        display: none;
    }
    .match-card {
        padding: 1rem;
    }

    .navbar-brand svg {
        width: 20px;
        height: 20px;
    }
    .navbar-brand {
        font-size: 0.88rem;
        gap: 0.35rem;
    }

    /* Analytics charts mobile fixes */
    .analytics-chart {
        padding-bottom: 3rem;
        gap: 0.25rem;
    }
    .chart-bar {
        min-width: 20px;
    }
    .chart-bar-label {
        transform: translateX(-50%) rotate(-45deg);
        transform-origin: top center;
        bottom: -28px;
        font-size: 0.55rem;
    }

    .rank-badge {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .badge-card {
        padding: 1rem;
    }
    
    .badge-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
}

/* ========== SITE FOOTER ========== */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding: 3rem 1.5rem 0;
}

[data-theme="dark"] .site-footer {
    background: #0a0f1a;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 3rem;
    padding-bottom: 2rem;
}

.footer-brand p {
    max-width: 280px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-brand p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr 1fr;
    }
    
    .site-footer {
        padding: 2rem 1rem 0;
    }
}

/* ========== MOBILE HAMBURGER MENU ========== */

.navbar-right {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-toggle:hover {
    background: var(--surface-hover);
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
    margin: auto;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Menu Panel */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--surface);
    z-index: 999;
    padding: 1rem;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--primary);
    color: white;
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.mobile-menu-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.mobile-menu-user .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.mobile-menu-user .user-info {
    flex: 1;
}

.mobile-menu-user .user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-menu-user .user-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }
    
    .mobile-menu-toggle,
    .mobile-menu-overlay,
    .mobile-menu {
        display: block;
    }
    
    .navbar-container {
        padding: 0 0.5rem;
    }
    
    .navbar-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* ========== SCORE BREAKDOWN MODAL ========== */

.breakdown-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.breakdown-modal.active {
    display: flex;
}

.breakdown-content {
    background: var(--surface);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

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

.breakdown-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.breakdown-body {
    padding: 1.25rem;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-label {
    display: flex;
    flex-direction: column;
}

.breakdown-label span {
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-label small {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.breakdown-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown-points {
    font-weight: 700;
    font-size: 1.1rem;
}

.breakdown-points.correct {
    color: var(--success);
}

.breakdown-points.partial {
    color: var(--warning);
}

.breakdown-points.incorrect {
    color: var(--danger);
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 12px;
    margin-top: 1rem;
    color: white;
}

.breakdown-total .label {
    font-weight: 600;
}

.breakdown-total .score {
    font-size: 1.5rem;
    font-weight: 800;
}

/* ========== REFERRAL SECTION ========== */

.referral-card {
    background: linear-gradient(135deg, #059669, #10b981);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.referral-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.referral-code-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.referral-code {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    font-family: 'Outfit', monospace;
}

.copy-btn {
    background: white;
    color: #059669;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    transform: scale(1.05);
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.referral-stat {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.referral-stat .value {
    font-size: 1.75rem;
    font-weight: 800;
}

.referral-stat .label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ========== PWA INSTALL PROMPT ========== */

.pwa-install-prompt {
    display: none;
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: var(--surface);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-install-prompt.show {
    display: block;
}

.pwa-prompt-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pwa-prompt-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pwa-prompt-text {
    flex: 1;
}

.pwa-prompt-text h4 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

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

.pwa-prompt-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pwa-install-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-install-btn.primary {
    background: var(--primary);
    color: white;
}

.pwa-install-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========== NOTIFICATION BADGE ========== */

.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--surface);
}

/* ========== SPLIT PREDICTION WINDOW ========== */

.prediction-window-notice {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #78350f;
}

.prediction-window-notice i {
    margin-right: 0.5rem;
}

.prediction-window-notice .times {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.window-closed {
    opacity: 0.5;
    pointer-events: none;
}

.window-closed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* ========== LIVE SCORES ON MATCH CARD ========== */

/* ========== ADMIN STYLES ========== */

.admin-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.admin-stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.admin-stat-card .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.admin-table-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.admin-btn.edit {
    background: var(--primary);
    color: white;
}

.admin-btn.delete {
    background: var(--danger);
    color: white;
}

.admin-btn.export {
    background: var(--success);
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.pagination-info {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========== ADDITIONAL RESPONSIVE ========== */

@media (max-width: 768px) {
    .admin-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .referral-card {
        padding: 1.25rem;
    }
    
    .referral-code {
        font-size: 1.25rem;
    }
    
    .breakdown-content {
        margin: 0.5rem;
    }
}

@media (max-width: 480px) {
    .pwa-prompt-content {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .referral-stats {
        grid-template-columns: 1fr;
    }
}



/* ========== Floating Community Button ========== */
.community-floating-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.community-floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.community-floating-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: communitySlideUp 0.25s ease-out;
}

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

.community-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.community-menu-item:hover {
    transform: scale(1.05);
}

.community-menu-item.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.community-menu-item.telegram {
    background: linear-gradient(135deg, #2AABEE, #0088CC);
}

.community-menu-item i {
    font-size: 1.2rem;
}

/* Post-prediction community popup */
.community-popup-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.community-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.15s;
}

.community-popup-btn:hover {
    transform: scale(1.03);
}

.community-popup-btn.whatsapp {
    background: #25D366;
}

.community-popup-btn.telegram {
    background: #2AABEE;
}

@media (max-width: 480px) {
    .community-floating-wrapper {
        bottom: 16px;
        right: 16px;
    }
    .community-floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}


/* ========== AI Chatbot Widget ========== */
#chatbot-widget { position: fixed; bottom: 24px; right: 24px; z-index: 1001; }
#chatbot-bubble { width: 56px; height: 56px; border-radius: 50%; border: none; background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; font-size: 1.4rem; cursor: pointer; box-shadow: 0 4px 20px rgba(139,92,246,0.5); transition: transform 0.2s, box-shadow 0.2s; display: flex; align-items: center; justify-content: center; position: absolute; bottom: 0; right: 0; }
#chatbot-bubble:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(139,92,246,0.6); }
#chatbot-bubble::after { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(139,92,246,0.5); animation: chatPulse 2s ease-out infinite; }
@keyframes chatPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
#chatbot-window { position: absolute; bottom: 70px; right: 0; width: 370px; max-height: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; animation: chatSlideUp 0.3s ease-out; }
@keyframes chatSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
#chatbot-header { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; padding: 0.85rem 1rem; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
#chatbot-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; min-height: 250px; max-height: 350px; -webkit-overflow-scrolling: touch; }
#chatbot-messages::-webkit-scrollbar { width: 4px; }
#chatbot-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.chat-msg { display: flex; gap: 0.5rem; align-items: flex-start; max-width: 90%; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg.bot { align-self: flex-start; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }
.chat-bubble { padding: 0.6rem 0.9rem; border-radius: 16px; font-size: 0.85rem; line-height: 1.5; word-wrap: break-word; }
.chat-msg.bot .chat-bubble { background: var(--bg-secondary); color: var(--text-primary); border-bottom-left-radius: 4px; }
.chat-msg.user .chat-bubble { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; border-bottom-right-radius: 4px; }
.typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-secondary); animation: typingBounce 1.4s infinite ease-in-out; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
#chatbot-suggestions { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 0 0.5rem; }
.chat-suggestion { padding: 0.35rem 0.75rem; border-radius: 50px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font-size: 0.75rem; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.chat-suggestion:hover { background: var(--primary); color: white; border-color: var(--primary); }
#chatbot-input-area { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
#chatbot-input { flex: 1; padding: 0.6rem 1rem; border: 1px solid var(--border); border-radius: 50px; background: var(--input-bg); color: var(--text-primary); font-size: 0.85rem; outline: none; }
#chatbot-input:focus { border-color: #8b5cf6; }
#chatbot-send-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; transition: transform 0.15s; flex-shrink: 0; }
#chatbot-send-btn:hover { transform: scale(1.1); }
#chatbot-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
@media (max-width: 480px) {
    #chatbot-widget { bottom: 16px; right: 16px; }
    #chatbot-bubble { width: 50px; height: 50px; font-size: 1.2rem; }
    #chatbot-window { width: calc(100vw - 32px); max-height: 70vh; bottom: 64px; right: 0; border-radius: 16px; }
    #chatbot-messages { min-height: 200px; max-height: 45vh; }
}
