/* --- GLOBAL & VARS --- */
:root {
    --sidebar-bg: #1a1a2e;
    --main-bg: #081041;
    --card-bg: #ffffff;
    --accent-color: #00d2ff;
    --text-main: #2c3e50;
    --text-muted: #636e72;
    --sidebar-text: #a0a0b0;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Engine Colors */
    --nav-color: #00bcd4;   /* Cyan */
    --nav-bg: #e0f7fa;
    --launch-color: #ff9800; /* Orange */
    --launch-bg: #fff3e0;
    --seq-color: #9c27b0;    /* Purple */
    --seq-bg: #f3e5f5;
    --smash-color: #f44336;  /* Red */
    --smash-bg: #ffebee;
}

body { 
    margin: 0; padding: 0; 
    background: #081041; 
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; 
    overflow: hidden; 
    height: 100vh;
}

/* --- HOME SCREEN --- */
#home-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.home-container {
    text-align: center;
    max-width: 600px;
    padding: 40px;
}

.home-logo {
    margin-bottom: 20px;
}

.home-title {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 48px;
    margin: 20px 0 10px 0;
    color: white;
}

.home-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 50px;
}

.path-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.path-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 40px 50px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
    color: white;
}

.path-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.path-btn:active {
    transform: translateY(-2px);
}

.path-btn.path-quest {
    opacity: 0.6;
    cursor: not-allowed;
}

.path-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.path-name {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.path-desc {
    font-size: 14px;
    opacity: 0.8;
}

/* --- LAYOUT STRUCTURE --- */
#dashboard-screen {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar removed - no longer needed */

.content-area {
    flex: 1;
    min-height: 0; /* Allow flex child to shrink so overflow-y works */
    overflow-y: auto;
    padding: 0;
    padding-bottom: 80px; /* Space for fixed footer */
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--main-bg);
}

.content-area > section,
.content-area > div {
    padding-left: 30px;
    padding-right: 30px;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #081041;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 6px solid #fff;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo-pair {
    position: relative;
    cursor: pointer;
}

.header-logo-pair .header-rfinu {
    position: absolute;
    height: 30px;
    width: auto;
    left: 0;
    bottom: 100%;
    margin-bottom: -28px;
    z-index: 1;
}

.header-logo-pair .header-amlogo {
    display: block;
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.header-logo {
    height: 40px;
    cursor: pointer;
}

.header-brand {
    font-family: 'Bubblegum Sans', cursive;
    font-size: 58px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 10px rgba(255,255,255,0.35);
    white-space: nowrap;
    margin-right: 20px;
}

.header-center {
    display: flex;
    gap: 0;
    flex: 1;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px 15px;
    max-width: 600px;
    border: 1px solid rgba(255,255,255,0.12);
}

.header-bizname-wrap {
    min-width: 0;
    max-width: 400px;
    background: transparent !important;
    border: none !important;
}

.bizname-link {
    color: #ffd400;
    font-weight: 700;
    font-size: 2.8vh;
    white-space: nowrap;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: color 0.2s, text-shadow 0.2s;
}
.bizname-link:hover {
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 212, 0, 0.6);
}

.bizname-text {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    font-size: 2.8vh;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.header-tabs-container {
    display: flex;
    gap: 0;
    flex: 1;
}

.header-tab {
    background: transparent;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    color: #01579b;
    flex: 1;
    text-align: center;
    position: relative;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    min-width: 0;
}

.header-tab:hover {
    background: rgba(0, 188, 212, 0.2);
    color: #006064;
}

.header-tab.active {
    background: #081041;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 172, 193, 0.4);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}
.header-nav-link:hover {
    color: #00d2ff;
}

.auth-cta-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

.unlock-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.unlock-timer {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    min-height: 14px;
}

.payment-cta {
    background: #ffd400;
    color: #000;
    border: none;
    border-radius: 16px;
    padding: 10px 18px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 212, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.payment-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 212, 0, 0.45);
}

.fun-run-fab {
    /* 1. Layout & Positioning (The Scroll-Off Magic) */
    position: relative; /* Removes it from fixed overlay, puts it in normal document flow */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* 2. Sizing (Making it a horizontal bar) */
    width: 90%; 
    max-width: 500px; /* Keeps it from getting ridiculously wide on a TV */
    margin: 30px auto 40px auto; /* Centers it horizontally, adds space above and below */
    padding: 16px 20px;
    border-radius: 99px; /* Keeps the smooth pill shape */
    
    /* 3. Aesthetics (Kept from your original design) */
    background: linear-gradient(135deg, #ff5f9e, #ffb347);
    color: #101010;
    font-weight: 800;
    font-size: 18px; /* Slightly larger text for a banner */
    border: 3px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 18px rgba(255, 180, 80, 0.45);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}
.fun-run-fab:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 36px rgba(0,0,0,0.35), 0 0 22px rgba(255, 180, 80, 0.6);
}
.fun-run-fab.locked {
    opacity: 0.6;
    filter: grayscale(0.4);
}
.fun-run-fab.locked::after {
    content: ' 🔒';
}

/* --- PAYMENT PAGE --- */
.payment-body {
    background: #081041;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.payment-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px 60px;
}
.payment-card {
    width: min(980px, 94vw);
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.18);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    padding: 30px;
    color: #fff;
}
.payment-card h1 {
    margin: 0 0 6px 0;
    font-size: 34px;
    font-weight: 800;
}
.payment-subtitle {
    margin: 0 0 24px 0;
    opacity: 0.9;
}
.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    align-items: center;
}
.payment-qr-wrap {
    background: rgba(255,255,255,0.12);
    border: 2px dashed rgba(255,255,255,0.35);
    border-radius: 18px;
    padding: 18px;
    text-align: center;
}
.payment-qr {
    max-width: 100%;
    width: 280px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}
.payment-qr-caption {
    margin-top: 12px;
    font-size: 14px;
    opacity: 0.85;
}
.plan-options {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Adds space between the 3 cards */
    margin-bottom: 20px;
}
/* 2. The clickable card layout */
.plan-option { 
    position: relative; 
    display: flex;             /* Aligns radio and text side-by-side */
    align-items: center;       /* Centers them vertically */
    gap: 15px;                 /* Space between radio and text */
    padding: 15px 20px; 
    border: 2px solid rgba(255,255,255,0.25); /* Gives the badge a box to sit on */
    border-radius: 12px;
    background: rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-option:has(input:checked) {
    border-color: #ffb347;
    background: rgba(255, 179, 71, 0.1);
}
.plan-text {
    display: flex;
    flex-direction: column; /* Stacks Title above Price */
    gap: 4px;
}
.plan-badge { 
        position: absolute; top: -10px; right: -10px; 
        background: #ff5f9e; color: #fff; 
        font-size: 0.75rem; font-weight: 800; 
        padding: 4px 8px; border-radius: 8px; 
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
    .plan-badge.best-value { background: #00d2ff; color: #000; }
    .strike { text-decoration: line-through; color: #888; font-size: 0.9rem; margin-left: 5px; }

.plan-option input {
    transform: scale(1.3);
}
.plan-title {
    font-weight: 700;
    font-size: 16px;
}
.plan-price {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.plan-sub {
    font-size: 12px;
    opacity: 0.85;
}
.payment-label {
    display: block;
    font-weight: 600;
    margin: 12px 0 8px 0;
}
.payment-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.15);
    color: #fff;
    outline: none;
    font-size: 15px;
    box-sizing: border-box;
}
.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}
.payment-btn {
    flex: 1;
    padding: 14px 18px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    width: 100%;
}
.payment-btn.primary {
    background: #1b4b9b;
    color: #fff;
    box-shadow: 0 10px 24px rgba(27, 75, 155, 0.35);
}
.payment-btn.ghost {
    background: transparent;
    color: #1b4b9b;
    border: 2px solid #1b4b9b;
}
.payment-note {
    margin-top: 14px;
    font-size: 12px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .payment-grid {
        grid-template-columns: 1fr;
    }
    .payment-card {
        padding: 22px;
    }
    .payment-card h1 {
        font-size: 26px;
    }
    .payment-qr {
        width: 220px;
    }
}

/* --- LOGIN PAGE --- */
.login-card {
    max-width: 440px;
    margin: 0 auto;
    text-align: center;
}
.login-logo {
    display: block;
    height: 48px;
    margin: 0 auto 24px auto;
}

.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.06);
}

.login-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.login-tab:hover {
    color: #374151;
}

.login-tab.active {
    background: #081041;
    color: white;
}

