/* SwiPredict Mobile App Styles */
/* Shared across all pages for consistent app-like experience */

/* ========== CSS Variables (inherit from page or set defaults) ========== */
:root {
    --bottom-nav-height: 75px;
    --bottom-nav-bg: rgba(12, 12, 29, 0.98);
    --bottom-nav-border: rgba(139, 92, 246, 0.2);
    --nav-item-active: #a855f7;
    --nav-item-inactive: rgba(255, 255, 255, 0.4);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* Native app detection - Capacitor runs in standalone mode */
@media all and (display-mode: standalone) {
    :root {
        --bottom-nav-extra: 16px;
    }
    .mobile-bottom-nav {
        padding-bottom: calc(var(--safe-area-bottom) + var(--bottom-nav-extra, 0px)) !important;
        height: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--bottom-nav-extra, 0px)) !important;
    }
}

/* ========== Bottom Navigation Bar ========== */
.mobile-bottom-nav {
    display: none !important;
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom)) !important;
    padding-bottom: var(--safe-area-bottom) !important;
    padding-top: 8px !important;
    background: linear-gradient(180deg, rgba(12, 12, 29, 0.95) 0%, rgba(12, 12, 29, 0.98) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-top: 1px solid rgba(139, 92, 246, 0.25) !important;
    border-bottom: none !important;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4), 0 -1px 0 rgba(255, 255, 255, 0.05) inset !important;
    z-index: 9999 !important;
    justify-content: space-around !important;
    align-items: flex-start !important;
    flex-direction: row !important;
}

/* Subtle top glow line */
.mobile-bottom-nav::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 20% !important;
    right: 20% !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent) !important;
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 8px 16px !important;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    transition: all 0.25s ease !important;
    min-width: 64px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
}

.mobile-bottom-nav a:not(.nav-play):hover,
.mobile-bottom-nav a:not(.nav-play).active,
.mobile-bottom-nav button:not(.nav-play).active {
    color: rgba(255, 255, 255, 0.95) !important;
}

.mobile-bottom-nav a:not(.nav-play).active::after,
.mobile-bottom-nav button:not(.nav-play).active::after {
    content: '' !important;
    position: absolute !important;
    bottom: 4px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 4px !important;
    height: 4px !important;
    background: #a855f7 !important;
    border-radius: 50% !important;
    box-shadow: 0 0 8px #a855f7 !important;
}

.mobile-bottom-nav a svg,
.mobile-bottom-nav button svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2 !important;
    transition: all 0.25s ease !important;
    fill: none !important;
}

.mobile-bottom-nav a.active svg,
.mobile-bottom-nav button.active svg {
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.6)) !important;
}

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

