/* adventure-style.css - Ultimate v20.1.0 - Fantastic Map Edition */
/* Harmonized with Benang Lurus "Math Adventure" Front Page */
/* FIX: Visibility improvements for Quiz Review & Dashboard Stats */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --fma-font-heading: 'Fredoka', sans-serif;
    --fma-font-body: 'Nunito', sans-serif;
    
    /* PALETTE: Dark Slate & Royal Gold Theme */
    --c-bg: #0f172a;           /* Slate 900 - Main Background */
    --c-primary: #f59e0b;      /* Amber 500 */
    --c-primary-dark: #d97706; /* Amber 600 */
    --c-primary-glow: rgba(245, 158, 11, 0.4);
    --c-secondary: #0ea5e9;    /* Sky 500 */
    --c-accent: #38bdf8;       /* Sky 400 */
    --c-success: #10b981;      /* Emerald */
    --c-danger: #ef4444;       /* Red */
    --c-warning: #f97316;      /* Orange */
    
    /* UI Structure */
    --c-card: rgba(30, 41, 59, 0.85); /* Increased Opacity for readability */
    --c-card-solid: #1e293b;          /* Solid Fallback */
    --c-card-hover: rgba(51, 65, 85, 0.95);
    --c-input-bg: rgba(15, 23, 42, 0.8);
    
    /* Text Colors */
    --c-text-dark: #f8fafc;
    --c-text-mid: #cbd5e1;
    --c-text-light: #94a3b8;
    
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    
    /* Shadows */
    --shadow-soft: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 8px 25px rgba(0, 0, 0, 0.3);
    --shadow-float: 0 20px 40px rgba(0, 0, 0, 0.4);
    
    --glass-border: 1px solid rgba(255, 255, 255, 0.15);
}

/* =========================================
   GLOBAL & RESPONSIVE BASE
   ========================================= */

* { box-sizing: border-box; }

body { 
    margin: 0; 
    padding: 0; 
    background-color: var(--c-bg); 
    color: var(--c-text-dark);
    font-family: var(--fma-font-body);
}