.login-form.hidden {
    display: none !important;
}
.login-back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
}
.login-back-link:hover {
    color: #00d2ff;
}
.google-btn {
    background: #4285F4;
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}
.google-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(66,133,244,0.4);
}
#landscape-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.92);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}
#landscape-prompt .icon {
    font-size: clamp(60px, 15vw, 80px);
    margin-bottom: 15px;
}
#landscape-prompt .title {
    font-size: clamp(22px, 6vw, 28px);
    font-weight: bold;
    margin-bottom: 10px;
}
#landscape-prompt .sub {
    font-size: clamp(16px, 4vw, 20px);
    opacity: 0.9;
}

/* --- STATIC PAGES (index, login, payment, terms, privacy, refund) --- */
.static-body {
    background: #f9fafb;
    color: #111827;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}
.static-body.body-overflow-auto { overflow-y: auto; }

.static-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}
.static-container--narrow { max-width: 768px; }
.static-container--wide { max-width: 1024px; }

.static-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #f3f4f6;
    padding: 32px;
    box-sizing: border-box;
}
.static-card--lg { padding: 40px; }

.static-hero {
    text-align: center;
    padding: 64px 0;
}
.static-hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin: 0 0 12px 0;
}
.static-hero .accent { color: #4f46e5; }
.static-hero p {
    font-size: 20px;
    color: #4b5563;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.static-cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}
.static-cta-row--col { flex-direction: column; }
.static-cta-row a, .static-cta-row button { min-width: 180px; text-align: center; text-decoration: none; }

.static-btn {
    display: inline-block;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    text-align: center;
    box-sizing: border-box;
}
.static-btn:hover { transform: translateY(-1px); }
.static-btn-primary {
    background: #4f46e5;
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}
.static-btn-primary:hover { background: #4338ca; }

.static-btn-ghost {
    background: #fff;
    color: #4f46e5;
    border: 2px solid #4f46e5;
}
.static-btn-ghost:hover { background: #eef2ff; }

.static-demo {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 16px;
    border: 4px dashed #d1d5db;
    margin: 32px 0;
}
.static-demo p { color: #6b7280; font-weight: 600; margin: 0; }

.static-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    padding: 64px 0;
    text-align: center;
}
.static-feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #f3f4f6;
}
.static-feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
}
.static-feature-card p {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
}

.static-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 32px 0;
    margin-top: 32px;
    border-top: 1px solid #e5e7eb;
}
.static-footer a {
    color: #818cf8;
    text-decoration: none;
}
.static-footer a:hover { text-decoration: underline; }

/* --- STATIC INPUTS & FORMS --- */
.static-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}
.static-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* In-page message box (replaces alert) */
.message-box {
  padding: 14px 20px;
  margin: 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  max-width: 480px;
  box-sizing: border-box;
}
.message-box--hidden { display: none !important; }
.message-box--error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.message-box--success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.message-box:not(.message-box--hidden) {
  margin-bottom: 16px;
}

