:root {
    /* Architectural Nocturne Design System Colors (DARK MODE - Default) */
    --surface: #0B1326;
    --surface-lowest: #060E20;
    --surface-low: #131B2E;
    --surface-high: #222A3D;
    
    --primary: #004AC6;
    --primary-container: #2563EB;
    
    --on-surface: #FFFFFF;
    --on-surface-variant: #C3C6D7;
    
    --ai-purple: #6001D1;
    --success: #22C55E;
    --error: #BA1A1A;
    --gold: #FFD700;

    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(6, 14, 32, 0.9);
    --shadow: rgba(0, 0, 0, 0.2);
}

/* Light Theme Overrides */
:root.light-theme,
html.light-theme,
body.light-theme,
.light-theme {
    --surface: #F8F9FA;
    --surface-lowest: #FFFFFF;
    --surface-low: #F3F4F5;
    --surface-high: #E1E3E4;
    
    --primary: #004AC6;
    --primary-container: #2563EB;
    
    --on-surface: #191C1D;
    --on-surface-variant: #434655;
    
    --ai-purple: #6001D1;
    --success: #22C55E;
    --error: #BA1A1A;
    --gold: #D4AF37;

    --card-bg: #FFFFFF;
    --card-border: #E1E3E4;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

input, textarea {
    user-select: auto;
}

html {
    background-color: var(--surface);
    height: 100%;
    height: 100dvh;
    overflow: hidden;
}

body {
    background-color: var(--surface);
    color: var(--on-surface);
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    transition: background-color 0.3s, color 0.3s;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

/* Dynamic background */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(96, 1, 209, 0.05) 0%, transparent 40%);
    z-index: 0;
    animation: rotateBg 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.app-container {
    padding: 20px 20px 88px 20px; 
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background-color: var(--surface);
    position: relative;
    z-index: 1;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- QUIZ DASHBOARD (MAIN VIEW) STYLES --- */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-area .icon {
    font-size: 24px;
    color: #FFD700;
}

.logo-area .title {
    font-size: 18px;
    font-weight: 800;
}

.user-profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-container) 0%, var(--ai-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-weight: 700;
    font-size: 14px;
}

.progress-card {
    background: linear-gradient(135deg, #0062FF 0%, #6366F1 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 98, 255, 0.3);
    color: #FFF;
}

.progress-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-card-header .label {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
}

.progress-card-header .goal {
    font-size: 12px;
    font-weight: 800;
    color: #FFD700;
}

.balance {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
}

.progress-container-small {
    height: 10px;
    background-color: rgba(0, 0, 0, 0.26);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-bar-small {
    height: 100%;
    background-color: #FFD700;
}

.claim-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.claim-btn.locked {
    background-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.54);
    cursor: not-allowed;
}

/* --- UPLOAD AI PAPER CARD --- */
.upload-card {
    background: linear-gradient(135deg, var(--surface-low) 0%, var(--surface-high) 100%);
    border: 1px solid var(--primary-container);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.15);
    transition: transform 0.2s;
}

.upload-card:hover {
    transform: translateY(-2px);
}

.upload-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(96, 1, 209, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.upload-text {
    flex: 1;
}

.upload-text h3 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
    background: linear-gradient(90deg, var(--primary-container), var(--ai-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-text p {
    font-size: 11px;
    color: var(--on-surface-variant);
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

.upload-action .small-btn {
    background-color: var(--primary-container);
    color: #FFF;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--on-surface);
    margin-bottom: -12px;
    margin-top: 8px;
}

.niche-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.niche-scroll::-webkit-scrollbar { 
    display: none;
}

.chip {
    padding: 8px 16px;
    background-color: var(--surface-lowest);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--on-surface);
}

.chip.active {
    background-color: var(--primary-container);
    color: #fff;
    border-color: var(--primary-container);
}

.quiz-packs-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pack-card {
    background-color: var(--surface-lowest);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px var(--shadow);
}

.pack-card:hover {
    background-color: var(--surface-low);
    border-color: var(--primary-container);
}

.pack-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 98, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-container);
    font-size: 16px;
}

.pack-info {
    flex: 1;
}

.pack-info h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--on-surface);
}

.pack-info p {
    font-size: 11px;
    color: var(--on-surface-variant);
    font-family: 'Inter', sans-serif;
}

.pack-arrow {
    font-size: 24px;
    color: var(--on-surface-variant);
}

/* --- BOTTOM NAV BAR --- */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 68px;
    background-color: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--on-surface-variant);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    flex: 1;
}

.nav-item.active {
    color: var(--primary-container);
}

.nav-item .icon {
    font-size: 22px;
}