.adventure-game-wrapper {
    font-family: var(--fma-font-body);
    color: var(--c-text-dark);
    padding: 20px;
    min-height: 100vh;
    display: grid;
    gap: 30px;
    background-color: var(--c-bg);
    background-image: 
        linear-gradient(to bottom, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), 
        url('https://benanglurus.com/wp-content/uploads/2026/01/Background-Fun-Adventure.png'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

@media (min-width: 1024px) {
    .adventure-game-wrapper {
        grid-template-columns: 1fr 380px;
        padding: 40px;
        gap: 50px;
    }
    .adventure-sidebar { order: 2; position: sticky; top: 20px; align-self: start; }
    .main-content { order: 1; }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .adventure-game-wrapper { padding: 30px; gap: 40px; }
    .adventure-sidebar { order: 2; margin-top: 20px; }
    .main-content { order: 1; }
}

@media (max-width: 767px) {
    .adventure-game-wrapper { padding: 15px; gap: 25px; grid-template-columns: 1fr; }
    .adventure-sidebar { order: 2; margin-top: 20px; }
    .main-content { order: 1; width: 100%; }
    .path-step { gap: 15px; } 
    .step-marker { width: 40px; height: 40px; font-size: 1.1rem; }
    .step-marker-wrapper { width: 50px; }
    
    .fma-quiz-container {
        margin: 0 -15px !important;
        width: calc(100% + 30px) !important;
        border-radius: 0 0 30px 30px !important;
        padding: 30px 20px !important;
    }
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes fmaPulseAnimation {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes floatHead {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-15px); } 
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes godlyPulse { 
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); border-color: #ef4444; } 
    50% { border-color: #fca5a5; }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); border-color: #ef4444; } 
}

/* =========================================
   SIDEBAR (RIGHT)
   ========================================= */

.char-card {
    background: var(--c-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    margin-top: 70px;
    position: relative;
    border: var(--glass-border);
}

.char-avatar-wrapper {
    width: 130px;
    height: 130px;
    margin: -90px auto 15px;
    background: #1e293b;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
    border: 5px solid rgba(255,255,255,0.1);
}

.char-avatar { width: 100%; height: 100%; border-radius: 50%; animation: floatHead 6s ease-in-out infinite; }
.level-title { font-family: var(--fma-font-heading); font-size: 1.8rem; font-weight: 700; margin: 10px 0 20px; color: var(--c-primary); text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

/* Progress Bar */
.progress-bar-container { background: rgba(0,0,0,0.3); padding: 18px; border-radius: var(--radius-md); margin: 25px 0; border: 1px solid rgba(255,255,255,0.05); }
.progress-header { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 10px; font-size: 1rem; color: var(--c-text-mid); }
.progress-track { height: 16px; background: #334155; border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-warning)); border-radius: 20px; transition: width 1.2s ease; box-shadow: 0 0 10px var(--c-primary-glow); }

/* Stats */
.stats-row { display: flex; justify-content: center; gap: 15px; margin: 25px 0; flex-wrap: wrap; }
.stat-pill {
    background: rgba(255, 255, 255, 0.05); padding: 12px 20px; border-radius: 50px; font-weight: 800; font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 10px; transition: transform 0.3s;
    border: 1px solid rgba(255,255,255,0.1); color: var(--c-text-dark);
}
.stat-pill span { font-variant-numeric: tabular-nums; }
.stat-pill:hover { transform: scale(1.08); background: rgba(255,255,255,0.1); }
.coin-pill { color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); }
.streak-pill { color: #f87171; border-color: rgba(248, 113, 113, 0.3); }

/* Mission Focus */
.mission-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(0,0,0,0.2)); 
    border-radius: var(--radius-lg);
    padding: 20px; margin: 25px 0; border: 2px dashed rgba(245, 158, 11, 0.4);
}
.mission-icon { font-size: 2rem; margin-bottom: 10px; }
.mission-text { font-weight: 700; font-size: 1.1rem; color: var(--c-text-dark); }

/* Badges Mini */
.fma-badges-section { background: var(--c-card); border-radius: var(--radius-lg); padding: 25px; margin: 30px 0; box-shadow: var(--shadow-card); border: var(--glass-border); }
.fma-badges-title { font-family: var(--fma-font-heading); font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: 20px; color: var(--c-primary); }
.fma-badges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; justify-items: center; }
.fma-badge {
    width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; background: rgba(255,255,255,0.1); border-radius: 50%; opacity: 0.5; filter: grayscale(100%); transition: all 0.6s ease;
}
.fma-badge.unlocked {
    background: linear-gradient(135deg, #1e293b, #0f172a); opacity: 1; filter: grayscale(0%);
    border: 2px solid var(--c-primary); box-shadow: 0 0 15px var(--c-primary-glow);
    transform: scale(1.1); animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Daily Promo Button */
.daily-promo {
    background: linear-gradient(45deg, var(--c-primary), var(--c-primary-dark)); 
    background-size: 200% 200%; animation: gradientFlow 6s ease infinite;
    border-radius: var(--radius-lg); padding: 30px 20px; text-align: center; border: 2px solid rgba(255,255,255,0.2); margin-top: 30px;
    cursor: pointer; transition: transform 0.4s; position: relative; overflow: hidden;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}
.daily-promo:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 15px 35px rgba(245, 158, 11, 0.5); }
@keyframes gradientFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.daily-icon { font-size: 4rem; animation: bounce 2s infinite; margin-bottom: 15px; }
.daily-promo h4 { font-family: var(--fma-font-heading); font-size: 1.6rem; color: #fff; margin: 0 0 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.daily-promo p { font-size: 1.1rem; color: rgba(255,255,255,0.9); margin-bottom: 20px; }


/* =========================================
   FANTASTIC SVG WORLD MAP (v20.0.0)
   ========================================= */

.fma-css-map-wrapper {
    position: relative;
    width: 100%;
    /* Rasio Aspek Portrait-ish agar muat zigzag */
    padding-bottom: 80%; 
    background-color: #1e293b;
    /* Pola Grid Halus "Magic Paper" */
    background-image: 
        radial-gradient(#334155 1px, transparent 1px),
        radial-gradient(#334155 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    border-radius: 30px;
    border: 6px solid #475569;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.4);
    overflow: hidden;
    margin: 40px 0;
}

/* --- 2. SVG ROAD (Jalan Raya) --- */
.fma-map-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

.map-road-bg {
    fill: none;
    stroke: #0f172a; /* Warna Aspal Gelap */
    stroke-width: 14px;
    stroke-linecap: round;
    filter: drop-shadow(0 4px 2px rgba(255,255,255,0.05));
}

.map-road-dash {
    fill: none;
    stroke: rgba(255,255,255,0.2); /* Marka Jalan */
    stroke-width: 2px;
    stroke-dasharray: 10, 15;
    animation: roadFlow 60s linear infinite;
}

@keyframes roadFlow {
    to { stroke-dashoffset: -1000; }
}

/* --- 3. LEVEL NODES (Pulau & Ikon) --- */
.fma-level-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.node-inner {
    width: 80px; height: 80px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 4px solid var(--level-color, #fff);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 2;
    transition: all 0.3s;
    position: relative;
}

/* Hover Effect */
.fma-level-node:hover { transform: translate(-50%, -60%) scale(1.1); z-index: 10; }
.fma-level-node:hover .node-inner { 
    box-shadow: 0 0 30px var(--level-color); 
    background: var(--level-color);
    border-color: #fff;
}
.fma-level-node:hover .node-label { opacity: 1; transform: translateY(5px); }

/* Label Info */
.node-label {
    margin-top: 12px;
    background: rgba(15, 23, 42, 0.95);
    padding: 8px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    backdrop-filter: blur(8px);
    width: 160px;
    opacity: 0.8;
    transition: 0.3s;
    pointer-events: none;
}

.lvl-num { display: block; font-size: 0.7rem; color: var(--level-color); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.lvl-name { display: block; color: #fff; font-size: 0.9rem; font-weight: 700; line-height: 1.3; font-family: 'Fredoka', sans-serif; }

/* Progress Bar Mini */
.mini-progress { width: 100%; height: 5px; background: rgba(255,255,255,0.1); border-radius: 10px; margin-top: 6px; overflow: hidden; }
.mini-progress .bar { height: 100%; background: var(--level-color); box-shadow: 0 0 10px var(--level-color); }

/* --- 4. STATUS STATES --- */

/* Locked */
.fma-level-node.locked { filter: grayscale(100%); opacity: 0.6; cursor: not-allowed; }
.fma-level-node.locked .node-inner { border-color: #475569; background: #0f172a; }
.lock-icon {
    position: absolute; top: 0; right: 5px; background: #ef4444; width: 28px; height: 28px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; border: 2px solid #fff; z-index: 5; box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Current / Active */
.fma-level-node.current .node-inner {
    border-color: #fff;
    background: radial-gradient(circle, var(--level-color) 0%, #1e293b 80%);
    animation: floatNode 3s ease-in-out infinite;
}
.fma-level-node.current .node-pulse {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; height: 100%; border-radius: 50%;
    border: 2px solid var(--level-color);
    animation: radarPulse 2s infinite;
    z-index: 0;
}

@keyframes radarPulse {
    0% { width: 80px; height: 80px; opacity: 0.8; }
    100% { width: 140px; height: 140px; opacity: 0; }
}
@keyframes floatNode {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Completed */
.check-icon {
    position: absolute; top: -10px; right: 0; font-size: 2rem; z-index: 6;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5)); animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

/* --- 5. RESPONSIVE MOBILE MAP --- */
@media (max-width: 768px) {
    .fma-css-map-wrapper { padding-bottom: 160%; /* Peta memanjang di HP */ }
    
    .node-inner { width: 60px; height: 60px; font-size: 1.8rem; }
    .node-label { padding: 5px 10px; width: 120px; }
    .lvl-name { font-size: 0.8rem; }
    
    /* Reposisi agar zigzag lebih nyaman di layar sempit */
    .fma-level-node.level-1 { left: 20% !important; }
    .fma-level-node.level-2 { left: 80% !important; }
    .fma-level-node.level-3 { left: 20% !important; }
    .fma-level-node.level-4 { left: 80% !important; }
    .fma-level-node.level-5 { left: 20% !important; }
    .fma-level-node.level-6 { left: 50% !important; top: 8% !important; }
}


/* =========================================
   PATH / TIMELINE (Previous)
   ========================================= */

.fma-active-pulse, .path-step.current .step-marker {
    animation: fmaPulseAnimation 2s infinite; border-color: var(--c-primary) !important;
    z-index: 5; position: relative; background: #fff !important; color: var(--c-primary-dark) !important;
}

.path-container { margin-bottom: 40px; }
.path-step { display: flex; gap: 30px; margin-bottom: 0; padding-bottom: 40px; align-items: stretch; position: relative; }
.step-marker-wrapper { width: 70px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; position: relative; min-height: 100%; }

.step-marker {
    width: 50px; height: 50px; background: #1e293b; border: 4px solid #475569; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem;
    color: var(--c-text-light); box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: all 0.5s ease; z-index: 2; flex-shrink: 0;
}
/* Connector Line */
.step-line { width: 5px; background: rgba(255,255,255,0.1); flex-grow: 1; margin-top: -5px; margin-bottom: -20px; z-index: 1; }
.path-step:last-child .step-line { display: none; }
.path-step:last-child { padding-bottom: 0; }
.path-step.step-completed .step-marker { background: var(--c-success); border-color: var(--c-success); color: #fff; box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.2); animation: none; }
.path-step.step-completed .step-line { background: var(--c-success); }

.step-details {
    background: var(--c-card); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-soft);
    flex: 1; transition: transform 0.4s ease; align-self: flex-start; width: 100%;
    border: var(--glass-border);
    backdrop-filter: blur(10px);
}
.step-details:hover { transform: translateY(-5px); background: var(--c-card-hover); }
.step-details h4 { font-family: var(--fma-font-heading); font-size: 1.4rem; color: var(--c-primary); margin: 0 0 20px; }
.step-details ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; }

.step-details li a {
    display: flex; align-items: center; gap: 15px; padding: 18px 22px; 
    background: rgba(15, 23, 42, 0.5); border-radius: var(--radius-md);
    text-decoration: none; font-weight: 700; font-size: 1.05rem; 
    color: var(--c-text-mid); transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.05);
}
.step-details li.locked .locked-item-content {
    display: flex; align-items: center; gap: 15px; padding: 18px 22px; background: rgba(15, 23, 42, 0.3); border-radius: var(--radius-md);
    font-weight: 600; font-size: 1.05rem; color: #64748b; border: 1px dashed #475569; cursor: not-allowed; opacity: 0.6;
}
.step-details li a:hover { background: rgba(14, 165, 233, 0.1); color: var(--c-secondary); transform: translateX(8px); border-color: var(--c-secondary); }
.step-details li.done a { background: rgba(16, 185, 129, 0.1); color: var(--c-success); border-color: rgba(16, 185, 129, 0.4); }
.step-details li.current a {
    /* Gradient for current item */
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05)); 
    color: var(--c-primary); border-color: var(--c-primary);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.1);
}

/* --- BOTTOM NAV & BACK BUTTON --- */
.fma-bottom-nav { display: flex; justify-content: center; align-items: center; padding: 40px 0; margin-top: 40px; border-top: 2px dashed rgba(255,255,255,0.1); width: 100%; }
.fma-back-btn, .fma-return-btn {
    display: inline-flex; align-items: center; gap: 12px; background: transparent; color: var(--c-text-dark);
    padding: 16px 40px; border-radius: 50px; font-weight: 800; text-decoration: none; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--c-primary); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); font-size: 1.2rem;
}
.fma-back-btn:hover, .fma-return-btn:hover { background: var(--c-primary); color: #fff; transform: translateY(-5px) scale(1.05); box-shadow: 0 15px 30px var(--c-primary-glow); }

/* --- MISSION SUCCESS OVERLAY --- */
.mission-success-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.95), rgba(0, 0, 0, 0.98));
    backdrop-filter: blur(8px); z-index: 99999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.mission-success-overlay.show { opacity: 1; pointer-events: auto; }
.mission-success-card {
    background: #1e293b; padding: 40px; border-radius: 30px; text-align: center; max-width: 450px; width: 90%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2); 
    animation: popUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--c-text-dark);
}
@keyframes popUp { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-icon { font-size: 5rem; margin-bottom: 10px; display: block; }
.mission-success-card h2 { font-family: var(--fma-font-heading); color: var(--c-primary); font-size: 2.2rem; margin: 0 0 10px; }
.mission-success-card p { font-size: 1.2rem; color: var(--c-text-mid); margin: 0 0 10px; }

/* --- VICTORY BANNER --- */
.fma-victory-wrapper {
    background: linear-gradient(135deg, #10b981, #059669); border-radius: 24px; padding: 40px; color: white; text-align: center;
    margin-bottom: 40px; box-shadow: 0 20px 50px rgba(16, 185, 129, 0.3); border: 2px solid rgba(255,255,255,0.2); position: relative; overflow: hidden;
}
.fma-victory-wrapper::before { content: '🏆'; position: absolute; font-size: 15rem; opacity: 0.1; top: -50px; right: -50px; transform: rotate(20deg); }
.victory-icon { font-size: 4rem; margin-bottom: 15px; animation: bounce 2s infinite; }
.fma-victory-wrapper h2 { font-family: var(--fma-font-heading); font-size: 2.2rem; margin: 0 0 15px; }
.fma-victory-wrapper p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 30px; }


/* =========================================
   QUICK QUIZ & LAYOUT IMPROVEMENTS
   ========================================= */

.fma-quiz-container {
    background: var(--c-card); 
    border-radius: 36px; 
    padding: 40px; 
    color: var(--c-text-dark);
    text-align: center; 
    margin: 50px auto; 
    width: 100%;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); 
    border: var(--glass-border); 
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(15px);
}

.fma-quiz-header-group { display: flex; flex-direction: column; gap: 25px; margin-bottom: 35px; width: 100%; }

.fma-quiz-header { 
    font-family: var(--fma-font-heading); font-size: 2.2rem; font-weight: 700; margin: 0;
    line-height: 1.2; color: var(--c-primary); text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.fma-quiz-question { 
    font-size: 1.5rem; line-height: 1.6; background: rgba(0,0,0,0.3); padding: 30px; 
    border-radius: 24px; margin-bottom: 40px; border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3); color: #fff;
}

.fma-quiz-input-group { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
#quiz-answer { padding: 18px 30px; border-radius: 50px; border: 2px solid rgba(255,255,255,0.1); background: var(--c-input-bg); color: #fff; font-size: 1.2rem; width: 320px; max-width: 100%; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,0.3); outline: none; }
#quiz-answer:focus { border-color: var(--c-primary); box-shadow: 0 0 15px var(--c-primary-glow); }
#quiz-feedback { font-size: 1.6rem; font-weight: 800; min-height: 40px; margin: 30px 0; }
#quiz-explanation { background: rgba(0,0,0,0.4); color: var(--c-text-mid); padding: 30px; border-radius: 24px; margin-top: 30px; display: none; font-size: 1.1rem; line-height: 1.7; border: 1px solid rgba(255,255,255,0.1); }

/* 3D Button */
.fma-3d-btn {
    font-family: var(--fma-font-heading); font-weight: 700; padding: 16px 40px; border: none; border-radius: 50px;
    font-size: 1.2rem; color: white; cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,0.3); transition: all 0.2s; position: relative; overflow: hidden;
}
.fma-3d-btn::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transition: 0.5s; }
.fma-3d-btn:hover::after { left: 100%; }
.fma-3d-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(0,0,0,0.2); }

/* Orange Button */
.fma-3d-btn.btn-orange { 
    background: linear-gradient(45deg, var(--c-primary), var(--c-primary-dark)); 
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3); 
}
.fma-3d-btn.btn-orange:hover { box-shadow: 0 15px 30px rgba(245, 158, 11, 0.5); }

/* Purple Button */
.fma-3d-btn.btn-purple { 
    background: linear-gradient(45deg, var(--c-secondary), #0284c7); 
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3); 
}

/* =========================================
   DAILY CHALLENGE MODAL (REVIEW POPUP)
   ========================================= */

.benquiz-popup-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px); display: flex; justify-content: center; align-items: center; padding: 20px; z-index: 99999; }
.benquiz-popup { 
    background: #1e293b; 
    color: var(--c-text-dark); 
    width: 100%; max-width: 950px; border-radius: var(--radius-xl); 
    max-height: 95vh; overflow: hidden; 
    box-shadow: 0 60px 120px rgba(0,0,0,0.7); 
    display: flex; flex-direction: column; animation: slideUp 0.5s ease; 
    border: 1px solid rgba(255,255,255,0.1); 
}
@keyframes slideUp { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.popup-header { background: linear-gradient(135deg, #0f172a, #1e293b); padding: 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); position: sticky; top: 0; z-index: 10; }
.popup-header h2 { margin: 0; font-family: var(--fma-font-heading); font-size: 1.8rem; color: var(--c-primary); }
.benquiz-popup-close { width: 44px; height: 44px; border-radius: 50%; background: rgba(239, 68, 68, 0.2); color: var(--c-danger); border: none; font-size: 1.6rem; cursor: pointer; transition: 0.3s; }
.benquiz-popup-close:hover { background: var(--c-danger); color: white; }

/* FIX: Ensure Popup Body Text is Visible (Overriding potential white backgrounds) */
.popup-body { 
    padding: 40px; 
    overflow-y: auto; 
    flex: 1; 
    background-color: #1e293b !important; /* Force Dark Background */
    color: var(--c-text-dark) !important;
}
.popup-body p, .popup-body span, .popup-body div {
    color: var(--c-text-dark); /* Ensure text is not white on white */
}
@media (max-width: 640px) { .popup-body { padding: 25px; } .popup-header h2 { font-size: 1.4rem; } }

/* Quiz Headers & Numbering FIX */
.daily-q-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }

/* FIX: Q Number Visibility (Making it a visible badge) */
.q-number { 
    font-weight: 800; 
    color: var(--c-primary) !important; /* Gold Text */
    font-size: 1.1rem; 
    background: rgba(15, 23, 42, 0.9); /* Dark Background */
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: inline-block;
}

@media (max-width: 600px) {
    .daily-q-header { flex-direction: column-reverse; align-items: stretch; gap: 25px; }
    .q-number { text-align: center; order: 2; width: 100%; }
    .q-points-badge { justify-content: center; width: 100%; padding: 12px; font-size: 1.1rem; order: 1; }
}

.q-points-badge { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(0,0,0,0)); color: var(--c-primary); padding: 8px 16px; border-radius: 50px; font-weight: 800; font-size: 0.95rem; box-shadow: 0 4px 10px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 6px; border: 1px solid var(--c-primary); }
.benquiz-q-text { font-family: var(--fma-font-heading); font-size: 1.7rem; font-weight: 500; color: var(--c-text-dark); line-height: 1.6; margin-bottom: 35px; text-align: center; }

/* Options */
.bq-options-container { display: flex; flex-direction: column; gap: 20px; margin-top: 30px; }
.bq-option-radio, .bq-option-check { display: flex; align-items: center; padding: 20px 25px; background: rgba(30, 41, 59, 0.6); border: 2px solid #475569; border-radius: 24px; cursor: pointer; transition: all 0.4s ease; position: relative; box-shadow: 0 6px 15px rgba(0,0,0,0.1); }
.bq-option-radio:hover, .bq-option-check:hover { border-color: var(--c-primary); background: rgba(245, 158, 11, 0.05); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(245, 158, 11, 0.1); }
.bq-option-radio.selected, .bq-option-check.selected { border-color: var(--c-primary); background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05)); box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15); }
.bq-radio-circle, .bq-check-box { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #64748b; margin-right: 25px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(0,0,0,0.2); transition: all 0.3s; }
.bq-check-box { border-radius: 12px; } 
.bq-option-radio.selected .bq-radio-circle { background: var(--c-primary); border-color: var(--c-primary); }
.bq-option-check.selected .bq-check-box { background: var(--c-secondary); border-color: var(--c-secondary); }
.bq-opt-text { flex: 1; font-size: 1.3rem; font-weight: 600; color: var(--c-text-dark); padding-right: 20px; }
.bq-mark { font-size: 2.2rem; margin-left: 20px; opacity: 0; transition: opacity 0.4s; }
.opt-correct .bq-mark.correct, .opt-wrong .bq-mark.wrong { opacity: 1; }
.opt-correct { border-color: var(--c-success) !important; background: rgba(16, 185, 129, 0.1) !important; }
.opt-wrong { border-color: var(--c-danger) !important; background: rgba(239, 68, 68, 0.1) !important; }

/* Free Text Input */
.bq-free-text-container { margin-top: 30px; }
.bq-input-wrapper { position: relative; width: 100%; max-width: 600px; margin: 0 auto; }
.bq-text-input { width: 100%; padding: 18px 25px; font-size: 1.2rem; color: #fff; background: var(--c-input-bg); border: 2px solid #475569; border-radius: 20px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 4px 6px rgba(0,0,0,0.1); font-family: var(--fma-font-body); outline: none; }
.bq-text-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 6px var(--c-primary-glow); transform: translateY(-2px); }
.bq-text-input.input-correct { border-color: var(--c-success); background: rgba(16, 185, 129, 0.1); color: var(--c-success); }
.bq-text-input.input-wrong { border-color: var(--c-danger); background: rgba(239, 68, 68, 0.1); color: var(--c-danger); }

/* Multi Free Text */
.bq-multi-container { display: flex; flex-direction: column; gap: 20px; margin-top: 30px; }
.bq-multi-row {
    background: rgba(30, 41, 59, 0.6); padding: 25px 30px; border-radius: 20px;
    border: 1px solid #475569; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; align-items: stretch;
    gap: 15px; font-size: 1.2rem; line-height: 1.6; color: var(--c-text-dark);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.bq-multi-row:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); border-color: var(--c-primary); }