.static-form-group { display: flex; flex-direction: column; gap: 12px; }
.static-form-divider { text-align: center; color: #6b7280; font-weight: 600; margin: 20px 0; }
.static-link { color: #4f46e5; text-decoration: none; }
.static-link:hover { text-decoration: underline; }

/* --- DOC PAGES (terms, privacy, refund) --- */
.static-doc { padding: 48px; }
.static-doc h1 { font-size: 24px; font-weight: 700; color: #111827; margin: 0 0 8px 0; }
.static-doc h2 { font-size: 18px; font-weight: 600; color: #1f2937; margin: 24px 0 8px 0; }
.static-doc p, .static-doc ul { margin: 0 0 16px 0; }
.static-doc li { margin-bottom: 8px; }
.static-doc .doc-date { color: #6b7280; font-style: italic; font-size: 14px; }
.static-doc code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

.static-doc .warning-box {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}
.static-doc .warning-box h2 { color: #b91c1c; margin-top: 0; font-size: 16px; }

.static-doc .highlight-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}
.static-doc .highlight-box h2 { color: #1e40af; margin-top: 0; font-size: 16px; }

/* --- PAYMENT PAGE SPECIFIC --- */
.static-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px;
}
.static-plan-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.static-plan-option:hover { border-color: #c7d2fe; }
.static-plan-option.selected { border-color: #4f46e5; }
.static-plan-option input { margin-right: 12px; }
.static-plan-option .badge {
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.static-plan-option .badge--default { background: #eef2ff; color: #4338ca; }
.static-plan-option .badge--primary { background: #4f46e5; color: #fff; }
.static-plan-option .strike { color: #9ca3af; text-decoration: line-through; font-size: 14px; }
.static-payment-actions { display: flex; gap: 12px; margin-top: 16px; }
.static-payment-actions .static-btn { flex: 1; }

@media (max-width: 768px) {
    .static-payment-grid { grid-template-columns: 1fr; }
    .static-cta-row { flex-direction: column; }
    .static-cta-row a, .static-cta-row button { width: 100%; }
}

/* --- OFFER PAGE SPECIFIC --- */
.static-card.offer-card {
    position: relative;
    border: 2px solid #4f46e5;
    text-align: center;
}
.offer-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    padding: 6px 24px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.offer-card h1 { font-size: clamp(22px, 4vw, 28px); margin: 16px 0 12px 0; color: #111827; }
.offer-price-label {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}
.offer-price {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 900;
    color: #000;
    margin: 12px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.offer-price span {
    font-size: 1.15rem;
    color: #334155;
    font-weight: 600;
}
.offer-save {
    display: inline-block;
    background: #059669;
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    margin-top: 12px;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}
.offer-strike {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 10px;
}
.offer-strike span { color: #64748b; text-decoration: line-through; }
.offer-roi-list { margin: 28px 0; padding: 0; list-style: none; text-align: left; }
.offer-roi-item { margin-bottom: 20px; display: flex; align-items: flex-start; gap: 12px; }
.offer-roi-icon { font-size: 24px; flex-shrink: 0; }
.offer-roi-text b { display: block; color: #111827; font-size: 16px; margin-bottom: 4px; }
.offer-roi-text p { margin: 0; color: #4b5563; line-height: 1.5; font-size: 14px; }
.offer-cta { display: block; width: 100%; text-align: center; text-decoration: none; padding: 16px; border-radius: 12px; font-weight: 800; font-size: 18px; box-sizing: border-box; }
.offer-fomo-banner { background: #fff1f2; border: 1px solid #fda4af; color: #9f1239; padding: 14px; border-radius: 12px; font-weight: 700; margin: 20px 0; font-size: 15px; }
.offer-guarantee { margin-top: 16px; font-size: 13px; color: #9ca3af; }

@media (max-width: 480px) {
    .offer-card { padding: 24px 20px; }
    .offer-price { font-size: 2rem; }
}

/* Search Section */
.search-section {
    padding: 15px 30px;
    background: white;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-wrapper.full-width {
    width: 100%;
}

.search-wrapper.full-width .search-inner {
    max-width: 100%;
    border: 2px solid #667eea;
    border-radius: 25px;
    background: white;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-wrapper.full-width .search-inner:focus-within {
    border-color: #764ba2;
    box-shadow: 0 2px 12px rgba(118, 75, 162, 0.3);
}

.search-wrapper.full-width .search-input {
    border: none;
    outline: none;
    background: transparent;
}

/* --- SIDEBAR COMPONENTS --- */
.dash-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 30px;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
}

.nav-section { flex: 1; overflow-y: auto; scrollbar-width: none; }
.nav-section::-webkit-scrollbar { display: none; }
.nav-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; font-weight: bold; opacity: 0.6; }

.nav-btn {
    background: none; border: none; width: 100%; text-align: left;
    padding: 12px 15px; color: var(--sidebar-text);
    cursor: pointer; font-size: 16px; border-radius: 10px;
    transition: all 0.2s; display: flex; align-items: center; gap: 10px;
}
.nav-btn:hover { background-color: rgba(255,255,255,0.05); color: white; }
.nav-btn.active { background-color: var(--accent-color); color: #000; font-weight: bold; }

.create-btn {
    margin-top: 20px;
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: white; border: none; padding: 15px;
    border-radius: 12px; font-weight: bold; cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
    transition: transform 0.2s; width: 100%;
}
.create-btn:hover { transform: scale(1.02); }

/* --- HEADER --- */
.dash-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; padding: 5px 0;
}
.editable-name { cursor: pointer; transition: all 0.2s; padding: 2px 5px; border-radius: 5px; display: inline-block; }
.editable-name:hover { background: rgba(255, 193, 7, 0.1); transform: scale(1.02); }

.profile-pill {
    background: rgba(255, 255, 255, 0.9); 
    padding: 8px 15px; 
    border-radius: 20px;
    display: flex; 
    align-items: center; 
    gap: 10px;
    font-weight: bold; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    color: #01579b;
    border: 1px solid rgba(0, 188, 212, 0.3);
    min-width: 200px;
    max-width: 400px;
    flex-wrap: wrap;
}

.profile-pill #user-display-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

#user-xp {
    color: #b71c1c;
}

.profile-pill-signout-btn {
    background: transparent;
    border: 1px solid rgba(0, 188, 212, 0.4);
    color: #01579b;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 6px;
    transition: transform 0.2s, background 0.2s;
}

.profile-pill-signout-btn:hover {
    background: rgba(0, 188, 212, 0.1);
    transform: scale(1.03);
}

.settings-btn {
    background: rgba(0,0,0,0.08);
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 20px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s;
}
.settings-btn:hover {
    background: rgba(0,0,0,0.12);
    border-color: rgba(0,0,0,0.25);
    transform: scale(1.05);
}

/* User menu dropdown */
.user-menu-wrapper { position: relative; display: flex; align-items: center; }
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.8);
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #01579b;
    transition: all 0.2s;
}
.user-menu-trigger:hover {
    background: white;
    border-color: rgba(0,172,193,0.4);
    box-shadow: 0 2px 8px rgba(0,172,193,0.2);
}
.user-menu-avatar { font-size: 20px; }
.user-menu-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-amps { font-size: 12px; color: #00acc1; font-weight: 600; margin-left: 4px; }
.user-menu-chevron { font-size: 10px; opacity: 0.7; transition: transform 0.2s; }
.user-menu-trigger[aria-expanded="true"] .user-menu-chevron { transform: rotate(180deg); }
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.08);
    padding: 12px 0;
    z-index: 1000;
}
.user-menu-dropdown.hidden { display: none !important; }
.user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}
.user-menu-avatar-lg { font-size: 36px; }
.user-menu-header div { display: flex; flex-direction: column; gap: 2px; }
.user-menu-xp { font-size: 12px; color: #00acc1; font-weight: bold; }
.user-menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.user-menu-item:hover { background: #f5f5f5; }
.user-menu-signout { color: #666; border-top: 1px solid #eee; margin-top: 4px; padding-top: 12px; }
.user-menu-signin {
    color: #00acc1;
    font-weight: 600;
    border-top: 1px solid #eee;
    margin-top: 4px;
    padding-top: 12px;
}
.user-menu-signin:hover { background: rgba(0,172,193,0.1); }
.signin-btn {
    background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.signin-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,172,193,0.4);
}

/* Settings modal */
.settings-modal-content {
    max-width: 420px;
    text-align: left;
}
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.settings-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.settings-row label {
    font-weight: 600;
    color: var(--text-main, #333);
    font-size: 14px;
}
.settings-input, .settings-select {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}
.settings-input:focus, .settings-select:focus {
    border-color: #00acc1;
}
.settings-select {
    cursor: pointer;
    background: white;
}
.settings-avatar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.settings-avatar-preview {
    font-size: 36px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
}
.settings-avatar-btn {
    padding: 8px 16px;
    border: 2px solid #00acc1;
    background: white;
    color: #00acc1;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.settings-avatar-btn:hover {
    background: #00acc1;
    color: white;
}
.settings-row-toggle {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.toggle-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.toggle-label input {
    display: none;
}
.toggle-slider {
    width: 48px;
    height: 26px;
    background: #ccc;
    border-radius: 26px;
    position: relative;
    transition: background 0.2s;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.toggle-label input:checked + .toggle-slider {
    background: #00acc1;
}
.toggle-label input:checked + .toggle-slider::after {
    transform: translateX(22px);
}
.settings-modal-content .modal-actions {
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}
.settings-modal-content .save-btn {
    background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}
.settings-modal-content .save-btn:hover {
    opacity: 0.9;
}

.user-avatar-clickable {
    font-size: 20px;
    cursor: pointer;
    margin-right: 5px;
    transition: transform 0.2s;
    display: inline-block;
}

.user-avatar-clickable:hover {
    transform: scale(1.2);
}

/* Avatar picker modal: larger modal and avatars, no scroll */
.avatar-picker-modal-content {
    max-width: 640px;
    width: 90vw;
}

.avatar-emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 28px;
    overflow: visible;
    max-height: none;
}

.avatar-emoji-btn {
    font-size: 56px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.8);
    border: 2px solid transparent;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-emoji-btn:hover {
    background: rgba(0, 188, 212, 0.2);
    border-color: #00acc1;
    transform: scale(1.1);
}

#avatar-emoji-grid.avatar-emoji-grid::-webkit-scrollbar {
    display: none;
}

#avatar-emoji-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#avatar-emoji-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

#avatar-emoji-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* --- HERO SECTION --- */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px; 
    padding: 35px 40px; 
    color: white;
    margin: 20px 30px 30px 30px; 
    position: relative; 
    overflow: visible;
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.4);
    display: flex;
    gap: 25px;
    align-items: stretch;
    z-index: 1;
    min-height: 220px;
}

.hero-content {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.hero-content h1 { 
    font-size: 32px; 
    margin: 0 0 12px 0; 
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-content p { 
    font-size: 17px; 
    opacity: 1; 
    margin-bottom: 20px; 
    max-width: 100%;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.hero-btn { 
    background: white; 
    color: #764ba2; 
    border: none; 
    padding: 14px 35px; 
    border-radius: 25px; 
    font-weight: bold; 
    font-size: 16px;
    cursor: pointer; 
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    align-self: flex-start;
}

.hero-btn:hover { 
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.leaderboard-compact {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 18px;
    min-width: 300px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.leaderboard-compact .leaderboard-header {
    margin-bottom: 2x;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.leaderboard-compact .leaderboard-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.leaderboard-compact .leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

.leaderboard-compact .leaderboard-row {
    height:45px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

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

.leaderboard-compact .leaderboard-rank-cell {
    width: 35px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    padding: 0 6px;
    color: white;
}

.leaderboard-compact .leaderboard-medal-cell {
    width: 40px;
    text-align: center;
    font-size: 20px;
    padding: 0 6px;
}

.leaderboard-compact .leaderboard-name-cell {
    padding: 0 10px;
    max-width: 180px;
    overflow: hidden;
}

.leaderboard-compact .leaderboard-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.leaderboard-compact .leaderboard-avatar-emoji {
    font-size: 20px;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

.leaderboard-compact .leaderboard-name {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 140px;
    vertical-align: middle;
    color: white;
    font-weight: 500;
}

.leaderboard-compact .leaderboard-score-cell {
    text-align: right;
    font-weight: bold;
    font-size: 15px;
    color: #f1c40f;
    padding: 0 6px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.player-rank {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    min-width: 130px;
    max-width: 160px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-rank h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    opacity: 1;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.player-rank .rank-value {
    font-size: 36px;
    font-weight: bold;
    color: #f1c40f;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1;
}

/* --- LEADERBOARD --- */
.leaderboard-sidebar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-header {
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.leaderboard-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 30px 30px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
}

.leaderboard-rank {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
}

.leaderboard-medal {
    font-size: 18px;
}

.leaderboard-name {
    color: white;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-score {
    color: #f1c40f;
    font-weight: bold;
    font-size: 16px;
}

/* --- LIBRARY HEADER & SEARCH --- */
.section-header { 
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 30px 0 20px 0;
    padding: 0 30px;
    position: relative;
    z-index: 0;
}
.header-title-group { display: none; }
.section-header h2 { 
    font-size: 24px; 
    color: white; 
    margin: 0; 
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.count-badge { display: none; }

.search-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}
.search-inner { position: relative; width: 100%; max-width: 100%; }
.search-input { 
    width: 100%; padding: 12px 20px 12px 45px; 
    border-radius: 30px; border: none; background: white; 
    box-shadow: var(--shadow-sm); font-size: 15px; outline: none; box-sizing: border-box;
}
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); opacity: 0.5; pointer-events: none; }

.camera-wrapper { flex: 1; display: flex; justify-content: flex-end; min-width: 150px; }
.camera-select-input { padding: 10px; border-radius: 20px; border: 1px solid #ddd; background: white; max-width: 200px; outline: none; }

/* --- CARD GRID & STYLING --- */
.worksheet-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 25px; 
    margin-bottom: 40px;
    padding: 0 30px;
}

.worksheet-grid .create-card {
    grid-column: span 1;
}

/* Quest Path - Zigzag Layout */
#quest-container {
    padding: 24px 20px;
    min-height: auto;
    box-sizing: border-box;
    position: relative;
}

.quest-path {
    display: flex;
    flex-direction: column;
    gap: 26px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 10px 0 40px;
}

.quest-path::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.5), rgba(255,255,255,0.1));
    border-radius: 999px;
    opacity: 0.5;
}

.quest-row {
    display: flex;
    width: 100%;
    position: relative;
    z-index: 1;
}

.quest-row::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px rgba(255,255,255,0.55);
    opacity: 0.75;
    z-index: 0;
}

.quest-row-left {
    justify-content: flex-start;
}

.quest-row-right {
    justify-content: flex-end;
}

.quest-row-left .quest-card {
    margin-left: -20px;
}

.quest-row-right .quest-card {
    margin-right: -20px;
}

.quest-card {
    font-family: 'Bubblegum Sans', cursive;
    border-radius: 22px;
    padding: 18px 22px;
    color: white;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 12px 36px rgba(0,0,0,0.28), 0 6px 16px rgba(0,0,0,0.18);
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    width: 520px;
    height: 175px;
    flex: 0 0 auto;
    border: 2px solid rgba(255,255,255,0.25);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quest-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}
.quest-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 10px 24px rgba(0,0,0,0.22);
    z-index: 10;
}
.quest-card-locked:hover {
    transform: none;
}
.quest-card-content {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}
.quest-card-emoji-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
}
.quest-card-emoji {
    font-size: 42px;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.quest-card-text {
    flex: 1;
    min-width: 0;
}
.quest-card-title {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    letter-spacing: 0.02em;
    line-height: 1.2;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.quest-card-desc {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.quest-card-lock {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    background: rgba(0,0,0,0.85);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
}
.quest-card-lock svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

@media (max-width: 768px) {
    #quest-container {
        padding: 16px 12px;
    }
    
    .quest-path {
        gap: 20px;
    }

    .quest-row-left .quest-card,
    .quest-row-right .quest-card {
        margin-left: 0;
        margin-right: 0;
    }

    .quest-card {
        width: 92%;
        height: 155px;
        padding: 14px 18px;
        border-radius: 18px;
    }
    
    .quest-card-content {
        gap: 12px;
    }
    
    .quest-card-emoji-wrap {
        width: 60px;
        height: 60px;
        min-width: 60px;
        min-height: 60px;
        border-radius: 16px;
    }
    
    .quest-card-emoji {
        font-size: 34px;
    }
    
    .quest-card-title {
        font-size: 18px;
    }
    
    .quest-card-desc {
        font-size: 12px;
    }

    .fun-run-fab {
        bottom: 20px;
        right: 16px;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .quest-card-lock {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        top: 10px;
        right: 10px;
    }
    
    .quest-card-lock svg {
        width: 22px;
        height: 22px;
    }
}

/* Topic Section */
.topic-section {
    margin-bottom: 40px;
    padding: 0 30px;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.topic-cards-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.topic-cards-container::-webkit-scrollbar {
    height: 8px;
}

.topic-cards-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.topic-cards-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.topic-cards-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.topic-cards-grid {
    display: flex;
    gap: 20px;
    min-width: max-content;
}

.topic-cards-grid .ws-card {
    min-width: 280px;
    flex-shrink: 0;
}

.show-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: transform 0.2s;
}

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

/* Create Card */
.create-card {
    background: linear-gradient(135deg, #02dbfc 0%, #0192f9 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    position: relative;
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

.create-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.create-card-icon {
    font-size: 80px;
    margin-bottom: 12px;
}

.create-card h3 {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
    line-height: 1.3;
}

.ws-card { 
    background: white; border-radius: 16px; 
    box-shadow: var(--shadow-sm); 
    display: flex; flex-direction: column;
    height: 100%; min-height: 200px;
    position: relative; overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease;
    border: 3px solid #e0e0e0;
    border-top: 6px solid #e0e0e0;
    cursor: pointer;
}
.ws-card:hover { 
    transform: translateY(-8px) scale(1.02); 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Difficulty border colors - thicker top border, increasing difficulty */
.ws-card.diff-0 { 
    border-color: #ffc107; /* Yellow - Beginner */
    border-top-color: #ffc107;
    border-top-width: 6px;
} 
.ws-card.diff-1 { 
    border-color: #4caf50; /* Green - Easy */
    border-top-color: #4caf50;
    border-top-width: 6px;
} 
.ws-card.diff-2 { 
    border-color: #f44336; /* Red - Moderate */
    border-top-color: #f44336;
    border-top-width: 6px;
} 
.ws-card.diff-3 { 
    border-color: #795548; /* Brown - Intermediate */
    border-top-color: #795548;
    border-top-width: 6px;
} 
.ws-card.diff-4 { 
    border-color: #212121; /* Black - Advanced */
    border-top-color: #212121;
    border-top-width: 6px;
} 
.ws-card.diff-5 { 
    border-color: #000000; /* Black - Expert */
    border-top-color: #000000;
    border-top-width: 6px;
}

.ws-card.locked { 
    opacity: 0.85; 
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}
.ws-card.locked:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-md);
}

/* Card Content Area */
.card-content {
    padding: 24px;
    flex: 1; 
    display: flex; flex-direction: column;
    justify-content: space-between;
}

.card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 12px;
}

.card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}

.action-badge {
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    padding: 5px 10px; border-radius: 15px; letter-spacing: 0.5px;
}

.ws-card h3 {
    font-size: 22px; font-weight: 700; color: var(--text-main);
    margin: 0; line-height: 1.3;
}

.ws-topic {
    font-size: 14px; font-weight: 600; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 12px; letter-spacing: 0.5px;
    display: flex; align-items: center; gap: 8px;
}

.ws-topic .engine-emoji {
    margin-left: auto;
    font-size: 18px;
    opacity: 0.9;
}

.ws-description {
    font-size: 15px; color: var(--text-muted);
    line-height: 1.6; margin: 12px 0 0 0;
    /* Text Truncation */
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.unlock-text {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #666;
    text-align: center;
    padding: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
}

/* Footer & Buttons */
.card-footer {
    padding: 12px 20px; border-top: 1px solid #f0f0f0;
    display: flex; flex-direction: column; gap: 8px;
    background: #fafafa;
}



.btn-group {
    display: flex; gap: 10px; width: 100%;
}

.play-btn {
    flex: 1; border: none; padding: 10px; border-radius: 8px;
    color: white; font-weight: 700; font-size: 12px; cursor: pointer;
    text-transform: uppercase; letter-spacing: 0.5px;
    transition: opacity 0.2s, transform 0.1s;
}
.play-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Button Variants */
.btn-practise { background: #00b894; } /* Teal/Green */
.btn-blitz { background: #d63031; } /* Red */
.btn-locked { 
    background: #95a5a6; 
    cursor: not-allowed;
    opacity: 0.7;
}
.btn-locked:hover { 
    opacity: 0.7; 
    transform: none;
}

.delete-btn {
    background: #ff7675; color: white; border: none;
    width: 36px; height: 36px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 16px; transition: background 0.2s;
}
.delete-btn:hover { background: #d63031; }

.share-btn {
    background: #00b894; color: white; border: none;
    padding: 8px 16px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; transition: background 0.2s;
}
.share-btn:hover { background: #00a085; }
.share-btn:disabled,
.share-btn[disabled] {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Engine Specific Styles */
.ws-card.engine-navigator { border-top-color: var(--nav-color); }
.ws-card.engine-navigator .card-icon { background: var(--nav-bg); color: var(--nav-color); }
.ws-card.engine-navigator .action-badge { background: var(--nav-bg); color: var(--nav-color); }

.ws-card.engine-launcher,
.ws-card.engine-launcher-right,
.ws-card.engine-launcher-left,
.ws-card.engine-jumplauncher,
.ws-card.engine-squatter,
.ws-card.engine-batcher,
.ws-card.engine-jumpbatcher,
.ws-card.engine-sequencer,
.ws-card.engine-jumpsequencer { border-top-color: var(--launch-color); }
.ws-card.engine-launcher .card-icon,
.ws-card.engine-launcher-right .card-icon,
.ws-card.engine-launcher-left .card-icon,
.ws-card.engine-jumplauncher .card-icon,
.ws-card.engine-squatter .card-icon,
.ws-card.engine-batcher .card-icon,
.ws-card.engine-jumpbatcher .card-icon,
.ws-card.engine-sequencer .card-icon,
.ws-card.engine-jumpsequencer .card-icon { background: var(--launch-bg); color: var(--launch-color); }
.ws-card.engine-launcher .action-badge,
.ws-card.engine-launcher-right .action-badge,
.ws-card.engine-launcher-left .action-badge,
.ws-card.engine-jumplauncher .action-badge,
.ws-card.engine-squatter .action-badge,
.ws-card.engine-batcher .action-badge,
.ws-card.engine-jumpbatcher .action-badge,
.ws-card.engine-sequencer .action-badge,
.ws-card.engine-jumpsequencer .action-badge { background: var(--launch-bg); color: var(--launch-color); }

.ws-card.engine-sequencer { border-top-color: var(--seq-color); }
.ws-card.engine-sequencer .card-icon { background: var(--seq-bg); color: var(--seq-color); }
.ws-card.engine-sequencer .action-badge { background: var(--seq-bg); color: var(--seq-color); }

.ws-card.engine-smasher { border-top-color: var(--smash-color); }
.ws-card.engine-smasher .card-icon { background: var(--smash-bg); color: var(--smash-color); }
.ws-card.engine-smasher .action-badge { background: var(--smash-bg); color: var(--smash-color); }

/* --- SELECTION & UTILS --- */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 40px; color: #999; font-size: 18px; }
.hidden { display: none !important; }

/* --- GAME OVERLAY (Preserved) --- */
#game-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #222; z-index: 2000; }
video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1);  }
#ui-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none; }
#header-wrapper { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
#header-bar { background: #081041; color: #fff; height: 12vh; display: flex; justify-content: space-between; align-items: center; padding: 0 2vw; border-bottom: 6px solid #fff; }
#game-container .header-left,
#header-bar .header-left { width: 25%; display: flex; justify-content: flex-start; align-items: center; gap: 10px; }
#game-container .header-center,
#header-bar .header-center { width: 50%; text-align: center; }
#game-container .header-right,
#header-bar .header-right { width: 25%; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.game-logo { height: 9vh; object-fit: contain; }
#exercise-name { font-size: 5vmin; color: #f1c40f; line-height: 1.1; text-transform: uppercase; }
#game-mode-display { font-size: 3vmin; color: #00d2ff; letter-spacing: 2px; }
#level-display { font-size: 2.5vmin; color: #aaa; }
#lives-display { font-size: 3vmin; margin: 2px 0; letter-spacing: 3px; }
#score-display { font-size: 4vmin; color: #2ecc71; font-weight: bold; }
#timer-container { width: 100%; height: 1.5vh; background: #333; position: relative; }
#timer-bar { height: 100%; width: 100%; background: #00ff00; transition: width 1s linear; }

/* Circular HUD - left of fullscreen, just to the right of goal-flag (goal-flag is right: 12% in mascot track) */
#circular-hud {
    position: fixed;
    top: 0;
    right: 18%;
    width: 12vh;
    height: 12vh;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7); /* Increased contrast */
    border: 3px solid rgba(255, 255, 255, 0.5); /* Added border for clarity */
    border-radius: 50%;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); /* Added shadow for depth */
}

/* Quest mode: HUD centered below question box */
body.quest-mode #circular-hud {
    position: absolute;
    top: auto;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    top: 20vh; /* Positioned below question box with more spacing */
}

#hud-content {
    position: absolute;
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff; /* Pure white for better contrast */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.4); /* Enhanced shadow */
    z-index: 1002;
    text-align: center;
    pointer-events: none;
}

#dojo-count {
    position: absolute;
    right: 2%;
    top: 50%;
    transform: translateY(-150%);
    font-size: 4vh;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#minigame-count {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 4vh;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.5);
}
#minigame-count.minigame-count-pop {
    animation: minigameCountPop 0.3s ease-out;
}
@keyframes minigameCountPop {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

#timer-ring {
    width: 200px;
    height: 200px;
    position: absolute;
    top: 0;
    left: 0;
}

#timer-circle {
    transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.6)); /* Added glow for better visibility */
}

#timer-circle-bg {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3)); /* Added subtle glow */
}

/* HUD Flash Animation (for quest) */
@keyframes hudFlash {
    0% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.2);
        text-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgba(46, 204, 113, 0.8);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
}

/* Engine Specific Overlays */
#game-question-bar {
    position: absolute;
    top: 8.5vh;
    left: 0;
    width: 99%;
    background: rgba(0,0,0,0.85);
    border: 4px solid #ffd700;
   /* border-top: none; */
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 16px 16px;
    font-size: 6vmin;
    font-weight: bold;
    text-align: center;
    z-index: 55;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    word-spacing: 0.3em;
}
#engine-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; display: block !important; }
.nav-question { margin-top: 0px; position:absolute; top: 8.5vh; left: 50%; transform: translateX(-50%); background: #e2e2e2; border: 6px solid #cc0000; color: #000; padding: 15px 40px; border-radius: 0 0 20px 20px; font-size: 7vmin; font-weight: bold; text-align: center; width: 90%; box-shadow: 0 10px 20px rgba(0,0,0,0.8); z-index: 50; }

/* Quest mode: question bar below mascot track (like dojo) */
body.quest-mode .nav-question {
    top: 8.5vh; /* Below mascot track */
    margin-top: 0;
    width: 90%;
    border-radius: 0 0 20px 20px;
    padding-top: 15px;
}

/* Quest mode: score/hearts positioned at extreme right, stacked vertically, inside mascot track */
body.quest-mode #quest-lives {
    position: absolute;
    top: 0;
    right: 0; /* Extreme right */
    height: 8vh; /* Same height as mascot track */
    background: transparent; /* No background - directly on track */
    border: none;
    border-radius: 0;
    padding: 0 12px 0 8px; /* Right padding to prevent truncation, left padding minimal */
    box-shadow: none;
    backdrop-filter: none; /* No blur */
    gap: 2px; /* Smaller gap to fit better */
    align-items: center;
    z-index: 101; /* Above track background */
    display: flex;
    flex-direction: column; /* Stacked vertically */
    text-align: center;
    justify-content: center;
    min-width: auto;
    max-width: none;
    box-sizing: border-box; /* Ensure padding is included in width */
}

/* Quest heart styling - sized to fit in 8vh track */
.quest-heart {
    font-size: 2.2vh; /* Sized to fit in 8vh track (about 1/4 of height) */
    color: #ff4757;
    transition: opacity 0.3s ease, transform 0.2s ease;
    line-height: 1;
}

.quest-heart:hover {
    transform: scale(1.2);
}

/* Quest level removed from quest-lives (moved to header) */
body.quest-mode #quest-level {
    display: none; /* Level shown next to back button instead */
}

/* Quest score styling - sized to fit in track */
body.quest-mode #quest-score {
    font-size: 1.8vh; /* Sized to fit in 8vh track */
    color: #ffd700;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}

body.quest-mode #quest-score-value {
    font-size: 2vh; /* Sized to fit in 8vh track */
    font-weight: bold;
}

/* Hearts container in quest-lives - centered */
body.quest-mode #quest-lives > div:first-of-type {
    display: flex;
    gap: 2px; /* Smaller gap */
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* Mobile responsive for quest lives */
@media (max-width: 768px) {
    body.quest-mode #quest-lives {
        padding: 0 6px;
        gap: 1px;
    }
    
    .quest-heart {
        font-size: 2vh;
    }
    
    body.quest-mode #quest-score {
        font-size: 1.6vh;
    }
    
    body.quest-mode #quest-score-value {
        font-size: 1.8vh;
    }
}

@media (max-width: 480px) {
    body.quest-mode #quest-lives {
        padding: 0 4px;
        gap: 1px;
    }
    
    .quest-heart {
        font-size: 1.8vh;
    }
    
    body.quest-mode #quest-score {
        font-size: 1.4vh;
    }
    
    body.quest-mode #quest-score-value {
        font-size: 1.6vh;
    }
}