.nav-item .label {
    font-size: 10px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

/* --- MOCKUP SPECIFIC CSS (CLAIM, STORE, REFER) --- */

.styled-input {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background-color: var(--surface-low);
    color: var(--on-surface);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.styled-input:focus {
    border-color: var(--primary-container);
}

.network-chip {
    padding: 16px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    color: var(--on-surface);
    background-color: var(--surface-low);
    cursor: pointer;
    transition: 0.2s;
}
.network-chip.active {
    background-color: #FFD700;
    color: #000;
    border-color: #FFD700;
}

.store-item-card {
    background-color: var(--surface-lowest);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
.store-network {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    color: #FFF;
}
.store-network.mtn { background-color: #FFCC00; color: #000; }
.store-network.airtel { background-color: #FF0000; }
.store-network.glo { background-color: #009900; }

.store-details { flex: 1; }
.buy-btn {
    background-color: var(--surface-low);
    color: var(--primary-container);
    border: 1px solid var(--primary-container);
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 800;
    cursor: pointer;
}

/* --- PROFILE UI --- */
.profile-card {
    background-color: var(--surface-lowest);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px var(--shadow);
}

.profile-card .avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-container) 0%, var(--ai-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-weight: 800;
    font-size: 32px;
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
}

.profile-stats {
    display: flex;
    gap: 24px;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}

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

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold);
}

.stat-label {
    font-size: 11px;
    color: var(--on-surface-variant);
    font-family: 'Inter', sans-serif;
}

/* --- QUIZ UI STYLES --- */
.quiz-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    max-width: 500px;
    width: 100%;
    left: 50% !important;
    transform: translateX(-50%);
    background-color: var(--surface);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    overflow: hidden;
    position: fixed;
    top: 0;
    z-index: 300;
}

.quiz-app-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--surface-lowest);
    border-bottom: 1px solid var(--card-border);
}

.quiz-title {
    font-size: 16px;
    font-weight: 700;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--on-surface);
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-container {
    height: 4px;
    background-color: var(--card-border);
    width: 100%;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-container);
    transition: width 0.3s ease;
}

.quiz-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.quiz-header-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-badge {
    padding: 6px 12px;
    background-color: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 20px;
    color: var(--primary-container);
    font-size: 12px;
    font-weight: 700;
}

.pass-mark {
    color: var(--on-surface-variant);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
}

.question-card {
    background-color: var(--surface-lowest);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px var(--shadow);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-card {
    background-color: var(--surface-lowest);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-card:hover {
    background-color: var(--surface-low);
}

.option-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--on-surface);
}

.option-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

/* Option States */
.option-card.correct {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
}
.option-card.correct .option-avatar {
    background-color: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.option-card.wrong {
    background-color: rgba(186, 26, 26, 0.1);
    border-color: var(--error);
}
.option-card.wrong .option-avatar {
    background-color: rgba(186, 26, 26, 0.2);
    color: var(--error);
}

.option-icon {
    font-size: 20px;
}
.hidden {
    display: none;
}

.quiz-footer {
    padding: 16px;
    background-color: var(--surface-lowest);
    border-top: 1px solid var(--card-border);
}

.primary-btn {
    width: 100%;
    height: 52px;
    background-color: var(--primary-container);
    color: #FFF;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.primary-btn:disabled {
    background-color: var(--card-border);
    color: var(--on-surface-variant);
    cursor: not-allowed;
}

/* --- SPIN WHEEL UI --- */
.spin-wheel-section {
    background-color: var(--surface-lowest);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px 16px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px var(--shadow);
}

.wheel-container {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.wheel-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wheel-base {
    z-index: 1;
    width: 86%;
    height: 86%;
    left: 7%;
    top: 7%;
    transition: transform 3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wheel-ring {
    z-index: 2;
    pointer-events: none;
}

.wheel-center {
    z-index: 3;
    width: 30%;
    height: 30%;
    cursor: pointer;
    transition: transform 0.2s;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.wheel-center:hover {
    transform: scale(1.1);
}

/* --- ARENA UI (faithful to Flutter app) --- */
.arena-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 8px;
}
.streak-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: #FFF;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
    transition: transform 0.15s;
}
.streak-badge:active { transform: scale(0.92); }

.arena-balance-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s;
}
.arena-balance-chip:active { transform: scale(0.92); }
.arena-balance-chip.gems {
    background: rgba(56, 189, 248, 0.15);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.arena-balance-chip.data {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Tournament Banner */
.arena-tournament-card {
    margin: 6px 16px 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
    border: 1px solid rgba(129, 140, 248, 0.3);
    box-shadow: 0 4px 15px rgba(49, 46, 129, 0.3);
    cursor: pointer;
    transition: transform 0.15s;
}
.arena-tournament-card:active { transform: scale(0.98); }
.tournament-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tournament-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 900;
    color: #FFD700;
    letter-spacing: 0.5px;
}
.tournament-timer {
    font-size: 10px;
    font-weight: 800;
    color: #38BDF8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 8px;
    border-radius: 8px;
}
.tournament-join-btn {
    padding: 6px 14px;
    border-radius: 10px;
    background: #FFD700;
    color: #000;
    font-size: 11px;
    font-weight: 900;
    border: none;
    cursor: pointer;
}

/* Category Chips */
.arena-chips-row {
    display: flex;
    gap: 8px;
    padding: 0 16px 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.arena-chips-row::-webkit-scrollbar { display: none; }
.arena-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--surface-low);
    color: var(--on-surface-variant);
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: all 0.2s;
}
.arena-chip.active {
    background: #6366F1;
    color: #FFF;
    border-color: #818CF8;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* Weekly Legends Row */
.arena-legends-row {
    display: flex;
    gap: 14px;
    padding: 6px 16px 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.arena-legends-row::-webkit-scrollbar { display: none; }
.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 52px;
    cursor: pointer;
    transition: transform 0.15s;
}
.legend-item:active { transform: scale(0.92); }
.legend-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-low);
    font-size: 16px;
    font-weight: 800;
    color: var(--on-surface);
    overflow: hidden;
}
.legend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.legend-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 900;
    color: #FFF;
}
.legend-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--on-surface-variant);
    white-space: nowrap;
}