.bq-multi-row input[type="text"] {
    border: 2px solid #475569; border-radius: 12px; padding: 12px 18px;
    font-family: inherit; font-weight: 700; color: var(--c-primary);
    font-size: 1.1rem; width: 100%;
    background: rgba(0,0,0,0.3); transition: all 0.2s; outline: none; margin-top: 5px;
}
.bq-multi-row input[type="text"]:focus { border-color: var(--c-primary); background: rgba(0,0,0,0.5); box-shadow: 0 0 0 4px var(--c-primary-glow); }

/* Matrix Table */
.bq-table-responsive { overflow-x: auto; margin: 30px 0; border-radius: 24px; box-shadow: var(--shadow-float); border: 1px solid rgba(255,255,255,0.1); }
.bq-matrix-table { width: 100%; min-width: 700px; border-collapse: separate; border-spacing: 0; background: #1e293b; overflow: hidden; }
.bq-matrix-table th { background: #0f172a; padding: 25px; font-weight: 800; color: var(--c-primary); text-transform: uppercase; letter-spacing: 1px; font-size: 0.95rem; border-bottom: 2px solid #334155; }
.bq-matrix-table td { padding: 25px; text-align: center; border-bottom: 1px solid #334155; transition: background 0.2s; color: var(--c-text-mid); }
.bq-matrix-table tr:hover td { background: rgba(255,255,255,0.03); }
.bq-matrix-table td:first-child { text-align: left; font-weight: 700; color: var(--c-text-dark); font-size: 1.1rem; padding-left: 30px; }
.bq-matrix-radio {
    appearance: none; width: 28px; height: 28px; 
    border: 2px solid #64748b; border-radius: 6px; background: rgba(0,0,0,0.2);
    cursor: pointer; position: relative; transition: all 0.3s; margin: 0 auto; display: block;
}
.bq-matrix-radio:checked { background: var(--c-primary); border-color: var(--c-primary); transform: scale(1.1); }
.bq-matrix-radio:checked::after {
    content: '✓'; color: white; position: absolute; font-size: 18px; font-weight: bold;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}

/* Feedback & Actions */
.daily-feedback { font-size: 2rem; font-weight: 800; text-align: center; margin: 40px 0; color: var(--c-primary); }
.daily-explanation { background: rgba(16, 185, 129, 0.1); border: 2px solid #10b981; padding: 30px; border-radius: var(--radius-lg); margin-top: 30px; color: #a7f3d0; font-size: 1.2rem; line-height: 1.8; display: none; }
.daily-q-actions { display: flex; justify-content: center; gap: 20px; margin-top: 40px; }

/* Finish Screen */
.daily-finish-screen { text-align: center; padding: 20px 0; }
.finish-header-icon { font-size: 4rem; margin-bottom: 15px; animation: bounce 2s infinite; }
.finish-title { font-family: var(--fma-font-heading); font-size: 2.5rem; color: var(--c-primary); margin: 0 0 40px; }
.finish-stats-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.finish-stat-box { background: rgba(255,255,255,0.05); border-radius: 20px; padding: 25px; border: 2px solid rgba(255,255,255,0.1); }
.finish-stat-box.score-box { border-color: var(--c-primary); background: rgba(245, 158, 11, 0.1); }
.finish-stat-box.coin-box { border-color: var(--c-secondary); background: rgba(14, 165, 233, 0.1); }
.fs-label { display: block; font-size: 1rem; color: var(--c-text-light); margin-bottom: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.fs-value { display: block; font-size: 2.2rem; font-family: var(--fma-font-heading); font-weight: 800; color: var(--c-text-dark); }
.fs-total { font-size: 1.2rem; color: var(--c-text-mid); font-weight: 600; }
.finish-message { margin-bottom: 40px; font-size: 1.3rem; color: var(--c-text-dark); }
.grade-bad { color: var(--c-warning); font-weight: 700; }
.grade-good { color: var(--c-secondary); font-weight: 700; }
.grade-perfect { color: var(--c-success); font-weight: 800; font-size: 1.5rem; text-shadow: 0 2px 10px rgba(16, 185, 129, 0.2); }

/* =========================================
   DASHBOARD SISWA
   ========================================= */

.fma-dashboard-wrapper { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* FIX: Dashboard Header Visibility (Solid background to cover any white parent) */
.fma-dash-header {
    background: linear-gradient(135deg, var(--c-secondary), #0369a1); /* Blue Gradient */
    border-radius: var(--radius-xl);
    padding: 40px; color: white; margin-bottom: 40px; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); position: relative; overflow: hidden; flex-wrap: wrap; gap: 20px;
    z-index: 1; /* Ensure on top */
}
.fma-dash-header::before { content: ''; position: absolute; inset: -50px; background: radial-gradient(circle, rgba(255,255,255,0.1), transparent); border-radius: 50%; pointer-events: none; }

.fma-dash-profile { display: flex; align-items: center; gap: 30px; position: relative; z-index: 2; }
.fma-dash-avatar img { width: 100px; height: 100px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.3); background: #1e293b; }
.fma-dash-welcome h3 { font-family: var(--fma-font-heading); font-size: 2.2rem; margin: 0; text-shadow: 0 2px 4px rgba(0,0,0,0.3); color: #fff; }
.fma-dash-welcome p { font-size: 1.3rem; opacity: 1; margin: 5px 0 0; color: rgba(255,255,255,0.9); font-weight: 500; }

/* FIX: "Gelar" Visibility Issue - Dark Card Style */
.fma-dash-rank-card { 
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95)); /* Dark Opaque Gradient */
    padding: 20px 30px; 
    border-radius: var(--radius-lg); 
    text-align: center; 
    backdrop-filter: blur(10px); 
    position: relative; z-index: 2; min-width: 160px; 
    border: 1px solid rgba(255,255,255,0.2); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.fma-dash-rank-card .label { 
    font-size: 1rem; 
    color: var(--c-text-mid) !important; /* Force light grey text */
    display: block; 
    margin-bottom: 5px; 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.fma-dash-rank-card .value { 
    font-family: var(--fma-font-heading); 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: var(--c-primary) !important; /* Force Gold text */
    text-shadow: 0 0 15px var(--c-primary-glow);
}

.fma-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; margin-bottom: 50px; }

/* FIX: "Saldo Anda" Visibility Issue - Dark Stat Card */
.fma-stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95)); /* Dark Background */
    border-radius: var(--radius-xl); 
    padding: 30px; 
    display: flex; align-items: center; gap: 20px;
    box-shadow: var(--shadow-soft); transition: transform 0.4s; 
    border: var(--glass-border);
    position: relative;
    overflow: hidden;
}
.fma-stat-card:hover { transform: translateY(-10px); background: linear-gradient(135deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 0.95)); box-shadow: 0 20px 40px rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.2); }

.fma-stat-card .icon { 
    font-size: 3rem; 
    background: rgba(14, 165, 233, 0.15); 
    padding: 15px; border-radius: 50%; 
    color: var(--c-secondary); 
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.1);
}
.fma-stat-card .num { 
    font-family: var(--fma-font-heading); 
    font-size: 2.2rem; font-weight: 700; 
    color: var(--c-text-dark); /* Ensure white text */
    font-variant-numeric: tabular-nums; 
}
.fma-stat-card .txt { 
    font-size: 1.1rem; 
    color: var(--c-text-light) !important; /* Ensure light grey text for labels like "Saldo Anda" */
    display: block; 
    font-weight: 600;
}