/* Broken heart animation */
@keyframes brokenHeart {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0.3;
    }
}

/* Flying heart animation */
@keyframes flyHeart {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--target-x), var(--target-y)) scale(1.5);
        opacity: 0;
    }
}
/* Navigator: original style - dark bg, white text, pink/blue borders */
.nav-zone {
    position: absolute;
    top: 30%;
    width: 20vw;
    height: 40vh;
    background: rgba(0,0,0,0.9);
    border: 8px solid white;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 10vmin;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    transition: transform 0.2s, background-color 0.2s;
}
.nav-zone.hovered { transform: scale(1.1); background: rgba(255,255,255,0.2); border-color: #ffd700; }
.nav-left { left: 1%; border-color: #f48fed; }
.nav-right { right: 1%; border-color: #90caf9; }

/* Launcher/Squatter: 2 options either side of center, matching Navigator size and font */
.launcher-zone {
    position: absolute;
    top: 22%;
    width: 30vmin;
    height: 20vmin;
    border-radius: 14px;
    padding: 1vmin 1.5vmin;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 9vmin;
    line-height: 1.1;
    word-break: break-word;
    font-weight: bold;
    color: #fff;
    background: rgba(0,0,0,0.9);
    border: 8px solid white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    transition: transform 0.2s;
    z-index: 20;
    text-shadow: 2px 2px 0 #000;
}
.launcher-zone-left { left: 1%; border-color: #f48fed; }
.launcher-zone-center { left: 50%; transform: translateX(-50%); border-color: #81c784; }
.launcher-zone-right { right: 1%; border-color: #90caf9; }
#game-container .launcher-zone { background: linear-gradient(135deg, #4a148c, #311b92); }
#game-container[data-option-theme="0"] .launcher-zone { background: linear-gradient(135deg, #4a148c, #311b92); }
#game-container[data-option-theme="1"] .launcher-zone { background: linear-gradient(135deg, #e65100, #bf360c); }
#game-container[data-option-theme="2"] .launcher-zone { background: linear-gradient(135deg, #0d47a1, #01579b); }
#game-container[data-option-theme="3"] .launcher-zone { background: linear-gradient(135deg, #00695c, #004d40); }
#game-container[data-option-theme="4"] .launcher-zone { background: linear-gradient(135deg, #7b1fa2, #4a148c); }
#game-container[data-option-theme="5"] .launcher-zone { background: linear-gradient(135deg, #ff6f00, #e65100); }
@keyframes explodeCorrectLauncherZone {
    0% { transform: scale(1); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
    30% { transform: scale(1.2); box-shadow: 0 0 40px #2ecc71, 0 0 80px #2ecc71; background: linear-gradient(135deg, #2ecc71, #27ae60) !important; }
    70% { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1.3); opacity: 0; }
}
@keyframes explodeWrongLauncherZone {
    0% { transform: scale(1); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
    30% { transform: scale(1.15); box-shadow: 0 0 40px #e74c3c, 0 0 60px #e74c3c; background: linear-gradient(135deg, #e74c3c, #c0392b) !important; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.launcher-zone.explode-correct { animation: explodeCorrectLauncherZone 0.5s ease-out forwards; }
.launcher-zone.explode-wrong { animation: explodeWrongLauncherZone 0.5s ease-out forwards; }

/* Navigator: rocket marker between shoulders for collision */
.nav-rocket {
    position: fixed;
    transform: translate(-50%, -50%);
    font-size: 14vmin;
    z-index: 90;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(255,200,0,0.6));
}

/* Squatter: dark blue */
body.engine-squatter .launcher-zone {
    background: linear-gradient(135deg, #1565c0, #0d47a1) !important;
    border-color: #0d47a1;
}
body.engine-squatter .nav-left,
body.engine-squatter .nav-right,
body.engine-squatter .nav-top,
body.engine-squatter .nav-bottom {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    border-color: #0d47a1;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

/* Vertical Layout (Navigator jump/squat, Squatter) */
.nav-top, .nav-bottom, .nav-middle-gap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 30vw;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.9);
    border: 8px solid white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    font-size: 10vmin;
    font-weight: bold;
}

.nav-top {
    top: 20%;
    border-color: #f48fed;
    color: #fff;
}

.nav-bottom {
    bottom: 20%;
    border-color: #90caf9;
    color: #fff;
}

.nav-middle-gap {
    top: calc(12vh + 20px);
    transform: translateX(-50%);
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.nav-question-centered {
    background: #e2e2e2;
    border: 6px solid #cc0000;
    color: #000;
    padding: 15px 30px;
    border-radius: 20px;
    font-size: 6vmin;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
    z-index: 50;
    position: relative;
    top: 0;
}

.zone-content {
    font-size: 8vmin;
    font-weight: bold;
    color: #fff;
    margin: 10px 0;
}

.zone-label-helper {
    font-size: 3vmin;
    color: rgba(255,255,255,0.8);
    margin-top: 10px;
}
/* Smasher - option circle with theme colors and white/yellow border */
.smasher-number { position: absolute; width: 26vmin; height: 26vmin; background: linear-gradient(135deg, #4a148c, #311b92); border: 5px solid #ffd700; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 7vmin; font-weight: bold; text-shadow: 2px 2px 0 #000; box-shadow: 0 5px 20px rgba(0,0,0,0.7); z-index: 30; transition: transform 0.1s ease-out; transform: translate(-50%, -50%); padding: 2vmin; box-sizing: border-box; word-wrap: break-word; text-align: center; }
#game-container[data-option-theme="1"] .smasher-number { background: linear-gradient(135deg, #e65100, #bf360c); }
#game-container[data-option-theme="2"] .smasher-number { background: linear-gradient(135deg, #0d47a1, #01579b); }
#game-container[data-option-theme="3"] .smasher-number { background: linear-gradient(135deg, #00695c, #004d40); }
#game-container[data-option-theme="4"] .smasher-number { background: linear-gradient(135deg, #7b1fa2, #4a148c); }
#game-container[data-option-theme="5"] .smasher-number { background: linear-gradient(135deg, #ff6f00, #e65100); }
.smasher-hand-marker { position: absolute; width: 3vmin; height: 3vmin; border-radius: 50%; z-index: 35; transform: translate(-50%, -50%); pointer-events: none; opacity: 1; border: 2px solid white; box-shadow: 0 0 10px rgba(255,255,255,0.8); transition: left 0.1s ease-out, top 0.1s ease-out; }
.smasher-hand-marker.smasher-marker-green { background-color: #2ecc71; } 
.smasher-hand-marker.smasher-marker-red { background-color: #e74c3c; } 

/* Launcher */
.launcher-question { position: absolute; top: 14vh; left: 50%; transform: translateX(-50%); background: #000; border: 6px solid #ffd700; color: #fff; padding: 15px 40px; border-radius: 0 0 20px 20px; font-size: 7vmin; font-weight: bold; text-align: center; width: 80%; box-shadow: 0 10px 20px rgba(0,0,0,0.8); z-index: 50; }
/* Launcher/Batcher targets: same bg per question, rotating theme, white/yellow border */
.launcher-target, .batcher-target {
    position: absolute;
    width: 30vmin;
    height: 20vmin;
    transform: translateX(-50%); /* center on left position */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8vmin;
    font-weight: bold;
    color: #fff;
    border-radius: 14px;
    padding: 1vmin 1.5vmin;
    line-height: 1.1;
    word-break: break-word;
    border: 5px solid #ffd700;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    z-index: 20;
    transition: transform 0.1s;
    text-shadow: 2px 2px 0 #000;
}
/* Default (no theme): purple - for Batcher/recharge when startRound not used */
#game-container .launcher-target,
#game-container .batcher-target {
    background: linear-gradient(135deg, #4a148c, #311b92);
}
/* Theme 0: purple */
#game-container[data-option-theme="0"] .launcher-target,
#game-container[data-option-theme="0"] .batcher-target {
    background: linear-gradient(135deg, #4a148c, #311b92);
}
/* Theme 1: dark orange */
#game-container[data-option-theme="1"] .launcher-target,
#game-container[data-option-theme="1"] .batcher-target {
    background: linear-gradient(135deg, #e65100, #bf360c);
}
/* Theme 2: blue */
#game-container[data-option-theme="2"] .launcher-target,
#game-container[data-option-theme="2"] .batcher-target {
    background: linear-gradient(135deg, #0d47a1, #01579b);
}
/* Theme 3: teal */
#game-container[data-option-theme="3"] .launcher-target,
#game-container[data-option-theme="3"] .batcher-target {
    background: linear-gradient(135deg, #00695c, #004d40);
}
/* Theme 4: magenta */
#game-container[data-option-theme="4"] .launcher-target,
#game-container[data-option-theme="4"] .batcher-target {
    background: linear-gradient(135deg, #7b1fa2, #4a148c);
}
/* Theme 5: amber */
#game-container[data-option-theme="5"] .launcher-target,
#game-container[data-option-theme="5"] .batcher-target {
    background: linear-gradient(135deg, #ff6f00, #e65100);
}

/* Hit target animations - correct vs incorrect */
@keyframes explodeCorrect {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
    30% { transform: translateX(-50%) scale(1.2); box-shadow: 0 0 40px #2ecc71, 0 0 80px #2ecc71; background: linear-gradient(135deg, #2ecc71, #27ae60) !important; }
    70% { transform: translateX(-50%) scale(1.1); opacity: 0.9; }
    100% { transform: translateX(-50%) scale(1.3); opacity: 0; }
}
@keyframes explodeWrong {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
    30% { transform: translateX(-50%) scale(1.15); box-shadow: 0 0 40px #e74c3c, 0 0 60px #e74c3c; background: linear-gradient(135deg, #e74c3c, #c0392b) !important; }
    70% { transform: translateX(-50%) scale(1.05); }
    100% { transform: translateX(-50%) scale(1); }
}
.launcher-target.explode-correct,
.batcher-target.explode-correct,
.smasher-number.explode-correct {
    animation: explodeCorrect 0.5s ease-out forwards;
}
.launcher-target.explode-wrong,
.batcher-target.explode-wrong,
.smasher-number.explode-wrong,
.nav-zone.explode-wrong {
    animation: explodeWrong 0.5s ease-out forwards;
}

/* Sequencer: per-target hit animations (success + failure) */
@keyframes sequencerHitCorrect {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
    25% { transform: translateX(-50%) scale(1.25); box-shadow: 0 0 50px #2ecc71, 0 0 100px #2ecc71; background: linear-gradient(135deg, #2ecc71, #27ae60) !important; }
    50% { transform: translateX(-50%) scale(1.15); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.4); opacity: 0; box-shadow: 0 0 80px #2ecc71; }
}
@keyframes sequencerHitWrong {
    0% { transform: translateX(-50%) scale(1); }
    10% { transform: translateX(calc(-50% - 8px)) scale(1.05); box-shadow: 0 0 30px #e74c3c; background: linear-gradient(135deg, #e74c3c, #c0392b) !important; }
    30% { transform: translateX(calc(-50% + 8px)) scale(1.05); }
    50% { transform: translateX(calc(-50% - 6px)) scale(1.02); }
    70% { transform: translateX(calc(-50% + 6px)) scale(1.02); }
    100% { transform: translateX(-50%) scale(1); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
}
.launcher-target.sequencer-hit-correct {
    animation: sequencerHitCorrect 0.45s ease-out forwards;
}
.launcher-target.sequencer-hit-wrong {
    animation: sequencerHitWrong 0.5s ease-out forwards;
}
.nav-zone.explode-correct {
    animation: explodeCorrect 0.5s ease-out forwards;
}

.launcher-cannon { position: absolute; bottom: 5vh; transform: translateX(-50%); font-size: 12vh; text-shadow: 0 0 20px #00d2ff; z-index: 20; transition: left 0.05s linear; }
.launcher-ball { position: absolute; width: 5vh; height: 5vh; background: #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 15px #fff; z-index: 15; }
#ordering-rack { position: absolute; bottom: 15vh; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; align-items: center; justify-content: center; z-index: 30; min-height: 10vh; }
.collected-item { width: 12vmin; height: 12vmin; background: radial-gradient(circle, #2ecc71, #27ae60); border: 3px solid #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 5vmin; font-weight: bold; text-shadow: 2px 2px 0 #000; box-shadow: 0 5px 15px rgba(0,0,0,0.5); animation: slideUp 0.5s ease-out; }
/* Common */
#center-circle { position: absolute; bottom: 25%; left: 50%; transform: translateX(-50%); width: 22vmin; height: 22vmin; border: 8px solid #ff4757; border-radius: 50%; background: rgba(255, 71, 87, 0.2); display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 0 0 50px #ff4757; animation: pulse 1s infinite; }
.stick-figure { width: 50%; height: 50%; margin-bottom: 5px; stroke: white; stroke-width: 2; fill: none; }
.center-text { font-size: 3vmin; color: #fff; font-weight: bold; text-shadow: 2px 2px 0 #000; }
@keyframes pulse { 0% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.1); opacity: 0.8; } 100% { transform: translateX(-50%) scale(1); } }
#mascot-track { position: absolute; top: 0; left: 0; width: 100%; height: 8vh; background: rgba(0,0,0,0.85); border-bottom: 4px solid white; }
#mascot-track-bizname {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-weight: 700;
    font-size: 2.8vh;
    white-space: nowrap;
    color: rgba(255,255,255,0.75);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 1;
    pointer-events: none;
}
#mascot-container { position: absolute; top: 50%; left: 0%; width: 6vh; height: 6vh; transform: translateY(-50%); transition: left 0.5s ease-out; z-index: 10; }
#goal-flag { position: absolute; right: 12%; top: 50%; transform: translateY(-50%); font-size: 4vh; }
#session-timer { position: absolute; top: 50%; right: 20%; transform: translateY(-50%); font-size: 4vh; font-weight: bold; color: #00ff00; background: rgba(0,0,0,0.6); padding: 4px 12px; border-radius: 8px; border: 2px solid #00ff00; z-index: 100; }

/* Quest score display inside mascot track - no emoji, boundary box, bigger font */
body.quest-mode #quest-stars-display {
    position: absolute;
    top: 50%;   
    right: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    border: 3px solid #ffd700;
    border-radius: 8px;
    padding: 6px 16px;
    color: #ffd700;
    font-weight: bold;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
}

body.quest-mode #quest-stars-value {
    font-size: 4.5vh;
    font-weight: bold;
    color: #ffd700;
}
#finu-img { width: 100%; height: 100%; object-fit: contain; }
/* player-marker removed - engines use pose landmarks for collision */
#warning-msg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(255, 0, 0, 0.85); color: white; padding: 20px 40px; font-size: 10vmin; border-radius: 10px; border: 4px solid white; z-index: 3000; display: none; font-weight: bold; text-align: center; }
#warning-msg.visible { display: block; animation: flashWarn 0.5s infinite alternate; }
@keyframes flashWarn { from { opacity: 1; } to { opacity: 0.5; } }
#loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #00d2ff; font-size: 6vh; font-weight: bold; }
#message-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.92); display: flex; justify-content: center; align-items: center; z-index: 2000; color: white; font-size: 8vmin; font-weight: bold; text-align: center; white-space: pre-wrap; padding: 20px; box-sizing: border-box; pointer-events: none; overflow: hidden; }
#message-text { width: 90%; max-width: 600px; display: flex; justify-content: center; align-items: center; background: transparent; padding: 40px 30px; box-sizing: border-box; pointer-events: auto; overflow: visible; }
/* Mobile Responsive Styles */
@media (max-width: 768px) {
    #message-text { width: 95%; max-width: 95%; min-width: 200px; }
    
    /* Top Header */
    .top-header {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-logo-pair .header-rfinu {
        height: 30px;
        margin-bottom: -28px;
    }
    
    .header-logo-pair .header-amlogo {
        height: 40px;
    }
    
    .header-center {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        max-width: 100%;
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .header-tabs-container {
        width: 100%;
    }
    
    .header-tab {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .profile-pill {
        flex-wrap: wrap;
        min-width: 150px;
        max-width: 100%;
    }
    
    .profile-pill #user-display-name {
        max-width: 120px;
    }
    
    #gopro-btn {
        margin-left: 0 !important;
        margin-top: 5px;
        width: 100%;
    }
    
    .profile-pill {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    #signup-btn, #gopro-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* Search Section */
    .search-section {
        padding: 15px;
    }
    
    /* Hero Banner */
    .hero-banner {
        flex-direction: column;
        padding: 20px;
        margin: 15px;
        gap: 15px;
        min-height: auto;
    }
    
    .hero-content {
        width: 100%;
    }
    
    .hero-content h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .hero-content p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .hero-btn {
        padding: 12px 25px;
        font-size: 14px;
        width: 100%;
    }
    
    .player-rank {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        padding: 15px;
    }
    
    .player-rank .rank-value {
        font-size: 28px;
    }
    
    .leaderboard-compact {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        padding: 15px;
    }
    
    .leaderboard-compact .leaderboard-name-cell {
        max-width: 120px;
    }
    
    .leaderboard-compact .leaderboard-name {
        max-width: 100px;
        font-size: 13px;
    }
    
    /* Sections */
    .section-header {
        padding: 0 15px;
        margin: 20px 0 15px 0;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    /* Worksheet Grid */
    .worksheet-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 0 15px;
        margin-bottom: 30px;
    }
    
    .ws-card {
        min-height: 180px;
    }
    
    .ws-card h3 {
        font-size: 18px;
    }
    
    .ws-description {
        font-size: 13px;
    }
    
    /* Topic Section */
    .topic-section {
        padding: 0 15px;
        margin-bottom: 30px;
    }
    
    .topic-header {
        font-size: 18px;
        padding: 10px 15px;
        margin-bottom: 15px;
    }
    
    .topic-cards-container {
        gap: 15px;
    }
    
    .topic-cards-grid .ws-card {
        min-width: 200px;
    }
    
    /* Create Card */
    .create-card {
        min-height: 180px;
        padding: 20px;
    }
    
    .create-card-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .create-card h3 {
        font-size: 16px;
    }
    
    /* Content Area */
    .content-area > section,
    .content-area > div {
        padding-left: 0;
        padding-right: 0;
    }

    /* Home Screen */
    #home-screen .home-container {
        padding: 24px 20px;
        max-width: 100%;
    }
    #home-screen .home-title {
        font-size: 32px;
    }
    #home-screen .home-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    #home-screen .path-buttons {
        flex-direction: column;
        gap: 20px;
    }
    #home-screen .path-btn {
        min-width: 0;
        width: 100%;
        max-width: 280px;
        padding: 28px 24px;
    }
    #home-screen .path-icon {
        font-size: 48px;
    }
    #home-screen .path-name {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 10px;
    }
    
    .header-logo-pair .header-rfinu {
        height: 28px;
        margin-bottom: -28px;
    }
    
    .header-logo-pair .header-amlogo {
        height: 36px;
    }
    
    .header-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .header-center {
        max-width: 100%;
    }
    
    .profile-pill {
        min-width: 120px;
    }
    
    .profile-pill #user-display-name {
        max-width: 100px;
    }
    
    .hero-banner {
        padding: 15px;
        margin: 10px;
    }
    
    .hero-content h1 {
        font-size: 20px;
    }
    
    .hero-content p {
        font-size: 13px;
    }
    
    .worksheet-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .topic-cards-grid .ws-card {
        min-width: 180px;
    }
    
    .leaderboard-compact .leaderboard-rank-cell,
    .leaderboard-compact .leaderboard-score-cell {
        font-size: 13px;
    }
    
    .leaderboard-compact .leaderboard-name {
        font-size: 12px;
    }

    /* Home Screen (small phones) */
    #home-screen .home-container {
        padding: 16px 12px;
    }
    #home-screen .home-logo .game-logo {
        height: 60px !important;
    }
    #home-screen .home-title {
        font-size: 26px;
    }
    #home-screen .path-btn {
        padding: 22px 20px;
    }
    #home-screen .path-icon {
        font-size: 40px;
    }
    #home-screen .path-name {
        font-size: 20px;
    }
}
#exit-btn { position: fixed; bottom: 14vh; right: 2vw; z-index: 200; background: #ff4757; color: white; border: 3px solid white; padding: 10px 25px; border-radius: 50px; font-weight: bold; font-size: 20px; pointer-events: auto; }

/* DASHBOARD FOOTER & CREATOR */
.dash-footer { 
    text-align: center; 
    padding: 30px 20px; 
    color: var(--text-muted); 
    font-size: 12px; 
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--main-bg);
    z-index: 100;
    border-top: 1px solid #f5f5f5;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); display: flex; justify-content: center; align-items: center; z-index: 10000; }
.modal.hidden { display: none !important; }
.modal-content { background: white; padding: 30px; border-radius: 15px; width: 95%; max-width: 1200px; max-height: 95vh; overflow-y: auto; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-content h2 { margin-top: 0; margin-bottom: 25px; color: var(--text-main); font-size: 28px; }

/* Star-themed modal for dojo completion */
.modal-content.star-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 40px;
    max-width: 500px;
    border: 4px solid #ffc107;
    box-shadow: 0 20px 60px rgba(255, 193, 7, 0.5), 0 0 40px rgba(255, 193, 7, 0.3);
    color: #ffffff;
}

.modal-content.star-theme h2 {
    color: #ffc107;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.5), 2px 2px 4px rgba(0,0,0,0.5);
    font-size: 32px;
    margin-bottom: 15px;
}

.star-animation {
    font-size: 36px;
    margin: 20px 0;
    animation: starTwinkle 1.5s ease-in-out infinite;
    line-height: 1.2;
    letter-spacing: 5px;
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.8));
}

@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.8)); }
    50% { opacity: 0.8; transform: scale(1.15); filter: drop-shadow(0 0 20px rgba(255, 193, 7, 1)); }
}

.earnings-text {
    font-size: 28px;
    font-weight: bold;
    color: #ffc107;
    margin: 20px 0;
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.6), 2px 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
    padding: 15px 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 193, 7, 0.4);
}

.guest-warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 87, 34, 0.2) 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px 0;
    color: #ffeb3b;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.btn-gold-pulse {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #1a1a2e;
    border: 2px solid #ffc107;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.5), 0 0 20px rgba(255, 193, 7, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: goldPulse 2s ease-in-out infinite;
    text-shadow: none;
}

