:root{
    --primary:#2f5bff;
    --primary-2:#6b43ff;
    --teal:#16c7c0;
    --gold:#f1b24c;
    --purple:#8b5cf6;
    --ink:#18223f;
    --muted:#67718a;
    --line:#e8edf7;
    --page:#f6f7fb;
    --card:#ffffff;
    --shadow:0 14px 35px rgba(31,51,104,.08);
    --shadow-soft:0 8px 20px rgba(31,51,104,.06);
}

body{
    background:
        radial-gradient(circle at top left, rgba(107,67,255,.12), transparent 28%),
        radial-gradient(circle at top right, rgba(47,91,255,.10), transparent 24%),
        linear-gradient(180deg, #fbfbfe 0%, #f6f7fb 100%);
    color:var(--ink);
    font-family:Arial, Helvetica, sans-serif;
}

.app-shell{
    max-width:720px;
    margin:0 auto;
    min-height:100vh;
}

.topbar{
    position:sticky;
    top:0;
    z-index:1000;
    background:rgba(255,255,255,.82);
    border-bottom:1px solid rgba(232,237,247,.95);
    backdrop-filter:blur(14px);
}

.brand-title{font-size:18px;font-weight:800;}
.brand-sub{font-size:12px;color:var(--muted);}

.avatar-chip{
    width:46px;height:46px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    background:linear-gradient(135deg,var(--primary),var(--primary-2));
    color:#fff;font-weight:800;
    box-shadow:0 10px 22px rgba(47,91,255,.25);
}

.page-body{padding:18px 16px 110px;}

.premium-home{display:flex;flex-direction:column;gap:16px;}

.premium-card{
    background:var(--card);
    border:1px solid rgba(232,237,247,.95);
    border-radius:28px;
    box-shadow:var(--shadow);
}

.premium-hero{
    padding:22px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92)),
        linear-gradient(135deg, rgba(47,91,255,.08), rgba(107,67,255,.08));
}

.premium-brand{display:flex;gap:14px;align-items:flex-start;}