/* Dashboard Tabs */
.fma-dash-tabs { display: flex; gap: 10px; margin-bottom: 25px; border-bottom: 2px solid rgba(255,255,255,0.1); padding-bottom: 2px; }
.fma-tab-btn {
    background: none; border: none; padding: 12px 25px; font-weight: 700; color: var(--c-text-light);
    cursor: pointer; font-size: 1.1rem; transition: all 0.3s; border-radius: 12px 12px 0 0; position: relative; top: 2px;
}
body .fma-tab-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
body .fma-tab-btn.active { color: var(--c-primary); background: var(--c-card); border-bottom: 3px solid var(--c-primary); }

.fma-tab-content { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Leaderboard & Shop */
.fma-leaderboard-panel, .fma-badges-panel { background: var(--c-card); border-radius: var(--radius-xl); padding: 35px; box-shadow: var(--shadow-soft); border: var(--glass-border); }
.fma-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; padding: 10px 0; }
.fma-shop-item {
    background: #1e293b; border: 2px solid #334155; border-radius: 20px; padding: 30px 20px 20px 20px; text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
    height: 100%; min-height: 280px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.fma-shop-item:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); border-color: var(--c-text-light); }
.fma-shop-item.owned { background: rgba(16, 185, 129, 0.1); border-color: var(--c-success) !important; }

