
*{margin:0;padding:0;box-sizing:border-box;font-family:'Poppins',sans-serif}
html{scroll-behavior:smooth}
body{background:#020617;color:#fff;overflow-x:hidden}
a{text-decoration:none;color:inherit}
button,input,select{font-family:inherit}
::-webkit-scrollbar{width:10px}
::-webkit-scrollbar-track{background:#020617}
::-webkit-scrollbar-thumb{background:#38bdf8;border-radius:20px}
.navbar{width:100%;padding:18px 8%;display:flex;justify-content:space-between;align-items:center;position:fixed;top:0;left:0;z-index:1000;background:rgba(2,6,23,.86);backdrop-filter:blur(18px)}
.logo{font-size:28px;font-weight:800;color:#38bdf8}
.nav-links{display:flex;list-style:none;gap:26px;align-items:center}
.nav-links a{font-size:15px;color:#fff;transition:.3s}
.nav-links a:hover{color:#38bdf8}
.dropdown{position:relative}
.dropdown-content{display:none;position:absolute;top:100%;left:0;background:#0f172a;min-width:175px;border-radius:16px;box-shadow:0 15px 40px rgba(0,0,0,.4);overflow:hidden;padding-top:8px}
.dropdown-content a{display:block;padding:14px 18px}
.dropdown:hover .dropdown-content{display:block}
.auth-buttons button,.primary-btn,.secondary-btn,.danger-btn{padding:12px 22px;border-radius:13px;border:none;cursor:pointer;font-weight:700;transition:.3s}
.login-btn,.secondary-btn{background:#1e293b;color:#fff;border:1px solid rgba(56,189,248,.5)}
.signup-btn,.primary-btn{background:#38bdf8;color:#000}
.danger-btn{background:#ef4444;color:white}
.auth-buttons{display:flex;gap:10px}
.menu-btn{display:none;font-size:28px;cursor:pointer}
section{padding:105px 8%}
.hero{min-height:100vh;display:flex;align-items:center;justify-content:space-between;padding-top:140px}
.hero-left{width:52%}
.tag{display:inline-block;padding:10px 20px;color:#38bdf8;background:rgba(56,189,248,.1);border:1px solid rgba(56,189,248,.3);border-radius:50px;margin-bottom:24px}
.hero h1{font-size:70px;line-height:1.1;margin-bottom:24px}
.hero p,.muted{font-size:18px;color:#cbd5e1;line-height:1.8}
.hero-buttons{margin-top:32px;display:flex;gap:14px;flex-wrap:wrap}
button:hover,.card:hover{transform:translateY(-5px)}
.stats{display:flex;gap:18px;margin-top:42px;flex-wrap:wrap}
.stat-box{background:#0f172a;padding:20px;border-radius:18px;min-width:150px;border:1px solid rgba(255,255,255,.06)}
.stat-box h2{color:#38bdf8}
.hero-right{width:40%;height:510px;position:relative}
.glow{width:350px;height:350px;background:#38bdf8;filter:blur(150px);position:absolute;top:100px;left:50px;opacity:.28}
.floating-card{position:absolute;background:#0f172a;padding:22px 30px;border-radius:22px;font-weight:700;box-shadow:0 20px 45px rgba(0,0,0,.45);animation:float 3.5s ease-in-out infinite;border:1px solid rgba(255,255,255,.06)}
.card1{top:40px;left:20px}.card2{top:170px;right:20px}.card3{bottom:120px;left:40px}.card4{bottom:20px;right:45px}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-18px)}}
.section-title{text-align:center;margin-bottom:58px}
.section-title span{color:#38bdf8;letter-spacing:2px;font-size:14px;font-weight:800}
.section-title h2{font-size:43px;margin-top:16px}
.section-title p{color:#cbd5e1;margin-top:14px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:26px}
.card{background:#0f172a;padding:32px;border-radius:24px;transition:.35s;border:1px solid rgba(255,255,255,.06);position:relative;overflow:hidden}
.card:hover{box-shadow:0 0 30px rgba(56,189,248,.25)}
.card h3{font-size:22px;margin-bottom:12px}
.card p{color:#cbd5e1;line-height:1.7}
.locked::before{content:"Login Required";position:absolute;right:18px;top:18px;background:#facc15;color:#000;padding:7px 12px;border-radius:50px;font-size:12px;font-weight:800}
.reels-container{display:flex;gap:24px;overflow-x:auto;padding-bottom:18px}
.reel-card{min-width:230px;height:370px;border-radius:28px;background:linear-gradient(180deg,#1e293b,#020617);padding:24px;display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(255,255,255,.08);transition:.3s}
.reel-card:hover{transform:scale(1.04)}
.lock{background:#facc15;color:#000;padding:7px 14px;border-radius:50px;font-size:13px;font-weight:800;width:max-content}
.practice-boxes{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:24px}
.practice-box{background:#38bdf8;color:#000;padding:26px;border-radius:22px;font-weight:800;font-size:18px;cursor:pointer;transition:.3s}
.method-card{border-left:5px solid #38bdf8}
.mastery{display:flex;gap:18px;justify-content:center;flex-wrap:wrap;margin-top:34px}
.mastery div{padding:16px 26px;border-radius:16px;font-weight:800}
.red{background:#ef4444}.yellow{background:#facc15;color:#000}.green{background:#22c55e;color:#000}
.cta-content{background:linear-gradient(135deg,#0f172a,#1e293b);padding:75px;border-radius:35px;text-align:center}
.cta-content h2{font-size:46px}.cta-content p{color:#cbd5e1;margin:18px 0 32px}
footer{background:#000814;padding:50px 8%;text-align:center}
footer h2{color:#38bdf8;margin-bottom:10px}footer p{color:#94a3b8}
.fade-up{opacity:0;transform:translateY(55px);transition:.8s ease}
.fade-up.show{opacity:1;transform:translateY(0)}
.page-wrap{padding:130px 8% 80px;min-height:100vh}
.form-shell{max-width:520px;margin:auto;background:#0f172a;border:1px solid rgba(255,255,255,.08);border-radius:28px;padding:36px;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.form-shell h1{font-size:34px;margin-bottom:10px;color:#38bdf8}
.form-group{margin-top:18px}
.form-group label{display:block;margin-bottom:8px;font-weight:700}
.form-group input,.form-group select{width:100%;padding:14px 16px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:#020617;color:#fff;outline:none}
.form-group input:focus,.form-group select:focus{border-color:#38bdf8}
.full-btn{width:100%;margin-top:24px}
.notice{background:rgba(56,189,248,.1);border:1px solid rgba(56,189,248,.3);color:#cbd5e1;border-radius:16px;padding:15px;margin:18px 0}
.dashboard-hero{background:linear-gradient(135deg,#0f172a,#1e293b);border-radius:30px;padding:38px;margin-bottom:32px}
.subject-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:24px;margin-top:28px}
.tile-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.small-btn{padding:10px 14px;border:none;border-radius:12px;cursor:pointer;font-weight:800;background:#1e293b;color:white}
.small-btn.blue{background:#38bdf8;color:#000}
.account-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:26px}
@media(max-width:950px){
.hero{flex-direction:column;text-align:center}.hero-left,.hero-right{width:100%}.hero h1{font-size:50px}
.nav-links{display:none;flex-direction:column;position:absolute;top:75px;right:8%;background:#0f172a;width:235px;padding:25px;border-radius:20px}
.nav-links.active{display:flex}.menu-btn{display:block}.auth-buttons{display:none}.hero-buttons,.stats{justify-content:center}
}
@media(max-width:600px){
section,.page-wrap{padding-left:6%;padding-right:6%}.hero h1{font-size:40px}.section-title h2,.cta-content h2{font-size:31px}.cta-content{padding:42px 24px}.form-shell{padding:26px}
}


/* AI CHAT PAGE */
.chat-layout{display:grid;grid-template-columns:280px 1fr;gap:24px}
.chat-sidebar{background:#0f172a;border:1px solid rgba(255,255,255,.08);border-radius:24px;padding:24px}
.chat-sidebar h3{color:#38bdf8;margin-bottom:14px}
.chat-tip{background:#020617;padding:14px;border-radius:14px;margin-top:12px;color:#cbd5e1;font-size:14px}
.chat-box{background:#0f172a;border:1px solid rgba(255,255,255,.08);border-radius:24px;overflow:hidden;min-height:620px;display:flex;flex-direction:column}
.chat-header{padding:22px;background:linear-gradient(135deg,#0f172a,#1e293b);border-bottom:1px solid rgba(255,255,255,.08)}
.chat-header h2{color:#38bdf8}
.chat-messages{flex:1;padding:24px;overflow-y:auto}
.message{max-width:82%;padding:14px 16px;border-radius:18px;margin-bottom:14px;line-height:1.6;white-space:pre-line}
.bot-message{background:#1e293b;color:#e2e8f0}
.user-message{background:#38bdf8;color:#000;margin-left:auto;font-weight:600}
.chat-input-area{display:flex;gap:12px;padding:20px;border-top:1px solid rgba(255,255,255,.08)}
.chat-input-area input{flex:1;padding:15px 16px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:#020617;color:#fff;outline:none}
.quick-prompts{display:flex;flex-wrap:wrap;gap:10px;padding:0 20px 18px}
.quick-prompts button{padding:10px 12px;border:none;border-radius:50px;background:#1e293b;color:white;cursor:pointer}
@media(max-width:850px){.chat-layout{grid-template-columns:1fr}.chat-box{min-height:560px}}

#loader{position:fixed;inset:0;background:#020617;z-index:99999;display:flex;justify-content:center;align-items:center;transition:.6s ease}
.loader-box{text-align:center}.loader-logo{font-size:38px;font-weight:800;color:#38bdf8;text-shadow:0 0 25px rgba(56,189,248,.7);animation:pulseGlow 1.6s infinite}.loader-text{margin-top:12px;color:#cbd5e1}.loader-ring{width:56px;height:56px;border:5px solid rgba(56,189,248,.15);border-top:5px solid #38bdf8;border-radius:50%;margin:24px auto 0;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulseGlow{50%{text-shadow:0 0 45px rgba(56,189,248,1)}}
#toast{position:fixed;top:95px;right:25px;background:#0f172a;color:#fff;border:1px solid rgba(56,189,248,.4);padding:14px 18px;border-radius:16px;box-shadow:0 20px 45px rgba(0,0,0,.35);z-index:9999;opacity:0;transform:translateX(120%);transition:.4s ease;max-width:330px}#toast.show{opacity:1;transform:translateX(0)}
.theme-toggle{position:fixed;right:22px;bottom:92px;z-index:9998;width:48px;height:48px;border:none;border-radius:50%;background:#38bdf8;color:#000;font-size:20px;cursor:pointer;box-shadow:0 12px 35px rgba(56,189,248,.35)}
body.light-mode{background:#f8fafc;color:#0f172a}body.light-mode .navbar,body.light-mode .card,body.light-mode .stat-box,body.light-mode .form-shell,body.light-mode .chat-sidebar,body.light-mode .chat-box,body.light-mode .dashboard-hero,body.light-mode .progress-card,body.light-mode .search-box{background:#fff;color:#0f172a;border-color:#e2e8f0}body.light-mode .muted,body.light-mode .card p,body.light-mode .section-title p,body.light-mode footer p{color:#475569}body.light-mode .nav-links a{color:#0f172a}body.light-mode footer{background:#e2e8f0}
.avatar{width:46px;height:46px;border-radius:50%;background:#38bdf8;color:#000;display:flex;align-items:center;justify-content:center;font-weight:900;box-shadow:0 0 22px rgba(56,189,248,.45)}
.premium-blur{filter:saturate(.8)}.premium-blur::after{content:"🔒 Premium Preview";position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:rgba(2,6,23,.72);backdrop-filter:blur(4px);color:#fff;font-weight:900;font-size:18px;opacity:0;transition:.3s}.premium-blur:hover::after{opacity:1}
.search-box{max-width:760px;margin:0 auto 36px;display:flex;gap:12px;background:#0f172a;padding:12px;border-radius:20px;border:1px solid rgba(255,255,255,.08)}.search-box input{flex:1;border:none;outline:none;background:transparent;color:#fff;padding:12px;font-size:16px}.search-box button{padding:12px 20px;border:none;border-radius:14px;background:#38bdf8;color:#000;font-weight:800;cursor:pointer}body.light-mode .search-box input{color:#0f172a}
.progress-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:22px;margin:28px 0}.progress-card{background:#0f172a;border:1px solid rgba(255,255,255,.08);border-radius:22px;padding:24px}.progress-card h3{margin-bottom:12px}.progress-bar{height:12px;background:#1e293b;border-radius:50px;overflow:hidden;margin-top:12px}.progress-fill{height:100%;background:#38bdf8;border-radius:50px}
.bottom-nav{position:fixed;bottom:0;left:0;width:100%;background:rgba(2,6,23,.94);backdrop-filter:blur(16px);border-top:1px solid rgba(255,255,255,.08);display:none;justify-content:space-around;padding:10px 6px;z-index:9997}.bottom-nav a{color:#cbd5e1;font-size:12px;text-align:center}.bottom-nav span{display:block;font-size:20px;margin-bottom:2px}body.light-mode .bottom-nav{background:rgba(255,255,255,.94)}body.light-mode .bottom-nav a{color:#0f172a}
@media(max-width:768px){.bottom-nav{display:flex}body{padding-bottom:64px}.theme-toggle{bottom:78px}#toast{left:15px;right:15px;top:85px;max-width:none}.search-box{flex-direction:column}}


/* REFINED HERO FIXES */
.floating-card{
    color:#ffffff !important;
    font-size:18px;
    min-width:220px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
}
body.light-mode .floating-card{
    background:#ffffff !important;
    color:#0f172a !important;
    border:1px solid #dbeafe !important;
    box-shadow:0 18px 45px rgba(15,23,42,.16) !important;
}
body.light-mode .glow{
    opacity:.10 !important;
}
body.light-mode .hero p{
    color:#475569 !important;
}
body.light-mode .stat-box p{
    color:#64748b !important;
}
.trust-strip{
    margin-top:42px;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:18px;
}
.trust-item{
    background:#0f172a;
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    padding:18px;
    transition:.3s;
}
.trust-item:hover{
    transform:translateY(-5px);
    box-shadow:0 0 25px rgba(56,189,248,.18);
}
.trust-item h3{
    color:#38bdf8;
    font-size:22px;
    margin-bottom:6px;
}
.trust-item p{
    color:#cbd5e1;
    font-size:14px;
    line-height:1.5;
}
body.light-mode .trust-item{
    background:#ffffff;
    border-color:#dbeafe;
    box-shadow:0 10px 30px rgba(15,23,42,.06);
}
body.light-mode .trust-item p{
    color:#64748b;
}
.micro-card{
    position:absolute;
    width:82px;
    height:82px;
    border-radius:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    background:rgba(56,189,248,.12);
    border:1px solid rgba(56,189,248,.25);
    animation:softSpin 7s linear infinite;
}
.micro1{top:270px;left:20px}
.micro2{top:70px;right:130px}
@keyframes softSpin{
    0%{transform:rotate(0deg) translateY(0)}
    50%{transform:rotate(8deg) translateY(-10px)}
    100%{transform:rotate(0deg) translateY(0)}
}
body.light-mode .micro-card{
    background:#ffffff;
    color:#0f172a;
    border-color:#dbeafe;
    box-shadow:0 14px 35px rgba(15,23,42,.10);
}


/* FINAL LIGHT MODE FIX — DARK MODE UNCHANGED */

body.light-mode{
    background:#f8fafc !important;
    color:#0f172a !important;
}

/* Navbar */
body.light-mode .navbar{
    background:rgba(255,255,255,.92) !important;
    border-bottom:1px solid #e2e8f0 !important;
}
body.light-mode .nav-links a{
    color:#0f172a !important;
}
body.light-mode .nav-links a:hover{
    color:#0284c7 !important;
}
body.light-mode .dropdown-content{
    background:#ffffff !important;
    border:1px solid #e2e8f0 !important;
}
body.light-mode .dropdown-content a{
    color:#0f172a !important;
}

/* Hero */
body.light-mode .hero h1,
body.light-mode .section-title h2,
body.light-mode .cta-content h2,
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode label{
    color:#0f172a !important;
}
body.light-mode .hero p,
body.light-mode .muted,
body.light-mode .section-title p,
body.light-mode .card p,
body.light-mode .cta-content p,
body.light-mode .trust-item p,
body.light-mode .stat-box p{
    color:#475569 !important;
}
body.light-mode .tag{
    background:#e0f2fe !important;
    color:#0284c7 !important;
    border:1px solid #bae6fd !important;
}

/* Cards and boxes */
body.light-mode .card,
body.light-mode .stat-box,
body.light-mode .trust-item,
body.light-mode .progress-card,
body.light-mode .form-shell,
body.light-mode .chat-sidebar,
body.light-mode .chat-box,
body.light-mode .dashboard-hero{
    background:#ffffff !important;
    color:#0f172a !important;
    border:1px solid #e2e8f0 !important;
    box-shadow:0 12px 35px rgba(15,23,42,.06) !important;
}

/* CTA Section */
body.light-mode .cta-content{
    background:linear-gradient(135deg,#ffffff,#e0f2fe) !important;
    border:1px solid #bae6fd !important;
    box-shadow:0 18px 45px rgba(15,23,42,.08) !important;
}
body.light-mode .cta-content h2{
    color:#0f172a !important;
    opacity:1 !important;
}

/* Forms */
body.light-mode input,
body.light-mode select,
body.light-mode textarea,
body.light-mode .form-group input,
body.light-mode .form-group select,
body.light-mode .chat-input-area input{
    background:#ffffff !important;
    color:#0f172a !important;
    border:1px solid #cbd5e1 !important;
}
body.light-mode input::placeholder,
body.light-mode textarea::placeholder{
    color:#64748b !important;
}
body.light-mode option{
    background:#ffffff !important;
    color:#0f172a !important;
}

/* Search */
body.light-mode .search-box{
    background:#ffffff !important;
    border:1px solid #cbd5e1 !important;
}
body.light-mode .search-box input{
    color:#0f172a !important;
}

/* Floating hero cards */
body.light-mode .floating-card{
    background:#ffffff !important;
    color:#0f172a !important;
    border:1px solid #dbeafe !important;
    box-shadow:0 18px 45px rgba(15,23,42,.14) !important;
}
body.light-mode .micro-card{
    background:#ffffff !important;
    color:#0f172a !important;
    border:1px solid #dbeafe !important;
    box-shadow:0 14px 35px rgba(15,23,42,.10) !important;
}
body.light-mode .glow{
    opacity:.08 !important;
}

/* Practice boxes */
body.light-mode .practice-box{
    background:#38bdf8 !important;
    color:#020617 !important;
}

/* Buttons */
body.light-mode .secondary-btn,
body.light-mode .login-btn,
body.light-mode .small-btn{
    background:#ffffff !important;
    color:#0f172a !important;
    border:1px solid #cbd5e1 !important;
}
body.light-mode .primary-btn,
body.light-mode .signup-btn,
body.light-mode .small-btn.blue{
    background:#38bdf8 !important;
    color:#020617 !important;
}

/* AI chat */
body.light-mode .bot-message{
    background:#f1f5f9 !important;
    color:#0f172a !important;
}
body.light-mode .user-message{
    background:#38bdf8 !important;
    color:#020617 !important;
}
body.light-mode .chat-header{
    background:linear-gradient(135deg,#ffffff,#e0f2fe) !important;
    border-bottom:1px solid #bae6fd !important;
}

/* Footer and mobile nav */
body.light-mode footer{
    background:#e2e8f0 !important;
}
body.light-mode .bottom-nav{
    background:rgba(255,255,255,.95) !important;
    border-top:1px solid #e2e8f0 !important;
}
body.light-mode .bottom-nav a{
    color:#0f172a !important;
}

/* Premium overlay remains visible in both modes */
body.light-mode .premium-blur::after{
    background:rgba(255,255,255,.78) !important;
    color:#0f172a !important;
}

/* Toast */
body.light-mode #toast{
    background:#ffffff !important;
    color:#0f172a !important;
    border:1px solid #bae6fd !important;
}


/* MATERIALS / PRACTICE APP FLOW */
.breadcrumb{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    margin-bottom:26px;
    color:#94a3b8;
}
.breadcrumb a{
    color:#38bdf8;
    font-weight:700;
}
.learning-card{
    min-height:230px;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}
.learning-card .big-icon{
    font-size:42px;
    margin-bottom:12px;
}
.learning-card .card-footer{
    margin-top:20px;
    color:#38bdf8;
    font-weight:800;
}
.chapter-list{
    display:grid;
    gap:18px;
}
.chapter-item{
    background:#0f172a;
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    padding:22px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
}
.chapter-item h3{
    margin-bottom:8px;
}
.chapter-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
body.light-mode .chapter-item{
    background:#ffffff !important;
    border-color:#e2e8f0 !important;
    color:#0f172a !important;
    box-shadow:0 12px 35px rgba(15,23,42,.06) !important;
}
.empty-note{
    background:rgba(56,189,248,.1);
    border:1px solid rgba(56,189,248,.25);
    color:#cbd5e1;
    border-radius:18px;
    padding:18px;
    margin-top:26px;
}
body.light-mode .empty-note{
    background:#e0f2fe;
    color:#0f172a;
    border-color:#bae6fd;
}

.admin-badge{background:#facc15;color:#000;padding:8px 14px;border-radius:999px;font-weight:900;font-size:13px}
.status-active{background:#22c55e;color:#000;padding:8px 12px;border-radius:999px;font-weight:900}
.status-inactive{background:#ef4444;color:#fff;padding:8px 12px;border-radius:999px;font-weight:900}
.table-wrap{overflow-x:auto;background:#0f172a;border:1px solid rgba(255,255,255,.08);border-radius:24px;padding:18px}
table{width:100%;border-collapse:collapse;min-width:780px}
th,td{text-align:left;padding:14px;border-bottom:1px solid rgba(255,255,255,.08)}
th{color:#38bdf8}
.access-lock{max-width:760px;margin:30px auto;background:#0f172a;border:1px solid rgba(255,255,255,.08);border-radius:28px;padding:34px;text-align:center}
.access-lock h2{color:#38bdf8;margin-bottom:14px}
.readonly-field{background:#020617!important;opacity:.8}
body.light-mode .table-wrap,body.light-mode .access-lock{background:#fff!important;color:#0f172a!important;border-color:#e2e8f0!important}
body.light-mode th,body.light-mode td{border-color:#e2e8f0!important}
body.light-mode .readonly-field{background:#f1f5f9!important}

.viewer-shell{min-height:100vh;padding:110px 5% 40px;background:#020617}
.viewer-topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:22px}
.viewer-frame-wrap{position:relative;background:#0f172a;border:1px solid rgba(255,255,255,.08);border-radius:24px;padding:16px;min-height:75vh;overflow:hidden}
.watermark-layer{position:absolute;inset:0;pointer-events:none;z-index:10;opacity:.16;display:grid;grid-template-columns:repeat(3,1fr);gap:35px;transform:rotate(-18deg)}
.watermark-layer div{font-weight:900;font-size:18px;color:#0f172a;display:flex;align-items:center;justify-content:center;white-space:nowrap}
.viewer-warning{background:rgba(250,204,21,.12);border:1px solid rgba(250,204,21,.35);color:#fde68a;padding:14px 18px;border-radius:16px;margin-bottom:16px}
body.light-mode .viewer-shell{background:#f8fafc!important}
body.light-mode .viewer-frame-wrap{background:#fff!important;border-color:#e2e8f0!important}
body.light-mode .viewer-warning{background:#fef9c3!important;color:#713f12!important;border-color:#fde68a!important}


/* FREEMIUM ACCESS SYSTEM */
.plan-badge{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:7px 13px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
}
.plan-guest{background:#e2e8f0;color:#0f172a}
.plan-free{background:#bae6fd;color:#075985}
.plan-premium{background:#facc15;color:#422006}
.class-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    gap:22px;
}
.class-card{
    cursor:pointer;
    min-height:190px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}
.class-number{
    font-size:48px;
    font-weight:900;
    color:#38bdf8;
}
.free-label,.premium-label,.preview-label{
    display:inline-block;
    width:max-content;
    padding:6px 11px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
}
.free-label{background:#22c55e;color:#052e16}
.premium-label{background:#facc15;color:#422006}
.preview-label{background:#38bdf8;color:#020617}
.locked-card{
    position:relative;
}
.locked-card::after{
    content:"🔒 Premium";
    position:absolute;
    right:16px;
    top:16px;
    background:#facc15;
    color:#422006;
    padding:7px 11px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
}
.chapter-access{
    display:flex;
    align-items:center;
    gap:9px;
    flex-wrap:wrap;
}
.preview-reader{
    max-width:980px;
    margin:0 auto;
}
.preview-page{
    background:#fff;
    color:#0f172a;
    min-height:680px;
    border-radius:16px;
    padding:54px;
    margin-bottom:24px;
    box-shadow:0 18px 55px rgba(0,0,0,.25);
    position:relative;
    overflow:hidden;
}
.preview-page h2{color:#0f172a!important;margin-bottom:18px}
.preview-page p{line-height:1.85;color:#334155}
.page-number{
    position:absolute;
    right:24px;
    bottom:18px;
    color:#64748b;
    font-weight:800;
}
.preview-watermark{
    position:absolute;
    inset:0;
    pointer-events:none;
    opacity:.07;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:60px;
    font-weight:900;
    transform:rotate(-25deg);
}
.paywall{
    background:linear-gradient(135deg,#0f172a,#1e293b);
    border:1px solid rgba(56,189,248,.25);
    border-radius:30px;
    padding:42px;
    text-align:center;
    margin:26px auto;
    max-width:820px;
    box-shadow:0 25px 70px rgba(0,0,0,.35);
}
.paywall h2{font-size:36px;margin-bottom:14px}
.paywall ul{
    text-align:left;
    max-width:510px;
    margin:22px auto;
    color:#cbd5e1;
    line-height:2;
}
.price{
    font-size:44px;
    font-weight:900;
    color:#38bdf8;
    margin:15px 0;
}
.price small{font-size:16px;color:#94a3b8}
.access-banner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
    background:#0f172a;
    border:1px solid rgba(255,255,255,.08);
    padding:18px 22px;
    border-radius:20px;
    margin-bottom:26px;
}
.upgrade-strip{
    background:linear-gradient(90deg,#0ea5e9,#38bdf8);
    color:#020617;
    border-radius:22px;
    padding:22px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
    margin:28px 0;
}
.upgrade-strip h3{color:#020617!important}
body.light-mode .access-banner{
    background:#fff!important;
    color:#0f172a!important;
    border-color:#e2e8f0!important;
}
body.light-mode .paywall{
    background:linear-gradient(135deg,#fff,#e0f2fe)!important;
    color:#0f172a!important;
}
body.light-mode .paywall ul{color:#334155}
@media(max-width:650px){
    .preview-page{padding:28px;min-height:540px}
    .paywall{padding:28px 20px}
    .paywall h2{font-size:29px}
}