@keyframes goldPulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.5), 0 0 20px rgba(255, 193, 7, 0.3); 
    }
    50% { 
        box-shadow: 0 6px 25px rgba(255, 193, 7, 0.7), 0 0 30px rgba(255, 193, 7, 0.5); 
    }
}

.btn-gold-pulse:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.7), 0 0 30px rgba(255, 193, 7, 0.5);
    background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
}

.btn-link-danger {
    background: transparent;
    color: #ff6b6b;
    border: 2px solid #ff6b6b;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.btn-link-danger:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.type-select { width: 100%; padding: 10px; margin-bottom: 15px; font-size: 16px; border-radius: 5px; border: 1px solid #ccc; }
.common-q-container { background: #e3f2fd; padding: 10px; margin-bottom: 10px; border-radius: 5px; border: 1px solid #90caf9; display: none; }
.common-q-container.visible { display: block; }
#sheet-grid { border: 2px solid #ddd; display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; background: #eee; gap: 2px; border-radius: 8px; }
.sheet-row { display: grid; grid-template-columns: 50px 2fr 1.2fr 1.2fr 1.2fr; background: white; gap: 2px; }
.sheet-row.unlock-row { background: #f8f9fa; }
.sheet-row.unlock-row .sheet-cell { border: none; }
.sheet-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); font-weight: bold; color: white; position: sticky; top: 0; z-index: 10; border-radius: 6px 6px 0 0; }
.sheet-cell { padding: 12px 8px; display: flex; align-items: center; justify-content: center; }
.sheet-cell input { width: 100%; height: 40px; border: 2px solid #e0e0e0; padding: 8px 12px; box-sizing: border-box; font-family: inherit; border-radius: 6px; font-size: 14px; transition: border-color 0.2s; }
.sheet-cell input:focus { background: #f8f9ff; outline: none; border-color: #00d2ff; }
.sheet-cell input::placeholder { color: #bbb; }
.row-num { background: #f9f9f9; color: #888; font-size: 12px; }
.save-btn { background: #2ecc71; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; margin: 0 5px; }
.cancel-btn { background: #95a5a6; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; margin: 0 5px; }
.add-q-btn { background: #3498db; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; margin: 0 5px; }

/* ANSWER FEEDBACK ANIMATION */
@keyframes feedbackPulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
}



/* GYM OVERLAY */
.gym-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3); /* Transparent overlay like game mode */
    color: white;
    z-index: 50;
    animation: fadeIn 0.5s;
    backdrop-filter: blur(2px); /* Slight blur for readability */
}

.gym-title {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 5vh;
    color: #f1c40f; /* Gold */
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #000;
}

.gym-instr {
    font-size: 8vh;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 30px;
}

.gym-count {
    font-size: 6vh;
    font-weight: 900;
    color: #2ecc71; /* Green */
    font-family: monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* Add shadow for visibility */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes clapPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Quest Revival Modal */
#quest-revival-modal .modal-content {
    max-width: 500px;
    text-align: center;
}

.revival-exercise-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Top Left Back Button */
.btn-glass-back {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3); /* Dark see-through */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Blurs the camera behind it */
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-glass-back:active {
    transform: scale(0.9);
    background: rgba(255, 0, 0, 0.5); /* Red tint on press */
}

/* Top right fullscreen toggle (game-container) */
.btn-fullscreen-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: transform 0.2s;
    pointer-events: auto;
}

.btn-fullscreen-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-fullscreen-toggle:active {
    transform: scale(0.9);
}

/* Quest level display inside mascot track */
#quest-level-header {
    display: none; /* Hidden by default */
}

body.quest-mode #quest-level-header {
    position: absolute; /* Inside mascot track */
    top: 50%;
    left: 7vh; /* Right of mascot (mascot is 6vh wide, add 1vh spacing) */
    transform: translateY(-50%); /* Vertically centered */
    background: transparent; /* No background */
    border: none;
    border-radius: 0;
    color: white;
    font-size: 2.5vh; /* Scaled to track height (8vh) */
    font-weight: bold;
    padding: 0;
    backdrop-filter: none;
    z-index: 101; /* Above track background */
    display: flex;
    align-items: center;
    gap: 0;
    text-transform: uppercase; /* Caps */
    box-shadow: none;
    line-height: 1;
    white-space: nowrap;
}

/* Mobile responsive for level header */
@media (max-width: 768px) {
    body.quest-mode #quest-level-header {
        font-size: 2vh;
        left: 6.5vh;
    }
}

@media (max-width: 480px) {
    body.quest-mode #quest-level-header {
        font-size: 1.8vh;
        left: 6vh;
    }
}