/* TIER BADGES */
.tier-badge { 
    position: absolute; top: 0; left: 0; padding: 4px 12px; font-size: 0.7rem; font-weight: 800; 
    color: #fff; border-bottom-right-radius: 16px; text-transform: uppercase; letter-spacing: 1px; z-index: 5;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}
.tier-common { border-color: #475569; } .tier-common .tier-badge { background: #64748b; }
.tier-rare { border-color: #3b82f6; } .tier-rare .tier-badge { background: #3b82f6; } .tier-rare:hover { box-shadow: 0 15px 30px rgba(59, 130, 246, 0.2); }
.tier-epic { border-color: #a855f7; border-width: 2px; } .tier-epic .tier-badge { background: #a855f7; } .tier-epic:hover { box-shadow: 0 15px 30px rgba(168, 85, 247, 0.25); }
.tier-legendary { border: 2px solid #f59e0b; background: linear-gradient(135deg, #1e293b, #292524); } .tier-legendary .tier-badge { background: #f59e0b; font-size: 0.8rem; padding: 5px 15px; } .tier-legendary:hover { box-shadow: 0 20px 40px rgba(245, 158, 11, 0.3); transform: scale(1.02) translateY(-8px); }
.tier-godly { border: 2px solid #ef4444; background: linear-gradient(135deg, #1e293b 0%, #3f1515 100%); animation: godlyPulse 3s infinite; } .tier-godly .tier-badge { background: #ef4444; font-size: 0.85rem; padding: 6px 18px; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4); } .tier-godly:hover { transform: scale(1.05); }

/* Avatar Preview */
.shop-item-visual img { transition: transform 0.3s ease, border-color 0.3s ease; border-radius: 50%; border: 3px solid transparent; }
.fma-shop-item:hover .shop-item-visual img { transform: scale(1.1); }
.tier-legendary:hover .shop-item-visual img { border-color: #f59e0b !important; }
.tier-godly .shop-item-visual img { border-color: #ef4444 !important; box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }

.fma-btn-buy, .fma-btn-equip { font-family: var(--fma-font-heading); font-weight: 700; letter-spacing: 0.5px; padding: 10px 0; border-radius: 12px; transition: 0.2s; font-size: 1rem; cursor: pointer; border: none; color: #fff; }
.fma-btn-buy { background: #334155; }
.fma-btn-buy:not(:disabled):hover { background: var(--c-primary) !important; transform: translateY(-2px); box-shadow: 0 4px 10px var(--c-primary-glow); opacity: 1; }
.fma-btn-buy:disabled { opacity: 0.6; cursor: not-allowed; background: #1e293b; color: #64748b; }
.fma-btn-equip { background: var(--c-success); }
.fma-btn-equip:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); opacity: 1; }

/* Sticky Logic Fix */
.fma-lb-table { display: flex; flex-direction: column; gap: 12px; max-height: 500px; overflow-y: auto; padding-right: 5px; position: relative; overflow-x: hidden; }
.fma-lb-row { display: flex; align-items: center; gap: 20px; padding: 15px 20px; background: rgba(30, 41, 59, 0.6); border-radius: var(--radius-md); transition: all 0.3s; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.fma-lb-row:hover { background: rgba(51, 65, 85, 0.8); box-shadow: 0 5px 15px rgba(0,0,0,0.2); transform: scale(1.02); }
.fma-lb-row.is-me { background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), rgba(30, 41, 59, 0.9)); border-left: 5px solid var(--c-primary); position: sticky; bottom: 0; z-index: 10; box-shadow: 0 -5px 15px rgba(0,0,0,0.3); }
.lb-pos { font-size: 1.4rem; font-weight: 800; width: 40px; text-align: center; color: var(--c-text-light); }
.fma-lb-row.rank-1 .lb-pos { font-size: 2rem; } 
.fma-lb-row.rank-2 .lb-pos { font-size: 1.8rem; }
.fma-lb-row.rank-3 .lb-pos { font-size: 1.6rem; }
.lb-user { display: flex; align-items: center; gap: 15px; flex: 1; overflow: hidden; }
.lb-avatar { width: 45px; height: 45px; border-radius: 50%; border: 2px solid #475569; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.lb-name { font-weight: 700; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-text-dark); }
.me-badge { background: var(--c-primary); color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; margin-left: auto; }
.lb-score { font-weight: 800; font-size: 1.2rem; color: var(--c-primary); font-variant-numeric: tabular-nums; }
.fma-badges-grid-dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 20px; }
.fma-dash-badge { text-align: center; }
.fma-dash-badge .badge-emoji { font-size: 3rem; display: block; margin-bottom: 8px; transition: transform 0.4s; }
.fma-dash-badge.unlocked .badge-emoji { animation: bounce 2s infinite; }
.fma-dash-badge .badge-name { font-weight: 600; font-size: 0.9rem; color: var(--c-text-mid); line-height: 1.3; }
.fma-dash-badge.locked .badge-name { opacity: 0.5; }

/* Toast Notification */
#fma-toast-container { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 999999; display: flex; flex-direction: column; gap: 15px; pointer-events: none; }
.fma-toast {
    background: rgba(15, 23, 42, 0.95); color: white; padding: 18px 30px; border-radius: 50px; font-weight: 700; font-size: 1.1rem;
    backdrop-filter: blur(12px); box-shadow: 0 20px 50px rgba(0,0,0,0.6); opacity: 0; transform: translateY(50px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; align-items: center; gap: 15px; white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
}
.fma-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.fma-toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.fma-toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }