/* adventure-style.css - Ultimate v22.4.6 - Multi-Map & Anti-Farming Edition */
/* Harmonized with Benang Lurus "Math Adventure" PHP v22.4.6 */
/* FEATURES: Active Learning Bar, Victory Overlay, Floating Coins, Enhanced Map Visuals */

@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 */
    --c-info: #6366f1;         /* Indigo */
    
    /* UI Structure */
    --c-card: rgba(30, 41, 59, 0.85); /* Increased Opacity */
    --c-card-solid: #1e293b;          
    --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 & EFFECTS
   ========================================= */

@keyframes fmaPulse { 
    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 15px rgba(245, 158, 11, 0); } 
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } 
}

@keyframes fmaShake { 
    10%, 90% { transform: translateX(-1px); } 
    20%, 80% { transform: translateX(2px); } 
    30%, 50%, 70% { transform: translateX(-4px); } 
    40%, 60% { transform: translateX(4px); } 
}

@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 coinSpin {
    0% { transform: scaleX(1); }
    50% { transform: scaleX(0.5); }
    100% { transform: scaleX(1); }
}

/* Utility Classes for JS Animation */
.fma-active-pulse { animation: fmaPulse 2s infinite; z-index: 5; position: relative; }
.shake-element { animation: fmaShake 0.5s cubic-bezier(.36,.07,.19,.97) both; }

/* =========================================
   FLOATING COIN ANIMATION
   ========================================= */
.fma-floating-coins {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2147483647; /* Top Most */
    pointer-events: none;
    animation: floatUpFade 2s ease-out forwards;
    text-align: center;
    width: 300px;
    height: 300px;
}

.fma-floating-coins .coin-visual {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
    margin-bottom: 10px;
    display: block;
}

.fma-floating-coins .coin-amount {
    font-family: var(--fma-font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--c-primary);
    text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    margin-top: -10px;
    display: block;
}

@keyframes floatUpFade { 
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } 
    20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 
    100% { transform: translate(-50%, -150px) scale(1); opacity: 0; } 
}

/* =========================================
   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% !important; object-fit: cover; animation: floatHead 6s ease-in-out infinite; display: block;}
.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 (Multi-Map Support)
   ========================================= */

/* Main Map Wrapper (Matches PHP Output) */
.fma-grand-map {
    position: relative; 
    width: 100%; 
    min-height: 100vh;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 0 100px rgba(0,0,0,0.8);
    border: none;
    background: linear-gradient(to bottom, #020617 0%, #1e1b4b 50%, #312e81 100%);
    display: block;
    padding-top: 0;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .fma-grand-map { min-height: 100vh; border-radius: 0; padding-top: 40px; }
    .node-icon-box { width: 60px !important; height: 60px !important; font-size: 30px !important; }
    .node-label { font-size: 10px !important; padding: 4px 8px !important; max-width: 100px; white-space: normal; text-align: center; }
}

/* Background Elements */
.stars-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px), radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px); background-size: 550px 550px, 350px 350px; opacity: 0.8; animation: starMove 120s linear infinite; }
@keyframes starMove { from { transform: translateY(0); } to { transform: translateY(-550px); } }
.mystic-fog { position: absolute; top: 0; left: 0; width: 200%; height: 100%; background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent, rgba(168, 85, 247, 0.1), transparent); animation: fogFlow 60s linear infinite; pointer-events: none; z-index: 2; }
@keyframes fogFlow { 0% { transform: translateX(-50%); } 100% { transform: translateX(0%); } }

/* Dynamic Islands */
.biome-island { 
    position: absolute; 
    border-radius: 50%; 
    filter: blur(35px); 
    opacity: 0.6; 
    transform: translate(-50%, -50%); 
    animation: floatIsland 10s ease-in-out infinite; 
    pointer-events: none;
    z-index: 3;
}
@keyframes floatIsland { 0%,100%{transform:translate(-50%,-50%) scale(1);} 50%{transform:translate(-50%,-55%) scale(1.1);} }

/* Nodes (Map Level Items) */
.node-wrapper { 
    position: absolute; transform: translate(-50%, -50%); z-index: 10; 
    display: flex; flex-direction: column; align-items: center; 
    text-decoration: none !important; transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    width: max-content; 
    max-width: 150px;
}