.brand-crest{width:84px;height:84px;border-radius:24px;background:#2f5bff;box-shadow:0 8px 16px rgba(47,91,255,.3);position:relative;flex-shrink:0;}
.brand-crest:before{
    content:"";
    display:none;
}
.premium-title{
    line-height:1.02;
    margin:0 0 8px;
    font-size:42px;
    font-weight:900;
    letter-spacing:-.03em;
}
.premium-title .line-1{display:block;color:#15214b;}
.premium-title .line-2{
    display:block;
    background:linear-gradient(90deg,#2f5bff 0%, #6a43ff 100%);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}

.greeting{font-size:15px;font-weight:800;margin-bottom:4px;}
.greeting-sub{color:var(--muted);font-size:14px;}

.hero-actions{display:flex;gap:10px;align-items:flex-start;}
.hero-icon-btn{
    width:54px;height:54px;border-radius:18px;
    background:#fff;border:1px solid var(--line);
    box-shadow:var(--shadow-soft);
    position:relative;display:flex;align-items:center;justify-content:center;
    font-size:22px;
}
.hero-badge{
    position:absolute;top:-4px;right:-4px;
    width:22px;height:22px;border-radius:999px;
    background:#ff4b4b;color:#fff;font-size:12px;font-weight:800;
    display:flex;align-items:center;justify-content:center;
}
.hero-avatar{
    width:58px;height:58px;border-radius:50%;
    background:linear-gradient(135deg,#cfd7ff,#f2f4ff);
    border:3px solid #fff;box-shadow:var(--shadow-soft);
    display:flex;align-items:center;justify-content:center;
    font-weight:800;color:#2f5bff;
}

.progress-panel{
    background:linear-gradient(135deg,#09185c 0%, #131c7a 40%, #1a0f78 100%);
    color:#fff;border-radius:30px;padding:24px 20px;
    box-shadow:0 20px 34px rgba(20,22,90,.24);
}
.progress-grid{
    display:grid;grid-template-columns:1.2fr .8fr;gap:18px;align-items:center;
}
.progress-label{font-weight:700;font-size:13px;opacity:.98;}
.progress-percent{font-size:64px;line-height:.95;font-weight:900;margin:10px 0 6px;}
.progress-copy{font-size:15px;opacity:.95;margin-bottom:16px;}
.progress-bar{
    height:14px;border-radius:999px;background:rgba(255,255,255,.14);
    overflow:hidden;max-width:260px;
}
.progress-bar > span{
    display:block;height:100%;width:75%;
    background:linear-gradient(90deg,#23f0ea,#18c7c0);
    border-radius:999px;
}
.progress-side{
    border-left:1px solid rgba(255,255,255,.14);
    padding-left:18px;
}
.progress-side .k{font-size:56px;line-height:1;font-weight:900;margin:10px 0;}
.progress-side .small{color:rgba(255,255,255,.86);font-size:14px;}
.progress-side .reward{color:#ffcf73;font-size:16px;font-weight:800;margin-top:4px;}

.books-stack{position:relative;width:180px;height:130px;margin:auto;}
.book{
    position:absolute;left:50%;transform:translateX(-50%);
    width:120px;height:28px;border-radius:8px 14px 14px 8px;
}
.book.b1{bottom:14px;background:linear-gradient(135deg,#2b7cff,#53a2ff);}
.book.b2{bottom:44px;background:linear-gradient(135deg,#6c52ff,#8e6cff);width:132px;}
.book.b3{bottom:74px;background:linear-gradient(135deg,#6b3cff,#a266ff);width:118px;}
.trophy{
    position:absolute;left:50%;transform:translateX(-50%);
    top:4px;width:78px;height:88px;border-radius:18px 18px 22px 22px;
    background:linear-gradient(180deg,#ffd989,#f0a81f);
}
.trophy:before{
    content:"★";position:absolute;top:18px;left:0;right:0;text-align:center;
    font-size:26px;color:#a56a0c;
}
.medal-chip{
    position:absolute;right:18px;bottom:40px;width:52px;height:52px;border-radius:50%;
    background:linear-gradient(135deg,#25e7d7,#17c8c1);
    color:#ffe38b;display:flex;align-items:center;justify-content:center;font-size:22px;
}

.section-tile{
    display:grid;
    grid-template-columns:144px 1fr 56px;
    gap:16px;align-items:center;padding:16px;
}
.section-visual{
    height:144px;border-radius:24px;position:relative;overflow:hidden;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.55), var(--shadow-soft);
}
.visual-academic{background:linear-gradient(135deg,#9ad4ff,#3f8cff);}
.visual-real{background:linear-gradient(135deg,#d7f7f5,#86d6cf);}
.visual-affirm{background:linear-gradient(135deg,#ebd8ff,#c08df7);}

.visual-stack-books .mini-book,
.visual-crown .cushion,
.visual-book-candle .book3d{position:absolute;}
.visual-stack-books .mini-book{
    left:28px;width:88px;height:22px;border-radius:8px 12px 12px 8px;
}
.visual-stack-books .mini-book.one{bottom:28px;background:linear-gradient(135deg,#4d8eff,#88c8ff);}
.visual-stack-books .mini-book.two{bottom:52px;left:34px;background:linear-gradient(135deg,#6e54ff,#8f72ff);}
.visual-stack-books .mini-book.three{bottom:76px;left:40px;background:linear-gradient(135deg,#3b7eff,#58b2ff);}
.visual-stack-books .cap{
    position:absolute;top:22px;left:38px;width:86px;height:28px;
    background:linear-gradient(135deg,#1b2359,#252d6b);border-radius:8px;
}
.visual-stack-books .scroll{
    position:absolute;left:24px;bottom:18px;width:74px;height:18px;
    background:#fff;border-radius:999px;transform:rotate(-28deg);
}
.visual-stack-books .scroll:after{
    content:"";position:absolute;left:24px;top:-4px;width:18px;height:26px;
    border-radius:8px;background:#e84b52;
}
.visual-crown .cushion{
    left:20px;right:20px;bottom:22px;height:64px;border-radius:40px 40px 26px 26px;
    background:linear-gradient(135deg,#029e92,#037f7d);
}
.visual-crown .crown{
    position:absolute;left:26px;right:26px;top:28px;height:58px;
    background:linear-gradient(180deg,#ffd68b,#e3a21d);
    clip-path: polygon(0 100%, 8% 32%, 20% 64%, 34% 12%, 48% 64%, 62% 8%, 76% 62%, 90% 28%, 100% 100%);
}
.visual-book-candle .book3d{
    left:16px;top:18px;width:74px;height:102px;border-radius:10px;
    background:linear-gradient(145deg,#5830b7,#8c57ee);
}
.visual-book-candle .book3d:before{
    content:"I AM";position:absolute;left:0;right:0;top:28px;text-align:center;
    color:#ffde8b;font-size:20px;font-weight:800;
}
.visual-book-candle .book3d:after{
    content:"ELEVATED";position:absolute;left:0;right:0;top:58px;text-align:center;
    color:#ffde8b;font-size:10px;font-weight:700;
}
.visual-book-candle .candle{
    position:absolute;right:18px;bottom:18px;width:54px;height:64px;border-radius:18px;
    background:linear-gradient(180deg,#6c2adb,#9b6cff);
}
.visual-book-candle .candle:before{
    content:"";position:absolute;top:-12px;left:50%;transform:translateX(-50%);
    width:12px;height:18px;border-radius:50%;
    background:radial-gradient(circle at center,#ffe58c 0%, #ffbe3f 55%, rgba(255,190,63,0) 70%);
}

.icon-bubble{
    width:46px;height:46px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    color:#fff;font-size:20px;margin-bottom:10px;
}
.icon-bubble.blue{background:linear-gradient(135deg,#2f8fff,#2f5bff);}
.icon-bubble.teal{background:linear-gradient(135deg,#1cd6cf,#0ca39f);}
.icon-bubble.purple{background:linear-gradient(135deg,#9a66ff,#6d3dff);}

.section-title{
    font-size:28px;line-height:1.05;font-weight:900;letter-spacing:-.03em;
    margin:0 0 8px;color:#192452;
}
.section-sub{color:#404861;font-size:14px;margin-bottom:14px;}
.pill-row{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px;}
.soft-pill{
    border-radius:999px;padding:10px 14px;font-size:13px;font-weight:700;
    background:#fff;border:1.5px solid rgba(86,128,255,.35);color:#2f5bff;
}
.soft-pill.teal{color:#0f8d89;border-color:rgba(15,141,137,.35);}
.soft-pill.purple{color:#7b42ff;border-color:rgba(123,66,255,.35);}
.section-foot{color:var(--muted);font-size:15px;}

.action-orb{
    width:56px;height:56px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    color:#fff;font-size:28px;font-weight:700;text-decoration:none;
}
.action-orb.blue{background:linear-gradient(135deg,#2f8fff,#2f5bff);}
.action-orb.teal{background:linear-gradient(135deg,#18d3ca,#0da5a1);}
.action-orb.purple{background:linear-gradient(135deg,#9a66ff,#6d3dff);}

.download-banner{
    background:linear-gradient(135deg,#07155d,#18106f 48%, #130d65 100%);
    color:#fff;padding:16px;
    display:grid;grid-template-columns:116px 1fr auto;gap:14px;align-items:center;
    border-radius:28px;
}
.download-icon-box{
    height:98px;border-radius:22px;background:linear-gradient(180deg,#dce6ff,#b7cbff);
    position:relative;
}
.download-icon-box:before{
    content:"☁";position:absolute;left:50%;top:18px;transform:translateX(-50%);
    font-size:56px;color:#5c8cff;
}
.download-icon-box:after{
    content:"↓";position:absolute;left:50%;bottom:14px;transform:translateX(-50%);
    font-size:34px;color:#fff;
}
.version-chip{
    display:inline-flex;align-items:center;gap:8px;border-radius:999px;
    background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.16);
    padding:10px 14px;font-size:14px;font-weight:800;
}
.version-dot{
    width:10px;height:10px;border-radius:50%;background:#27d77f;
}
.download-title{font-size:18px;font-weight:900;margin:6px 0 4px;}
.download-copy{color:rgba(255,255,255,.84);font-size:14px;line-height:1.6;}
.update-btn{
    border:none;border-radius:18px;background:linear-gradient(180deg,#ffda90,#f1b24c);
    color:#332000;padding:16px 22px;font-size:15px;font-weight:900;text-decoration:none;
}

.bottom-nav{
    position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;
    max-width:720px;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);
    border-top:1px solid rgba(226,232,240,.85);padding:10px 12px max(10px, env(safe-area-inset-bottom));
    z-index:1000;
}
.bottom-nav .nav-wrap{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.bottom-nav a{
    text-decoration:none;color:var(--muted);text-align:center;padding:10px 6px;
    border-radius:18px;font-size:12px;font-weight:700;
}
.bottom-nav a.active{background:#eff3ff;color:var(--primary);}
.bottom-nav a .nav-icon{display:block;font-size:18px;line-height:1;margin-bottom:4px;}
.bottom-nav a .nav-text{display:block;line-height:1.1;}

@media (max-width:640px){
    .premium-title{font-size:34px;}
    .progress-grid{grid-template-columns:1fr;}
    .progress-side{border-left:none;padding-left:0;border-top:1px solid rgba(255,255,255,.12);padding-top:16px;}
    .section-tile{grid-template-columns:1fr;}
    .download-banner{grid-template-columns:1fr;}
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item:hover {
    color: #2f5bff;
    background: rgba(47, 91, 255, 0.08);
}

.bottom-nav-item.active {
    color: #2f5bff;
    background: rgba(47, 91, 255, 0.1);
}

.bottom-nav-item span {
    font-size: 11px;
    font-weight: 600;
}
/* ============================================
   TEACHER BOTTOM NAVIGATION - PREMIUM 3D
   ============================================ */

/* Bottom nav container */
.bottom-nav-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 9999;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Bottom nav items wrapper */
.bottom-nav-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 10px 12px;
    gap: 4px;
}

/* Individual nav items */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 16px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 14px;
    position: relative;
    min-width: 70px;
    text-align: center;
}

/* Icon styling */
.bottom-nav-item i {
    font-size: 22px;
    line-height: 1;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Label styling */
.bottom-nav-item span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover state */
.bottom-nav-item:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.06);
    transform: translateY(-1px);
}

.bottom-nav-item:hover i {
    transform: scale(1.1);
}

/* Active state - Premium gradient effect */
.bottom-nav-item.active {
    color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
    box-shadow: 
        inset 0 1px 2px rgba(59, 130, 246, 0.15),
        0 2px 8px rgba(59, 130, 246, 0.1);
}

.bottom-nav-item.active i {
    color: #2563eb;
    transform: scale(1.08);
}

.bottom-nav-item.active span {
    color: #1e40af;
    font-weight: 700;
}

/* Active state indicator dot */
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 6px;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    opacity: 0.8;
}

/* Tap feedback on mobile */
.bottom-nav-item:active {
    transform: scale(0.96);
}

/* Accessibility - ensure touch targets are large enough */
@media (hover: none) {
    .bottom-nav-item {
        min-height: 44px;
        padding: 12px 14px;
    }
}

/* Small screens - adjust spacing */
@media (max-width: 400px) {
    .bottom-nav-wrapper {
        padding: 8px 6px;
        gap: 2px;
    }
    
    .bottom-nav-item {
        padding: 8px 12px;
        min-width: 60px;
    }
    
    .bottom-nav-item i {
        font-size: 20px;
    }
    
    .bottom-nav-item span {
        font-size: 10px;
    }
}

/* Dark mode support (if needed later) */
@media (prefers-color-scheme: dark) {
    .bottom-nav-container {
        background: rgba(15, 23, 42, 0.95);
        border-top-color: rgba(71, 85, 105, 0.3);
    }
    
    .bottom-nav-item {
        color: #94a3b8;
    }
    
    .bottom-nav-item.active {
        color: #60a5fa;
        background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, rgba(129, 140, 248, 0.1) 100%);
    }
}

/* ============================================
   TEACHER BOTTOM NAV FIX - PREMIUM STYLING
   ============================================ */
.bottom-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 10px 14px !important;
    text-decoration: none !important;
    color: #94a3b8 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 16px !important;
    min-width: 70px !important;
    text-align: center !important;
}

.bottom-nav-item i {
    font-size: 24px !important;
    line-height: 1 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bottom-nav-item span {
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.bottom-nav-item:hover {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
    transform: translateY(-2px) !important;
}

.bottom-nav-item.active {
    color: #3b82f6 !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%) !important;
    box-shadow: inset 0 2px 4px rgba(59, 130, 246, 0.2), 0 4px 12px rgba(59, 130, 246, 0.15) !important;
}

.bottom-nav-item.active i {
    color: #2563eb !important;
    transform: scale(1.1) !important;
}

.bottom-nav-item.active span {
    color: #1e40af !important;
    font-weight: 700 !important;
}