/* Radar Map Centerpiece */
.arena-map {
    position: relative;
    width: 100%;
    height: 330px;
    margin: 4px auto;
    overflow: hidden;
    touch-action: pan-y;
}
.map-grid-cross {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.map-grid-cross::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(99, 102, 241, 0.08);
}
.map-grid-cross::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(99, 102, 241, 0.08);
}
.map-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.05);
}
.map-ring.ring-outer { width: 90%; height: 90%; border-color: rgba(56, 189, 248, 0.22); }
.map-ring.ring-mid { width: 58%; height: 58%; border-color: rgba(99, 102, 241, 0.28); }
.map-ring.ring-inner { width: 28%; height: 28%; border-color: rgba(99, 102, 241, 0.35); }

.radar-laser-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.map-sweep-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 45%;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.9), transparent);
    transform-origin: 0 0;
    animation: radar-sweep-spin 3.5s linear infinite;
    pointer-events: none;
    z-index: 2;
}
@keyframes radar-sweep-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Center "YOU" Node */
.map-you {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    cursor: pointer;
}
.map-you-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 3px solid #6366F1;
    background: rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6), inset 0 0 15px rgba(99, 102, 241, 0.4);
    animation: pulse-glow 2.5s infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.9); }
}
.map-you-label {
    font-size: 11px;
    font-weight: 900;
    color: #FFF;
    margin-top: 3px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.map-you-sub {
    font-size: 9px;
    font-weight: 800;
    color: #818CF8;
}

/* Floating Orbiting Player & Clan Nodes */
.map-player {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid;
    background: var(--surface-low);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    cursor: pointer;
    transition: transform 0.15s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    will-change: transform, left, top;
}
.map-player:active { transform: scale(1.2) !important; }
.map-player-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    color: #FFF;
}
.map-player-tag {
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 7.5px;
    font-weight: 900;
    color: #FFF;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    letter-spacing: 0.3px;
}

/* Brain Fuel Card */
.arena-fuel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 16px 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(56,189,248,0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.15s;
}
.arena-fuel-card:active { transform: scale(0.98); }

/* Solo / Duel / Friends Buttons */
.arena-action-btns {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}
.arena-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 52px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 900;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    color: #FFF;
}
.arena-btn:active { transform: scale(0.95); opacity: 0.85; }
.arena-btn.solo {
    background: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.arena-btn.duel {
    background: #F59E0B;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.arena-btn.friends {
    background: #10B981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* ==================== ARENA MODAL SYSTEM ==================== */
.arena-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 500;
    align-items: flex-end;
    justify-content: center;
}
.arena-sheet-card {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-top: 1px solid var(--card-border);
    border-radius: 28px 28px 0 0;
    padding: 16px 20px 28px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    animation: slide-up 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
}
@keyframes slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--card-border);
    margin: 0 auto 12px;
}
.sheet-avatar-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid #6366F1;
    padding: 2px;
}
.sheet-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.sheet-badge-tag {
    position: absolute;
    bottom: -4px;
    right: -4px;
    padding: 1px 5px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 900;
    color: #FFF;
    background: #6366F1;
}
.combat-clan-pill {
    font-size: 10px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.2);
    color: #818CF8;
}

.combat-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}
.combat-stat-box {
    background: var(--surface-low);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
}
.stat-lbl {
    font-size: 9px;
    font-weight: 800;
    color: var(--on-surface-variant);
}
.stat-val {
    font-size: 15px;
    font-weight: 900;
    margin-top: 2px;
    color: var(--on-surface);
}

