/* Core Variables - Premium Palette */
:root {
    --accent: #bef264;
    --accent-dark: #064e3b;
    --bg-cream: #f8f6ec;
    --text-black: #1e293b;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.98);
    
    /* Module Colors - Muted Professional */
    --blue: #0ea5e9;
    --purple: #6366f1;
    --orange: #d97706;
    --emerald: #059669;
    --rose: #e11d48;

    /* Card Backgrounds */
    --blue-bg: #e0f2fe;
    --purple-bg: #eef2ff;
    --orange-bg: #fef3c7;
    --emerald-bg: #ecfdf5;
    --rose-bg: #fff1f2;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

/* Mobile Container - NO BACKGROUND HERE */
.app-container {
    width: 375px;
    height: 812px;
    border-radius: 50px;
    position: relative;
    overflow: hidden; 
    box-shadow: 0 40px 100px rgba(0,0,0,0.6);
    border: 10px solid #ffffff;
    display: flex;
    flex-direction: column;
}

/* Status Bar */
.status-bar {
    height: 35px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    font-size: 12px;
    font-weight: 700;
    color: inherit;
    z-index: 100;
}

.status-icons { display: flex; gap: 6px; font-size: 13px; }

/* Typography Overrides */
.serif { font-family: 'Playfair Display', serif; }
.script { font-family: 'Satisfy', cursive; }

/* ---------------------------------------------------------
   LOGIN PAGE
   --------------------------------------------------------- */
.login-page {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Back to center with clean BG */
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-content {
    width: 100%;
    text-align: center;
    z-index: 20;
    margin-top: 20px;
}

.logo-box {
    width: 110px;
    height: 110px;
    margin: 0 auto 15px;
    background: white;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    border: 4px solid #bef264;
}

.logo-box img { width: 85%; }

.logo-text {
    font-family: 'Luckiest Guy', cursive !important;
    font-size: 68px !important;
    color: #bef264 !important;
    letter-spacing: 1px;
    margin-bottom: -5px;
    text-shadow: 3px 5px 0px rgba(0,0,0,0.4);
}

.tagline {
    font-family: 'Satisfy', cursive !important;
    font-size: 24px !important;
    color: white !important;
    background: rgba(0,0,0,0.5);
    padding: 6px 30px;
    display: inline-block;
    border-radius: 12px;
    margin-bottom: 35px;
}

.login-card {
    background: rgba(15, 23, 42, 0.7);
    padding: 35px 25px;
    border-radius: 40px;
    backdrop-filter: blur(10px);
    width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
}

.login-card input {
    width: 100%;
    padding: 18px 24px;
    margin-bottom: 18px;
    border-radius: 20px;
    border: none;
    background: #f8fafc;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.btn-signin {
    width: 100%;
    padding: 18px;
    border-radius: 20px;
    border: none;
    background: #bef264;
    color: #064e3b;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 5px 0px #84cc16;
}

/* ---------------------------------------------------------
   DASHBOARD
   --------------------------------------------------------- */
.dashboard-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    padding: 0 20px 5px 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-name { font-size: 34px; color: #064e3b; margin: -5px 0; }

.avatar-box {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    border: 3px solid var(--accent);
    padding: 2px;
    background: white;
}
.avatar-box img { width: 100%; height: 100%; border-radius: 10px; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-card {
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 18px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
    border-left: 4px solid transparent;
}

.stat-card.blue { border-left-color: var(--blue); }
.stat-card.green { border-left-color: var(--accent); }

.stat-card .value { display: block; font-size: 22px; font-weight: 900; color: #1a1a1a; margin-top: 3px; }

.section-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.section-header h3 { font-size: 18px; font-weight: 800; color: #1a1a1a; }

.module-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 10px;
}

.module-card {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 15px;
    height: calc((100% / 5) - 6px);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.03);
    transition: 0.3s;
}

.module-card.locked {
    filter: grayscale(1);
    opacity: 0.6;
    pointer-events: none;
    border: 1px dashed #cbd5e1;
    background: #f1f5f9;
}

.module-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    margin-right: 12px;
    color: white;
}

.module-card.blue { background: var(--blue-bg); }
.module-card.purple { background: var(--purple-bg); }
.module-card.orange { background: var(--orange-bg); }
.module-card.emerald { background: var(--emerald-bg); }
.module-card.rose { background: var(--rose-bg); }

.module-card.blue .module-icon { background: var(--blue); }
.module-card.purple .module-icon { background: var(--purple); }
.module-card.orange .module-icon { background: var(--orange); }
.module-card.emerald .module-icon { background: var(--emerald); }
.module-card.rose .module-icon { background: var(--rose); }

.module-info h4 { font-size: 14px; font-weight: 700; color: #1a1a1a; margin-bottom: 0px; }
.module-info p { font-size: 10px; color: var(--text-muted); font-weight: 600; }

.chevron { font-size: 15px; font-weight: 900; }

.bottom-nav {
    height: 70px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.nav-btn {
    font-size: 24px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    transition: 0.3s;
}

.nav-btn.active { background: #f1f5f9; }

/* Usability Colors */
.btn-home { color: #f59e0b !important; background: #fff7ed; }
.btn-stats { color: #3b82f6 !important; background: #eff6ff; }
.btn-trophy { color: #eab308 !important; background: #fefce8; }
.btn-profile { color: #a855f7 !important; background: #faf5ff; }

/* Toast */
.toast {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: 0.3s;
    z-index: 1000;
}
.toast.show { opacity: 1; bottom: 80px; }

/* Feedback Overlay & Stars */
.feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 78, 59, 0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 30px;
}

.star-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.star {
    font-size: 50px;
    animation: starPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

.star:nth-child(1) { animation-delay: 0.2s; }
.star:nth-child(2) { animation-delay: 0.4s; }
.star:nth-child(3) { animation-delay: 0.6s; }

@keyframes starPop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; text-shadow: 0 0 20px #bef264; }
}

/* Hide scrollbar */
::-webkit-scrollbar { display: none; }

.modules-section-wrapper {
    margin: 20px -20px -20px -20px;
    padding: 25px 20px 100px 20px;
    background: linear-gradient(rgba(6, 78, 59, 0.8), rgba(6, 78, 59, 0.8)), url('login_bg_clean.png') center/cover no-repeat;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(190, 242, 100, 0.3);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-top: 60px; /* Pushed down as requested */
}

.modules-section-wrapper .module-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 12px;
}

.modules-section-wrapper .module-card.locked {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.modules-section-wrapper .module-card.locked h4, 
.modules-section-wrapper .module-card.locked p {
    color: rgba(255,255,255,0.8);
}

/* Tabs Styling */
.tab-bar { 
    display: flex; 
    gap: 8px; 
    margin: 25px 0 15px 0; 
    overflow-x: auto; 
    padding-bottom: 5px; 
}
.tab-btn { 
    padding: 10px 14px; 
    background: white; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: 800; 
    color: #64748b; 
    border: 1px solid #e2e8f0; 
    white-space: nowrap; 
    cursor: pointer; 
    text-transform: uppercase; 
    letter-spacing: 0.2px;
    transition: 0.3s;
}
.tab-btn.active { 
    background: #064e3b; 
    color: white; 
    border-color: #064e3b; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

/* Global Quiz Button Style */
.btn-take-quiz {
    width: 100%;
    height: 55px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}