.node-icon-box { 
    width: 90px; height: 90px; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(8px); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    font-size: 45px; box-shadow: 0 0 25px rgba(139, 92, 246, 0.4); 
    border: 2px solid rgba(255,255,255,0.3); position: relative; overflow: visible; transition: transform 0.3s; 
}

.node-label { 
    background: rgba(2, 6, 23, 0.95); color: #e2e8f0; padding: 6px 14px; border-radius: 20px; 
    font-size: 12px; font-weight: bold; margin-top: 10px; border: 1px solid rgba(255,255,255,0.15); 
    white-space: nowrap; transition: 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.3); 
    overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

/* Locked Node Style (Matches PHP logic for hiding progress but showing lock) */
.node-wrapper.locked { 
    cursor: not-allowed; 
    opacity: 1; 
    filter: grayscale(0.8); 
    pointer-events: none; /* Disable interaction visually and logically */
}
.node-wrapper.locked .node-icon-box { 
    background: rgba(30, 41, 59, 0.9); 
    border-color: #475569; 
}
.node-wrapper.locked .node-label { 
    background: rgba(185, 28, 28, 0.8) !important; /* Red tint */
    color: #ffffff !important;
    border: 1px solid #fca5a5;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    opacity: 0.8;
}

/* Mini Lock Indicator (if present in PHP) */
.mini-lock-indicator {
    position: absolute; bottom: -5px; right: -5px; width: 24px; height: 24px;
    background: #ef4444; color: #fff; border-radius: 50%; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.3); z-index: 20;
}

.node-wrapper.current .node-icon-box { border-color: #f59e0b; box-shadow: 0 0 40px rgba(245, 158, 11, 0.6), inset 0 0 20px rgba(245, 158, 11, 0.2); transform: scale(1.1); animation: pulseNode 3s infinite; }
.node-wrapper.current .node-label { background: #d97706; color: #fff; transform: translateY(5px); }
.node-wrapper.completed .node-icon-box { border-color: #10b981; background: rgba(6, 78, 59, 0.8); }
.node-wrapper.completed::after { content: "✓"; position: absolute; bottom: 0; right: 0; background: #10b981; color: white; width: 30%; height: 30%; border-radius: 50%; font-size: 12px; display: flex; align-items: center; justify-content: center; border: 2px solid #0f172a; }

.node-wrapper.unlocked:hover { transform: translate(-50%, -60%) scale(1.15); z-index: 20; }
.node-wrapper.unlocked:hover .node-icon-box { background: rgba(255,255,255,0.1); color: #fff; border-color:#fff; }

@keyframes pulseNode { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); } 70% { box-shadow: 0 0 0 20px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }


/* =========================================
   LOGIN SCREEN
   ========================================= */
.fma-login-wrapper {
    display: flex; justify-content: center; align-items: center; padding: 60px 20px; min-height: 80vh;
}
.fma-login-card {
    background: #1e293b; padding: 50px 40px; border-radius: 30px; text-align: center; 
    max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.6); 
    border: 2px solid rgba(255,255,255,0.1); color: #fff; position: relative; overflow: hidden;
}
.fma-login-card::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent); animation: rotateBg 10s linear infinite; pointer-events: none; }
@keyframes rotateBg { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.fma-login-card input[type="text"] {
    width: 100%; padding: 18px; font-size: 1.6rem; text-align: center; text-transform: uppercase; letter-spacing: 4px; 
    border-radius: 15px; border: 3px solid #475569; background: #0f172a; color: #f59e0b; 
    font-weight: 800; outline: none; margin-bottom: 25px; transition: 0.3s;
}
.fma-login-card input[type="text"]:focus { border-color: var(--c-primary); box-shadow: 0 0 20px var(--c-primary-glow); transform: scale(1.02); }


/* =========================================
   PATH / TIMELINE & DYNAMIC TOPICS
   ========================================= */

.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; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.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); }

/* Current Item (Available but not done) */
.step-details li.current a {
    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);
}