.sheet-btn {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    border: none;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    color: #FFF;
}
.duel-launch-btn {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}
.sheet-secondary-btn {
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--on-surface-variant);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}

/* Badges Grid */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.trophy-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 12px;
    background: var(--surface-low);
    border: 1px solid var(--card-border);
    text-align: center;
}
.trophy-badge.unlocked span.material-symbols-rounded { color: #FFD700; font-size: 24px; }
.trophy-badge.locked span.material-symbols-rounded { color: var(--on-surface-variant); opacity: 0.4; font-size: 24px; }
.b-name { font-size: 9px; font-weight: 700; color: var(--on-surface-variant); }

/* Streak Ladder */
.streak-ladder {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.streak-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--surface-low);
    border: 1px solid var(--card-border);
    font-size: 12px;
}
.streak-step.reached {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10B981;
}
.streak-step.active-now {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #F59E0B;
}
.s-day { flex: 1; font-weight: 800; }
.s-rwd { font-weight: 900; }

/* Gem Packs */
.gem-pack-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gem-pack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-low);
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: transform 0.15s;
}
.gem-pack-item:active { transform: scale(0.98); }
.gem-pack-item.popular {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}
.hot-tag {
    font-size: 8px;
    font-weight: 900;
    background: #F59E0B;
    color: #000;
    padding: 1px 5px;
    border-radius: 6px;
}
.gem-buy-btn {
    padding: 6px 14px;
    border-radius: 10px;
    background: var(--primary-container);
    color: #FFF;
    border: none;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

/* 3Dot Menu */
.arena-menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.arena-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface-low);
    cursor: pointer;
    transition: transform 0.15s;
}
.arena-menu-item:active { transform: scale(0.98); }
.m-title { font-size: 13px; font-weight: 800; color: var(--on-surface); }
.m-sub { font-size: 10px; color: var(--on-surface-variant); margin-top: 1px; }

/* Econ Boxes */
.econ-box {
    padding: 12px;
    border-radius: 12px;
    font-size: 11px;
}
.econ-box.winner { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); }
.econ-box.winner .econ-t { color: #10B981; font-weight: 900; }
.econ-box.loser { background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); }
.econ-box.loser .econ-t { color: #38BDF8; font-weight: 900; }
.econ-box.house { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); }
.econ-box.house .econ-t { color: #F59E0B; font-weight: 900; }
.econ-d { color: var(--on-surface-variant); margin-top: 2px; }

/* Clan Clash Tiles */
.clan-rank-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.clan-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-low);
    border: 1px solid var(--card-border);
}
.clan-tile.top-1 { border-color: rgba(255, 215, 0, 0.4); background: rgba(255, 215, 0, 0.05); }
.clan-pos { font-size: 16px; font-weight: 900; width: 24px; }
.clan-tile.top-1 .clan-pos { color: #FFD700; }

/* Breathing Circle */
.breathing-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #EC4899;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.4);
    animation: breath-pulse 4s ease-in-out infinite;
}
@keyframes breath-pulse {
    0%, 100% { transform: scale(0.9); box-shadow: 0 0 15px rgba(236, 72, 153, 0.2); }
    50% { transform: scale(1.15); box-shadow: 0 0 40px rgba(236, 72, 153, 0.6); }
}

/* VS Match Screen */
.vs-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0;
}
.vs-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.vs-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: #FFF;
}
.vs-avatar.me {
    background: #6366F1;
    border: 3px solid #818CF8;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}
.vs-avatar.opponent {
    background: #EF4444;
    border: 3px solid #F87171;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.vs-name { font-size: 13px; font-weight: 900; }
.vs-clan { font-size: 10px; color: var(--on-surface-variant); }
.vs-badge {
    font-size: 20px;
    font-weight: 900;
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.15);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    animation: pulse 1.2s infinite;
}
.vs-countdown-box {
    margin-top: 10px;
}

/* 1v1 Duel Battle HUD & Options */
.duel-top-hud {
    user-select: none;
}
.option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-low);
    border: 1.5px solid var(--card-border);
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s ease-out;
}
.option-card:active {
    transform: scale(0.98);
}
.option-card.selected {
    border-color: #38BDF8;
    background: rgba(56, 189, 248, 0.12);
}
.option-card.correct {
    border-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.2) !important;
}
.option-card.wrong {
    border-color: #EF4444 !important;
    background: rgba(239, 68, 68, 0.2) !important;
}
.option-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    color: var(--on-surface);
}
.option-card.correct .option-avatar {
    background: #10B981;
    color: #FFF;
}
.option-card.wrong .option-avatar {
    background: #EF4444;
    color: #FFF;
}
.option-text {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--on-surface);
    flex: 1;
}