.mobile-bottom-nav a.active svg {
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

/* Special styling for center Play button */
.mobile-bottom-nav .nav-play {
    position: relative !important;
    margin-top: -28px !important;
    z-index: 10 !important;
    padding: 0 !important;
    min-width: auto !important;
}

.mobile-bottom-nav .nav-play span {
    margin-top: 5px !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.mobile-bottom-nav .nav-play .nav-icon-wrap {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    background: #0c0c1d !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 
        0 4px 24px rgba(139, 92, 246, 0.4),
        0 0 0 3px rgba(139, 92, 246, 0.3),
        0 0 40px rgba(139, 92, 246, 0.2),
        inset 0 0 20px rgba(139, 92, 246, 0.1) !important;
    border: 2px solid rgba(139, 92, 246, 0.6) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

.mobile-bottom-nav .nav-play:active .nav-icon-wrap {
    transform: scale(0.95) !important;
}

.mobile-bottom-nav .nav-play.active .nav-icon-wrap {
    box-shadow: 
        0 4px 30px rgba(139, 92, 246, 0.6),
        0 0 0 3px rgba(139, 92, 246, 0.5),
        0 0 60px rgba(139, 92, 246, 0.4),
        inset 0 0 30px rgba(139, 92, 246, 0.2) !important;
    border-color: rgba(168, 85, 247, 0.8) !important;
}

.mobile-bottom-nav .nav-play .play-logo {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    object-fit: contain !important;
    transition: all 0.3s ease !important;
}

.mobile-bottom-nav .nav-play.active .play-logo {
    transform: scale(1.05) !important;
}

/* ========== Play Menu Overlay ========== */
.play-menu-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
}

.play-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ========== Play Menu Fan ========== */
.play-menu-fan {
    position: fixed !important;
    bottom: 95px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    width: 300px !important;
    height: 220px !important;
    pointer-events: none !important;
}

.play-menu-title {
    position: absolute !important;
    top: -90px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: 4px !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease 0.1s !important;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.8), 0 0 60px rgba(139, 92, 246, 0.4) !important;
    background: linear-gradient(90deg, #00d4ff, #8b5cf6, #ec4899) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.play-menu-fan.active .play-menu-title {
    opacity: 1 !important;
}

.play-menu-fan.active {
    pointer-events: auto !important;
}

/* Hide stats bar when play menu is open */
.play-menu-fan.active ~ .mobile-stats-bar,
body:has(.play-menu-fan.active) .mobile-stats-bar,
body:has(.play-menu-fan.active) .mobile-fixed-top {
    display: none !important;
}

.fan-item {
    position: absolute !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    opacity: 0 !important;
    transform: scale(0.3) !important;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.play-menu-fan.active .fan-item {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* Fan positions - curved arc from left to right */
.fan-item.fan-1 {
    left: 10px !important;
    bottom: 20px !important;
    transition-delay: 0s !important;
}

.fan-item.fan-2 {
    left: 45px !important;
    bottom: 120px !important;
    transition-delay: 0.05s !important;
}

.fan-item.fan-3 {
    right: 45px !important;
    bottom: 120px !important;
    transition-delay: 0.05s !important;
}

.fan-item.fan-4 {
    right: 10px !important;
    bottom: 20px !important;
    transition-delay: 0s !important;
}

.fan-icon {
    width: 58px !important;
    height: 58px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(12, 12, 29, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 2px solid !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Inner glow effect */
.fan-icon::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 14px !important;
    opacity: 0.15 !important;
    transition: opacity 0.2s ease !important;
}

.fan-item:active .fan-icon {
    transform: scale(0.92) !important;
}

.fan-item:active .fan-icon::before {
    opacity: 0.3 !important;
}

.fan-icon svg {
    width: 26px !important;
    height: 26px !important;
    position: relative !important;
    z-index: 1 !important;
}

.fan-item span {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
    white-space: nowrap !important;
}

/* Game-specific glass styles with colored borders and glows */

/* Quick Play - Cyan */
.fan-item[data-mode="quickplay"] .fan-icon {
    border-color: rgba(0, 212, 255, 0.6) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), inset 0 0 20px rgba(0, 212, 255, 0.1) !important;
}
.fan-item[data-mode="quickplay"] .fan-icon::before {
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.4), transparent 70%) !important;
}
.fan-item[data-mode="quickplay"] .fan-icon svg {
    color: #00d4ff !important;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6)) !important;
}

/* Tourney - Purple */
.fan-item[data-mode="tourney"] .fan-icon {
    border-color: rgba(168, 85, 247, 0.6) !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3), inset 0 0 20px rgba(168, 85, 247, 0.1) !important;
}
.fan-item[data-mode="tourney"] .fan-icon::before {
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.4), transparent 70%) !important;
}
.fan-item[data-mode="tourney"] .fan-icon svg {
    color: #a855f7 !important;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6)) !important;
}

/* Journey - Amber/Gold */
.fan-item[data-mode="journey"] .fan-icon {
    border-color: rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3), inset 0 0 20px rgba(245, 158, 11, 0.1) !important;
}
.fan-item[data-mode="journey"] .fan-icon::before {
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.4), transparent 70%) !important;
}
.fan-item[data-mode="journey"] .fan-icon svg {
    color: #f59e0b !important;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6)) !important;
}

/* Trivia - Green */
.fan-item[data-mode="trivia"] .fan-icon {
    border-color: rgba(34, 197, 94, 0.6) !important;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3), inset 0 0 20px rgba(34, 197, 94, 0.1) !important;
}
.fan-item[data-mode="trivia"] .fan-icon::before {
    background: radial-gradient(circle at center, rgba(34, 197, 94, 0.4), transparent 70%) !important;
}
.fan-item[data-mode="trivia"] .fan-icon svg {
    color: #22c55e !important;
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6)) !important;
}

/* Points badge on profile */
.mobile-bottom-nav .nav-points-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ========== Mobile Top Header ========== */
.mobile-top-header {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
    background: rgba(12, 12, 29, 0.98) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    flex-direction: column !important;
}

/* Main header row - logo + text left, buttons right */
.mobile-header-main {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 16px !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15) !important;
}

/* Logo + text */
.mobile-nav-logo {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
}

.mobile-nav-logo img {
    height: 36px !important;
    width: 36px !important;
    border-radius: 8px !important;
}

.mobile-nav-logo .logo-text {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1 !important;
}

/* Right side buttons */
.mobile-header-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.mobile-header-main .header-btn,
.mobile-header-right .header-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.mobile-header-main .header-btn:active,
.mobile-header-right .header-btn:active {
    transform: scale(0.95) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.mobile-header-main .header-btn svg,
.mobile-header-right .header-btn svg {
    width: 20px !important;
    height: 20px !important;
}

/* Mobile profile icon in header */
.mobile-header-right .mobile-profile-wrapper {
    position: relative !important;
}

.mobile-header-right .mobile-profile-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: pointer !important;
}

.mobile-header-right .mobile-profile-icon svg {
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.5 !important;
}

.mobile-header-right .mobile-profile-dropdown {
    display: none;
    position: fixed !important;
    top: calc(120px + env(safe-area-inset-top, 0px)) !important;
    right: 16px !important;
    background: rgba(12, 12, 29, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    min-width: 140px !important;
    z-index: 999999 !important;
}

.mobile-header-right .mobile-profile-dropdown.active {
    display: block !important;
}

.mobile-header-right .mobile-profile-dropdown a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

.mobile-header-right .mobile-profile-dropdown a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.mobile-header-right .mobile-profile-dropdown svg {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    fill: none !important;
}

.mobile-header-right .mobile-profile-dropdown button {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
}

.mobile-header-right .mobile-profile-dropdown button:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Mobile Fixed Top Container - stacks header + stats + local bar */
.mobile-fixed-top {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10001 !important;
    flex-direction: column !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    background: #0c0c1d !important;
}

/* When container shows on mobile, show all children */
@media (max-width: 768px) {
    .mobile-fixed-top .mobile-game-header,
    .mobile-fixed-top .mobile-stats-bar,
    .mobile-fixed-top .mobile-local-bar {
        display: flex !important;
    }
}

/* Stats bar - inside flex container, parent handles visibility */
.mobile-stats-bar {
    display: none; /* Hidden by default on desktop */
    align-items: center !important;
    padding: 8px 12px !important;
    background: #0c0c1d !important;
    border-top: none !important;
    border-bottom: none !important;
    gap: 0 !important;
    box-shadow: none !important;
}

/* Only show on mobile */
@media (max-width: 768px) {
    .mobile-stats-bar {
        display: flex !important;
    }
}

.mobile-stats-bar .stats-section {
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    flex: 2 !important;
}

.mobile-stats-bar .local-section {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    border-left: 1px solid rgba(139, 92, 246, 0.2) !important;
    cursor: pointer !important;
    padding: 0 6px !important;
}

/* Pin toggle - centered group: track + labels side by side */
.mobile-stats-bar .pin-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Pin track - the toggle itself with pin icon as knob */
.mobile-stats-bar .pin-track {
    width: 42px !important;
    height: 28px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    position: relative !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.mobile-stats-bar .pin-toggle.active .pin-track {
    background: rgba(0, 212, 255, 0.15) !important;
    border-color: rgba(0, 212, 255, 0.25) !important;
}

/* Pin knob - the sliding pin icon */
.mobile-stats-bar .pin-knob {
    position: absolute !important;
    top: 1px !important;
    left: 1px !important;
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3)) !important;
}
.mobile-stats-bar .pin-toggle.active .pin-knob {
    transform: translateX(14px) !important;
}
.mobile-stats-bar .pin-knob svg {
    width: 18px !important;
    height: 18px !important;
    transition: all 0.3s !important;
}
.mobile-stats-bar .pin-knob svg path {
    fill: rgba(255, 255, 255, 0.2) !important;
    stroke: rgba(255, 255, 255, 0.35) !important;
    stroke-width: 1.5 !important;
}
.mobile-stats-bar .pin-knob svg circle {
    fill: rgba(255, 255, 255, 0.25) !important;
    stroke: rgba(255, 255, 255, 0.35) !important;
    stroke-width: 1.5 !important;
}
.mobile-stats-bar .pin-toggle.active .pin-knob svg path {
    fill: rgba(0, 212, 255, 0.4) !important;
    stroke: #00d4ff !important;
}
.mobile-stats-bar .pin-toggle.active .pin-knob svg circle {
    fill: rgba(168, 85, 247, 0.5) !important;
    stroke: #a855f7 !important;
}

/* Labels - LOCAL + city stacked */
.mobile-stats-bar .pin-labels {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
}
.mobile-stats-bar .pin-labels .local-text {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.35) !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    transition: all 0.3s !important;
    line-height: 1.1 !important;
}
.mobile-stats-bar .pin-toggle.active .pin-labels .local-text {
    background: linear-gradient(135deg, #00d4ff, #a855f7) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}
.mobile-stats-bar .pin-labels .city-text {
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.3) !important;
    transition: color 0.3s !important;
    line-height: 1.1 !important;
}
.mobile-stats-bar .pin-toggle.active .pin-labels .city-text {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Kill any sidebar ::after ghost toggle */
.mobile-stats-bar .local-toggle-switch::after {
    display: none !important;
    content: none !important;
}

/* Local predictions bar - inside flex container, parent handles visibility */
.mobile-local-bar {
    display: flex;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(168, 85, 247, 0.06)) !important;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2) !important;
    cursor: pointer !important;
    width: 100% !important;
}

.mobile-stats-bar .stat-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
}

.mobile-stats-bar .stat-icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
}

.mobile-stats-bar .stat-icon.flame-icon {
    color: #a855f7 !important;
    width: 22px !important;
    height: 22px !important;
    margin-right: 2px !important;
    overflow: visible !important;
}

.mobile-stats-bar .stat-icon.sp-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
}

.mobile-stats-bar .stat-icon.accuracy-icon {
    color: #00d4ff !important;
}

.mobile-stats-bar .stat-item {
    overflow: visible !important;
}

.mobile-stats-bar .stat-item:first-child {
    padding-left: 0px !important;
}

.mobile-stats-bar .stat-value {
    font-size: 18px !important;
    font-weight: 700 !important;
    font-family: 'Space Grotesk', sans-serif !important;
    line-height: 1 !important;
}

.mobile-stats-bar .stat-value.streak {
    color: #a855f7 !important;
}

.mobile-stats-bar .stat-value.points {
    color: #f59e0b !important;
    margin-top: 2px !important;
}

.mobile-stats-bar .stat-value.accuracy {
    color: #00d4ff !important;
}

.mobile-stats-bar .stat-label {
    font-size: 9px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.mobile-stats-bar .stat-label .sp-icon {
    width: 14px !important;
    height: 14px !important;
    vertical-align: middle !important;
}

/* ========== Page Content Adjustments ========== */
@media (max-width: 768px) {
    /* Show mobile nav elements */
    .mobile-bottom-nav {
        display: flex !important;
    }
    
    .mobile-top-header {
        display: flex !important;
    }
    
    /* Hide desktop nav - but not page-specific mobile headers */
    body > nav:not(.mobile-bottom-nav):not(.mobile-top-header):not(.mobile-game-header) {
        display: none !important;
    }
    
    /* Body padding for header + stats bar + bottom nav */
    body {
        padding-top: calc(90px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* Pages with their own header (like play.html) override this */
    body.has-custom-header {
        padding-top: 0 !important;
    }
    
    body.has-custom-header .mobile-top-header {
        display: none !important;
    }
    
    /* Hide disclaimer on mobile - use hamburger menu instead */
    .disclaimer-banner {
        display: none !important;
    }
    
    /* Hide back to MP button on mobile */
    .back-to-mp-fixed {
        display: none !important;
    }
}

/* ========== Hamburger Menu (for secondary items) ========== */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* ========== Touch-friendly adjustments ========== */
@media (max-width: 768px) {
    /* Larger tap targets */
    button, a, .clickable {
        min-height: 44px;
    }
    
    /* Remove hover states on touch */
    @media (hover: none) {
        button:hover, a:hover {
            transform: none !important;
        }
    }
}

/* ========== Smooth transitions ========== */
.mobile-bottom-nav a,
.mobile-top-header,
.mobile-menu-btn {
    transition: all 0.2s ease;
}

/* ========== Hide scrollbar but allow scroll ========== */
@media (max-width: 768px) {
    body::-webkit-scrollbar {
        display: none;
    }
    body {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* ========== Crystal Ball ========== */
/* OLD CRYSTAL BALL STYLES - COMMENTED OUT - using crystal-ball-orb.css instead
.crystal-ball-zone {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 280px !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-bottom: 10px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.4s ease, visibility 0.4s ease !important;
    pointer-events: none !important;
}

.crystal-ball-zone.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.crystal-ball-zone.greyed {
    opacity: 0.15 !important;
    filter: saturate(0) brightness(0.4) !important;
    pointer-events: none !important;
    transition: opacity 1s 0.5s, filter 1s 0.5s, visibility 0s !important;
}

/* Entrance flash */
.cb-entrance-flash {
    position: fixed !important;
    inset: 0 !important;
    background: radial-gradient(circle at 50% 60%, rgba(0,212,255,0.4), rgba(168,85,247,0.3), transparent 70%) !important;
    opacity: 0 !important;
    z-index: 10000 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}
.cb-entrance-flash.active {
    opacity: 1 !important;
    animation: cbFlashPulse 0.6s ease-out forwards !important;
}
@keyframes cbFlashPulse {
    0% { opacity: 0; transform: scale(0.8); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.5); }
}

.cb-teaser {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: rgba(255,255,255,0.6) !important;
    text-align: center !important;
    margin-bottom: 6px !important;
    line-height: 1.4 !important;
    min-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.5s !important;
    text-shadow: 0 0 12px rgba(0,212,255,0.3) !important;
}

.cb-swipe-hint {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 6px !important;
    opacity: 0.7 !important;
    animation: cbArrowPulse 2s ease-in-out infinite !important;
}

.cb-swipe-hint.hide {
    opacity: 0 !important;
    transition: opacity 0.3s !important;
}

.cb-swipe-hint span.arrow {
    color: #00d4ff !important;
    font-size: 20px !important;
    transition: all 0.3s !important;
}

.cb-swipe-hint span.arrow.pulse {
    color: #facc15 !important;
    transform: scale(1.5) !important;
    text-shadow: 0 0 10px rgba(250,204,21,0.5) !important;
}

.cb-swipe-hint span.label {
    font-size: 11px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: rgba(0,212,255,0.7) !important;
    font-weight: 700 !important;
}

@keyframes cbArrowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

/* Charge bar */
.cb-charge-bar {
    width: 160px !important;
    height: 5px !important;
    background: rgba(255,255,255,0.08) !important;
    border-radius: 3px !important;
    margin-bottom: 10px !important;
    overflow: hidden !important;
    position: relative !important;
    transition: opacity 0.3s !important;
}
.cb-charge-bar.hide { opacity: 0 !important; }
.cb-charge-fill {
    height: 100% !important;
    width: 0% !important;
    background: linear-gradient(90deg, #00d4ff, #8b5cf6) !important;
    border-radius: 3px !important;
    transition: width 0.25s ease-out, background 0.3s !important;
    box-shadow: 0 0 8px rgba(0,212,255,0.5) !important;
}

/* Orb */
.cb-orb-wrap {
    position: relative !important;
    width: 170px !important;
    height: 170px !important;
    cursor: grab !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: none !important;
    transition: transform 0.15s !important;
}

.cb-orb-wrap.dragging {
    cursor: grabbing !important;
    transition: none !important;
}

.cb-orb-wrap.shaking {
    animation: cbShake 0.35s ease-in-out !important;
}

@keyframes cbShake {
    0%, 100% { transform: translate(0,0) rotate(0); }
    15% { transform: translate(-6px,-3px) rotate(-3deg); }
    30% { transform: translate(5px,2px) rotate(2.5deg); }
    45% { transform: translate(-4px,-4px) rotate(-2deg); }
    60% { transform: translate(6px,3px) rotate(2deg); }
    75% { transform: translate(-3px,-2px) rotate(-1.5deg); }
    90% { transform: translate(2px,2px) rotate(1deg); }
}

.cb-tap-ring {
    position: absolute !important;
    inset: -12px !important;
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    animation: cbRingPulse 2s ease-in-out infinite !important;
    pointer-events: none !important;
}

.cb-orb-wrap.activated .cb-tap-ring {
    animation: none !important;
    border-color: transparent !important;
}

@keyframes cbRingPulse {
    0%, 100% { border-color: rgba(0,212,255,0); transform: scale(1); }
    50% { border-color: rgba(0,212,255,0.35); transform: scale(1.06); }
}

.cb-ball {
    width: 170px !important;
    height: 170px !important;
    aspect-ratio: 1/1 !important;
    border-radius: 50% !important;
    position: relative !important;
    overflow: hidden !important;
    background: radial-gradient(circle at 35% 35%, rgba(40,30,80,0.6), rgba(15,10,40,0.95)) !important;
    border: 2.5px solid rgba(0,212,255,0.4) !important;
    box-shadow:
        0 0 50px rgba(139,92,246,0.3),
        0 0 100px rgba(0,212,255,0.15),
        inset 0 0 50px rgba(139,92,246,0.2),
        inset 0 0 20px rgba(0,212,255,0.1) !important;
    transition: all 0.6s !important;
}

/* Charging state — intensifies with --charge-level */
.cb-ball.charging {
    border-color: rgba(0,212,255,0.6) !important;
    box-shadow:
        0 0 60px rgba(139,92,246,0.4),
        0 0 120px rgba(0,212,255,0.25),
        inset 0 0 60px rgba(0,212,255,0.2) !important;
}

/* Entrance glow — bright flash */
.cb-ball.entrance-glow {
    border-color: rgba(0,212,255,0.8) !important;
    box-shadow:
        0 0 80px rgba(0,212,255,0.5),
        0 0 160px rgba(168,85,247,0.35),
        0 0 240px rgba(0,212,255,0.15),
        inset 0 0 80px rgba(0,212,255,0.3) !important;
    animation: cbEntrancePulse 0.9s ease-out !important;
}
@keyframes cbEntrancePulse {
    0% { transform: scale(1.15); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.cb-ball.glow {
    border-color: rgba(0,212,255,0.7) !important;
    box-shadow:
        0 0 70px rgba(139,92,246,0.5),
        0 0 140px rgba(0,212,255,0.3),
        inset 0 0 70px rgba(0,212,255,0.2) !important;
}

.cb-ball.correct {
    border-color: rgba(34,197,94,0.7) !important;
    box-shadow:
        0 0 70px rgba(34,197,94,0.4),
        0 0 140px rgba(34,197,94,0.2),
        inset 0 0 60px rgba(34,197,94,0.15) !important;
}

.cb-ball.amber-glow {
    border-color: rgba(245,158,11,0.6) !important;
    box-shadow:
        0 0 60px rgba(245,158,11,0.35),
        0 0 120px rgba(245,158,11,0.15),
        inset 0 0 50px rgba(245,158,11,0.12) !important;
}

.cb-ball.legendary {
    border-color: rgba(250,204,21,0.8) !important;
    box-shadow:
        0 0 90px rgba(250,204,21,0.5),
        0 0 180px rgba(245,158,11,0.3),
        0 0 250px rgba(250,204,21,0.1),
        inset 0 0 80px rgba(250,204,21,0.2) !important;
}

.cb-swirl-1 {
    position: absolute !important; inset: 0 !important; border-radius: 50% !important;
    background: conic-gradient(from 0deg, rgba(0,212,255,0) 0deg, rgba(0,212,255,0.4) 60deg,
      rgba(168,85,247,0.5) 120deg, transparent 180deg, rgba(0,212,255,0.35) 240deg,
      rgba(139,92,246,0.25) 300deg, transparent 360deg) !important;
    animation: cbSpin 7s linear infinite !important;
    opacity: 0.7 !important; mix-blend-mode: screen !important; transition: opacity 0.6s !important;
}

.cb-swirl-2 {
    position: absolute !important; inset: 15px !important; border-radius: 50% !important;
    background: conic-gradient(from 180deg, transparent 0deg, rgba(168,85,247,0.35) 90deg,
      rgba(0,212,255,0.4) 180deg, transparent 270deg) !important;
    animation: cbSpin 11s linear infinite reverse !important;
    opacity: 0.5 !important; mix-blend-mode: screen !important; transition: opacity 0.6s !important;
}

.cb-swirl-3 {
    position: absolute !important; inset: 30px !important; border-radius: 50% !important;
    background: conic-gradient(from 90deg, transparent 0deg, rgba(236,72,153,0.2) 120deg,
      rgba(34,211,238,0.25) 240deg, transparent 360deg) !important;
    animation: cbSpin 15s linear infinite !important;
    opacity: 0.4 !important; mix-blend-mode: screen !important;
}

.cb-ball.glow .cb-swirl-1 { opacity: 1 !important; animation-duration: 3s !important; }
.cb-ball.glow .cb-swirl-2 { opacity: 0.8 !important; animation-duration: 4s !important; }
.cb-ball.glow .cb-swirl-3 { opacity: 0.6 !important; animation-duration: 5s !important; }
.cb-ball.charging .cb-swirl-1 { opacity: 0.9 !important; animation-duration: 5s !important; }
.cb-ball.charging .cb-swirl-2 { opacity: 0.7 !important; animation-duration: 6s !important; }

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

.cb-glass {
    position: absolute !important; top: 10% !important; left: 16% !important;
    width: 34% !important; height: 24% !important; border-radius: 50% !important;
    background: radial-gradient(ellipse, rgba(255,255,255,0.25), transparent 70%) !important;
    transform: rotate(-30deg) !important; pointer-events: none !important; z-index: 5 !important;
}

.cb-inner {
    position: absolute !important; inset: 0 !important;
    display: flex !important; flex-direction: column !important;
    align-items: center !important; justify-content: center !important;
    padding: 22px !important; z-index: 4 !important; text-align: center !important;
}

.cb-text {
    font-family: 'Inter', sans-serif !important;
    font-size: 11.5px !important; font-weight: 500 !important;
    color: rgba(220,200,255,0.9) !important;
    text-shadow: 0 0 15px rgba(139,92,246,0.6) !important;
    opacity: 0 !important; transition: opacity 0.8s !important; line-height: 1.4 !important;
}
.cb-text.show { opacity: 1 !important; }
.cb-text.q { font-weight: 600 !important; font-size: 11px !important; color: #fff !important; }

.cb-mult-num {
    font-family: 'Cinzel', serif !important;
    font-size: 44px !important; font-weight: 900 !important;
    opacity: 0 !important; transition: opacity 0.4s !important; letter-spacing: 2px !important;
}
.cb-mult-num.show { opacity: 1 !important; }
.cb-mult-num.landed-2x { color: #00d4ff !important; text-shadow: 0 0 25px rgba(0,212,255,0.6), 0 0 50px rgba(0,212,255,0.2) !important; }
.cb-mult-num.landed-3x { color: #a855f7 !important; text-shadow: 0 0 25px rgba(168,85,247,0.6), 0 0 50px rgba(139,92,246,0.2) !important; }
.cb-mult-num.landed-4x { color: #c084fc !important; text-shadow: 0 0 30px rgba(192,132,252,0.6), 0 0 60px rgba(168,85,247,0.2) !important; }
.cb-mult-num.landed-5x { color: #f59e0b !important; text-shadow: 0 0 30px rgba(245,158,11,0.6), 0 0 60px rgba(245,158,11,0.2) !important; }
.cb-mult-num.landed-10x { color: #facc15 !important; text-shadow: 0 0 40px rgba(250,204,21,0.7), 0 0 80px rgba(245,158,11,0.4), 0 0 120px rgba(250,204,21,0.15) !important; }
.cb-mult-num.landed-1-5x { color: #fbbf24 !important; text-shadow: 0 0 20px rgba(251,191,36,0.5) !important; font-size: 36px !important; }

.cb-sub {
    font-size: 9px !important; font-weight: 600 !important; letter-spacing: 1.5px !important;
    text-transform: uppercase !important; color: rgba(255,255,255,0.5) !important;
    margin-top: 3px !important; opacity: 0 !important; transition: opacity 0.5s !important;
}
.cb-sub.show { opacity: 1 !important; }

.cb-burst { position: absolute !important; inset: 0 !important; pointer-events: none !important; z-index: 6 !important; }
.cb-burst-dot {
    position: absolute !important; width: 3px !important; height: 3px !important;
    border-radius: 50% !important; top: 50% !important; left: 50% !important; opacity: 0 !important;
}

@keyframes cbBurstOut {
    0% { opacity: 1; transform: translate(-50%,-50%) scale(0); }
    60% { opacity: 0.9; }
    100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(1); }
}
@keyframes cbBurstBig {
    0% { opacity: 1; transform: translate(-50%,-50%) scale(0); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(2.5); }
}

.cb-base {
    width: 75px !important; height: 13px !important;
    background: linear-gradient(180deg, rgba(60,40,100,0.8), rgba(30,20,55,0.9)) !important;
    border-radius: 0 0 35px 35px !important;
    border: 1.5px solid rgba(139,92,246,0.3) !important; border-top: none !important;
    margin-top: -7px !important;
    transition: opacity 0.8s, filter 0.8s !important;
}

/* Answer grid */
.cb-answers {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 7px !important; margin-top: 14px !important;
    width: 100% !important; max-width: 280px !important;
    opacity: 0 !important; transform: translateY(8px) !important;
    transition: all 0.5s !important; pointer-events: none !important;
}
.cb-answers.show { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; }

.cb-ans {
    padding: 10px 12px !important; border-radius: 10px !important;
    font-size: 12.5px !important; font-weight: 500 !important;
    cursor: pointer !important; transition: all 0.25s !important;
    text-align: center !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1.5px solid rgba(255,255,255,0.15) !important;
    color: rgba(255,255,255,0.8) !important; line-height: 1.3 !important;
}
.cb-ans:hover { background: rgba(139,92,246,0.15) !important; border-color: rgba(139,92,246,0.4) !important; color: #fff !important; }
.cb-ans.picked.win { background: rgba(34,197,94,0.2) !important; border-color: rgba(34,197,94,0.6) !important; color: #4ade80 !important; }
.cb-ans.picked.lose { background: rgba(239,68,68,0.15) !important; border-color: rgba(239,68,68,0.5) !important; color: #f87171 !important; }
.cb-ans.correct-reveal { background: rgba(34,197,94,0.12) !important; border-color: rgba(34,197,94,0.4) !important; color: #4ade80 !important; }
.cb-ans.dimmed { opacity: 0.2 !important; pointer-events: none !important; }

.cb-result {
    margin-top: 10px !important; font-size: 12px !important; font-weight: 600 !important;
    color: rgba(255,255,255,0.5) !important; text-align: center !important;
    opacity: 0 !important; transition: opacity 0.6s !important; min-height: 16px !important;
}
.cb-result.show { opacity: 1 !important; }
.cb-result.win { color: #4ade80 !important; text-shadow: 0 0 10px rgba(34,197,94,0.3) !important; }
.cb-result.amber { color: #fbbf24 !important; text-shadow: 0 0 10px rgba(251,191,36,0.3) !important; }
.cb-result.gold { color: #facc15 !important; text-shadow: 0 0 15px rgba(250,204,21,0.4) !important; }

/* Closing message */
.cb-closing {
    margin-top: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: rgba(255,255,255,0.7) !important;
    text-align: center !important;
    opacity: 0 !important;
    transition: opacity 0.8s ease !important;
    letter-spacing: 0.3px !important;
    text-shadow: 0 0 12px rgba(0,212,255,0.3) !important;
}
.cb-closing.show { opacity: 1 !important; }

.cb-timer {
    font-size: 9px !important; font-weight: 600 !important;
    color: rgba(255,255,255,0.3) !important; margin-top: 4px !important;
    opacity: 0 !important; transition: opacity 0.5s !important;
}
.cb-timer.show { opacity: 1 !important; }
*/

/* Mobile Menu (dropdown from hamburger) */
.mobile-menu {
    display: none;
    position: fixed !important;
    top: calc(120px + env(safe-area-inset-top, 0px)) !important;
    right: 16px !important;
    background: rgba(12, 12, 29, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    min-width: 200px !important;
    max-width: 280px !important;
    z-index: 999998 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.mobile-menu.active {
    display: block !important;
}

.mobile-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
}

.mobile-menu a:hover,
.mobile-menu a:active {
    background: rgba(255, 255, 255, 0.05) !important;
}

.mobile-menu a img {
    width: 20px !important;
    height: 20px !important;
    border-radius: 6px !important;
}