/* NEW: Viewing State (Currently Active Page) */
.step-details li.viewing a {
    border-color: var(--c-accent);
    background: rgba(56, 189, 248, 0.15);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
    color: var(--c-accent);
    position: relative;
    overflow: hidden;
}
.step-details li.viewing a::after {
    content: '👁️';
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    font-size: 1.2rem; opacity: 0.8;
}

/* --- 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); }

/* --- 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 { 
    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); margin-bottom: 20px;
}

.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 & FLOATING ACTIONS
   ========================================= */

.fma-3d-btn {
    font-family: var(--fma-font-heading, sans-serif); font-weight: 700; padding: 16px 40px; border: none;
    border-radius: 50px; font-size: 1.2rem; color: white; cursor: pointer; position: relative; overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 10px 25px rgba(0,0,0,0.2); margin-bottom: 20px; 
}
.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.4), transparent); transition: 0.5s; 
}
.fma-3d-btn:hover::after { left: 100%; }
.fma-3d-btn:hover { transform: translateY(-5px); box-shadow: 0 20px 35px rgba(0,0,0,0.3); }
.fma-3d-btn:active { transform: translateY(2px); box-shadow: 0 5px 10px rgba(0,0,0,0.2); }

.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 20px 40px rgba(245, 158, 11, 0.5); }
.fma-3d-btn.btn-purple { background: linear-gradient(45deg, var(--c-secondary), #0284c7); box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3); }
.fma-3d-btn.btn-purple:hover { box-shadow: 0 20px 40px rgba(14, 165, 233, 0.5); }

/* =========================================
   ACTIVE LEARNING BAR (Sticky Footer)
   ========================================= */
.fma-learning-bar { 
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); 
    background: #1e293b; padding: 10px 20px; border-radius: 50px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.4); z-index: 9990; 
    display: flex; align-items: center; gap: 15px; 
    transition: all 0.3s; width: 90%; max-width: 450px; 
    justify-content: space-between; border: 2px solid rgba(255,255,255,0.1); 
}
.fma-timer-circle { width: 40px; height: 40px; position: relative; }
.fma-timer-svg { transform: rotate(-90deg); width: 40px; height: 40px; }
.fma-timer-circle circle { fill: none; stroke-width: 4; stroke: #334155; }
.fma-timer-circle circle.progress { stroke: #f59e0b; stroke-dasharray: 113; stroke-dashoffset: 113; transition: stroke-dashoffset 1s linear; }
.fma-learning-text { color: #fff; font-weight: 600; font-size: 0.95rem; flex: 1; }

.fma-claim-btn { 
    background: #64748b; color: #cbd5e1; border: none; padding: 8px 20px; 
    border-radius: 25px; font-weight: 700; cursor: not-allowed; 
    transition: all 0.3s; font-size: 0.9rem; pointer-events: none; 
}

/* Status Completed */
.fma-learning-bar.completed { background: #10b981; border-color: #059669; justify-content: center; }
.fma-learning-bar.completed .fma-learning-text { text-align: center; color: #fff; font-size: 1rem; }
.fma-learning-bar.completed .fma-timer-circle, .fma-learning-bar.completed .fma-claim-btn { display: none; }

/* Status Ready to Claim */
.fma-learning-bar.ready { background: #fff; border-color: #f59e0b; }
.fma-learning-bar.ready .fma-learning-text { color: #1e293b; }
.fma-learning-bar.ready .fma-claim-btn { 
    background: linear-gradient(135deg, #f59e0b, #d97706); 
    color: #fff; cursor: pointer; pointer-events: auto; 
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4); 
    animation: fmaPulse 2s infinite;
}
.fma-learning-bar.ready .fma-claim-btn:hover { transform: scale(1.05); }

/* =========================================
   VICTORY OVERLAY (MODAL)
   ========================================= */
.fma-victory-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.85); z-index: 99999; 
    display: flex; justify-content: center; align-items: center; 
    opacity: 0; visibility: hidden; transition: all 0.3s; backdrop-filter: blur(5px); 
}
.fma-victory-overlay.show { opacity: 1; visibility: visible; }
.fma-victory-card { 
    background: #fff; width: 90%; max-width: 350px; border-radius: 25px; padding: 30px; 
    text-align: center; transform: scale(0.8); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    position: relative; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5); 
}
.fma-victory-overlay.show .fma-victory-card { transform: scale(1); }
.fma-victory-icon { font-size: 4rem; margin-bottom: 10px; animation: bounceMarker 2s infinite; }
.fma-victory-title { font-size: 1.5rem; color: #1e293b; margin: 0 0 10px 0; font-weight: 800; }
.fma-victory-desc { color: #64748b; font-size: 0.95rem; margin-bottom: 20px; }
.fma-victory-coins { font-size: 2rem; color: #f59e0b; font-weight: 800; margin-bottom: 25px; display: block; }
.fma-victory-btn { 
    background: #6366f1; color: #fff; border: none; padding: 12px 30px; border-radius: 15px; 
    font-weight: 700; width: 100%; font-size: 1rem; cursor: pointer; box-shadow: 0 5px 0 #4f46e5; transition: all 0.1s; 
}
.fma-victory-btn:active { transform: translateY(5px); box-shadow: none; }

/* =========================================
   FLOATING CENTER ALERT (ELEGANT POPUP)
   ========================================= */
.fma-floating-alert {
    position: fixed; top: 15%; left: 50%; transform: translateX(-50%) translateY(-20px); 
    z-index: 100000; opacity: 0; visibility: hidden;
    padding: 15px 30px; border-radius: 50px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center; gap: 15px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 300px; text-align: center;
}
.fma-floating-alert.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.fma-floating-alert.error { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; border: 2px solid #fff; text-shadow: 0 2px 2px rgba(0,0,0,0.2); }
.fma-floating-alert.success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: 2px solid #fff; }

/* =========================================
   ENHANCED TOAST NOTIFICATIONS (SIDE)
   ========================================= */
#fma-toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.fma-toast { 
    pointer-events: auto; background: #fff; color: #1e293b; padding: 15px 20px; 
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 12px; 
    transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    border-left: 5px solid #cbd5e1; max-width: 300px; font-family: 'Fredoka', sans-serif; 
}
.fma-toast.show { transform: translateX(0); }
.fma-toast.success { border-left-color: #10b981; }
.fma-toast.error { border-left-color: #ef4444; }
.fma-toast.info { border-left-color: #3b82f6; }
.fma-toast-icon { font-size: 1.5rem; }
.fma-toast-content { display: flex; flex-direction: column; text-align: left; }
.fma-toast-title { font-weight: 700; font-size: 0.95rem; }
.fma-toast-msg { font-size: 0.85rem; color: #64748b; line-height: 1.3; }

/* =========================================
   DASHBOARD SISWA
   ========================================= */

.fma-dashboard-wrapper { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Dashboard Header */
.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;
}
.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; }

.fma-dash-rank-card { 
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95)); 
    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; 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; 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; }

.fma-stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95)); 
    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); font-variant-numeric: tabular-nums; 
}
.fma-stat-card .txt { 
    font-size: 1.1rem; color: var(--c-text-light) !important; 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 Leaderboard */
.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; }

/* =========================================
   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; }

.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 */
.daily-q-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.q-number { 
    font-weight: 800; color: var(--c-primary) !important; font-size: 1.1rem; 
    background: rgba(15, 23, 42, 0.9); 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); }

/* 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); }

/* =========================================
   UTILITY & OVERRIDES
   ========================================= */

/* FIX: HIDE NAVIGATION BUTTON IN UNWANTED AREAS */
.elegantexam-front-wrap .fma-bottom-nav,
.elegantexam-front-wrap .fma-return-btn,
.elegantexam-results-container .fma-bottom-nav,
.daily-explanation .fma-bottom-nav,
.daily-explanation .fma-return-btn,
.quiz-explanation .fma-return-btn,
.benquiz-popup .fma-bottom-nav,
.benquiz-popup .fma-return-btn,
.elegantexam-popup .fma-bottom-nav,
.elegantexam-popup .fma-return-btn,
.elegantexam-explanation-body .fma-bottom-nav {
    display: none !important;
}

/* Ensure Main Button remains visible */
body > .adventure-game-wrapper .fma-bottom-nav,
.main-content > .fma-bottom-nav {
    display: flex !important;
    justify-content: center;
    width: 100%;
}