@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

/* =========================================
   1. VARIABLES, RESET & SCROLLBAR
   ========================================= */
:root {
    /* Palette */
    --text-main: #334155;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --text-blueLight: #e5e1fc;
    --bg-dark: #0f172a;

    /* Brand Colors */
    --blue: #38bdf8;
    --blue-strong: #86c1ff;
    --pink: #e73c7e;
    --gold: #fbbf24;
    --goldBright: #ffca43;
    --green: #10b981;
    --red: #f43f5e;
    --teal: #2dd4bf;
    --amber: #f59e0b;

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --modal-bg: rgba(30, 41, 59, 0.95);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; background-color: #0f172a; }
body { font-family: 'Poppins', sans-serif; min-height: 100vh; overflow-x: hidden; width: 100%; color: var(--text-light); background-color: var(--bg-dark); }

/* Focus Handling */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: none; border-color: rgba(255, 255, 255, 0.8); border-radius: 4px; }

/* Hide Arrows in Number Inputs */
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
  
/* Browser Autofill Fix */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active {
    -webkit-text-fill-color: white; transition: background-color 9999999s ease-in-out 0s; box-shadow: none; 
    -webkit-box-shadow: 0 0 0 30px rgba(0,0,0,0) inset; background-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 18px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(176, 188, 206, 0.411); border-radius: 4px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(198, 183, 211, 0.603); }


/* =========================================
   2. BACKGROUND MODES & THEMES
   ========================================= */
body.home-mode { background: transparent; }
body.home-mode::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: linear-gradient(-45deg, #0f172a, #1e1b4b, #060d2c, #064e3b);
    background-size: 400% 400%; animation: gradient 15s ease infinite; z-index: -100; pointer-events: none;
}
html.light-mode body.home-mode::before { background-image: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); }
@keyframes gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

body.quiz-mode {
    background-color: var(--bg-dark);
    background-image: radial-gradient(at 10% 10%, hsla(253,16%,7%,1) 0, transparent 50%), radial-gradient(at 50% 50%, rgb(67, 43, 94) 0, transparent 50%), radial-gradient(at 90% 90%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-attachment: fixed; background-size: 100% 100%; padding-bottom: 100px; position: relative; z-index: 0;
}

@media (min-width: 769px) {
    body.quiz-mode { background-image: radial-gradient(at 0% 100%, rgba(80, 39, 114, 0.6) 0, transparent 60%), radial-gradient(at 100% 0%, rgba(80, 39, 114, 0.6) 0, transparent 60%); }
    body.quiz-mode::before, body.quiz-mode::after { content: ''; position: fixed; width: 45vw; height: 45vw; filter: blur(150px); z-index: -1; }
    body.quiz-mode::before { top: 10%; left: 10%; background: radial-gradient(circle, rgba(247, 217, 255, 0.7) 0%, transparent 30%); animation: hover-1 35s ease-in-out infinite; }
    body.quiz-mode::after { bottom: 10%; right: 10%; background: radial-gradient(circle, rgba(173, 228, 252, 0.7) 0%, transparent 30%); animation: hover-2 40s ease-in-out infinite; }
}
@keyframes hover-1 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(25vw, 5vh); } 66% { transform: translate(10vw, 25vh); } }
@keyframes hover-2 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-25vw, -5vh); } 66% { transform: translate(-10vw, -25vh); } }

/* Immersive Mode */
body.immersive-mode .navbar, body.immersive-mode .nav-extension { display: none; }
body.immersive-mode .app-wrapper { padding-top: 0; }
.navbar, .nav-extension { transition: transform 0.3s ease, opacity 0.3s ease; }


/* =========================================
   3. GLOBAL UTILITIES & TYPOGRAPHY
   ========================================= */
.container { width: 90%; max-width: 800px; margin: 0 auto; padding: 20px; }
.center-screen { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 85vh; padding: 20px 0; width: 100%; }

.fade-in { opacity: 0; animation: fadeIn 0.5s ease-in-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.brand-title { font-family: 'Playfair Display', serif; letter-spacing: 2px; font-weight: 800; font-size: 3rem; }
.brand-subtitle { font-size: 1.1rem; opacity: 0.9; margin-bottom: 25px; }

.error-msg { background: rgba(255, 0, 0, 0.2); color: #fff; padding: 10px; border-radius: 8px; margin-top: 15px; font-weight: 600; border: 1px solid rgba(255,0,0,0.3); }
.placeholder-msg { padding: 40px; background: rgba(255,255,255,0.1); border-radius: 15px; margin-top: 20px; font-size: 1.1rem; }

body.home-mode strong { color: white; text-shadow: 0 2px 5px rgba(0,0,0,0.2); }
strong { color: var(--blue-strong); font-weight: 700; }
em { color: var(--gold); font-style: italic; font-weight: 500; }
u { text-decoration: none; border-bottom: 2px solid var(--text-muted); padding-bottom: 2px; color: white; }

kbd { display: inline-block; padding: 4px 8px; font-family: 'Consolas', 'Monaco', monospace; font-size: 0.9rem; font-weight: 700; line-height: 1; color: #f8fafc; vertical-align: middle; background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 6px; box-shadow: 0 4px 0 rgba(255, 255, 255, 0.1), 0 5px 10px rgba(0,0,0,0.2); margin: 0 2px; transition: all 0.1s; }
kbd:active { transform: translateY(4px); box-shadow: 0 0 0 rgba(255, 255, 255, 0.1); }

body[data-user-role="guest"] .report-btn { display: none; }

/* =========================================
   4. NAVBAR, MENUS & EXTENSIONS
   ========================================= */
.navbar { height: 70px; position: sticky; top: 0; z-index: 2000; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(15px); border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: space-between; padding: 0 5%; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: white; font-weight: 700; font-size: 1.5rem; }
.nav-brand span { text-align: center; line-height: 1.1; display: inline-block; text-wrap: balance; font-family: 'Cinzel', serif; letter-spacing: 1px; font-weight: 700; }
.brand-logo { height: 60px; width: auto; object-fit: contain; margin-right: 5px; filter: drop-shadow(1px 1px 2px rgba(255, 255, 255, 1)) brightness(1.06); transition: all 0.3s ease; }

.nav-menu { display: flex; gap: 5px; height: 100%; align-items: center; margin-left: 50px; margin-right: 50px; }
.nav-link { text-decoration: none; color: rgb(231, 244, 255); padding: 10px 18px; border-radius: 20px; font-weight: 600; transition: 0.3s; font-size: 1.1rem; cursor: pointer; letter-spacing: 0.3px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.nav-link:hover { color: white; background: rgba(255,255,255,0.1); }
.nav-link.active { background: rgba(255,255,255,0.2); color: white; font-weight: 700; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

/* Guest Auth Buttons */
.guest-auth-btns { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.guest-auth-btns .nav-link { border-radius: 20px; padding: 8px 20px; font-size: 0.95rem; }
.btn-signup { background-color: var(--pink); color: white; border: 1px solid var(--pink); box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4); }
.btn-signup:hover { background-color: #be123c; border-color: #be123c; transform: translateY(-2px); }
.btn-login { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-login:hover { background: rgba(255, 255, 255, 0.15); border-color: white; }

/* Profile Dropdown */
.nav-profile { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; margin-left: 20px; }
.profile-img-wrapper { width: 50px; height: 50px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); overflow: hidden; flex-shrink: 0; }
.profile-img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.profile-info { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; line-height: 1.2; text-align: right; margin-right: 12px; }
.profile-main-text { font-size: 0.9rem; color: white; font-weight: 600; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-sub-text { font-size: 0.7rem; color: var(--blue); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; opacity: 0.9; }

.dropdown-menu { display: none; position: absolute; top: 55px; right: 0; width: 240px; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); border-top: 1px solid rgba(255, 255, 255, 0.2); border-radius: 16px; padding: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); flex-direction: column; gap: 4px; z-index: 2500; }
.dropdown-menu.show { display: flex; }
.dd-item { padding: 10px 15px; color: #dce8f5; text-decoration: none; font-size: 0.9rem; border-radius: 8px; transition: 0.2s; display: flex; align-items: center; gap: 12px; }
.dd-item:hover { background: rgba(255,255,255,0.1); color: white; }
.dd-item.danger { color: var(--red); border-top: 1px solid rgba(255,255,255,0.1); margin-top: 5px; }

/* Exam Dropdown Specific */
.exam-dropdown { top: 50px; left: 50%; transform: translateX(-50%); width: 220px; }

/* Sub-Navbar Extension */
.nav-extension { width: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(15px); border-bottom: 1px solid #38bff8af; padding: 10px 5%; position: sticky; top: 70px; z-index: 900; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.nav-extension h2 { 
   margin: 0; 
   font-size: 1.1rem; 
   font-weight: 600; 
   color: rgb(245, 240, 255); 
   position: absolute; 
   left: 50%; 
   transform: translateX(-50%);
   text-align: center;
   white-space: nowrap;
   text-transform: uppercase;
}
.nav-extension .back-link { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; display: flex; align-items: center; gap: 5px; transition: 0.2s; }
.nav-extension .back-link:hover { color: white; }

.mobile-toggle { display: none; background: none; border: none; color: white; cursor: pointer; align-items: center; justify-content: center; padding: 8px; margin-right: 5px; border-radius: 8px; transition: background 0.2s; }
.mobile-toggle:hover { background: rgba(255, 255, 255, 0.05); }
.theme-toggle-btn-quiz { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Navbar Responsiveness */
@media (min-width: 1401px) {
    .mobile-toggle { display: none; }
    .nav-menu { position: absolute; left: 50%; transform: translateX(-50%); }
}
@media (max-width: 1400px) {
    .mobile-toggle { display: flex; }
    .nav-menu { display: none; }
    .nav-brand { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
    .profile-info { display: flex; }
    .nav-menu.mobile-open { display: flex; position: absolute; top: 70px; left: 0; width: 100%; height: auto; margin: 0; background: rgba(61, 67, 82, 0.986); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 50px rgba(0,0,0,0.5); flex-direction: column; padding: 20px 20px 30px 20px; gap: 10px; z-index: 1999; }
    .nav-menu.mobile-open .nav-link { width: 100%; text-align: center; padding: 15px; border-radius: 0; background: transparent; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-dropdown-container { width: 100%; display: block; }
    .exam-dropdown { position: static !important; transform: none !important; width: 100% !important; box-shadow: none !important; border: none !important; border-radius: 0 !important; background: rgba(0, 0, 0, 0.15) !important; margin-top: 0px; padding-bottom: 10px; display: flex !important; flex-direction: column !important; align-items: center !important; }
    .exam-dropdown .dd-item { justify-content: flex-start !important; width: 190px !important; padding-left: 20px !important; }
    body[data-user-role="guest"] .nav-brand { position: static; transform: none; margin-right: auto; }
}
@media (max-width: 1000px) { .profile-info { display: none; } }
@media (max-width: 900px) { .quiz-theme-text { display: none; } .theme-toggle-btn-quiz { padding: 0; width: 40px; height: 40px; border-radius: 50%; } }
@media (max-width: 600px) { .nav-brand { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; } .nav-brand span { display: none; } .brand-logo { height: 60px; } .mobile-toggle { margin-right: 10px; } }
@media (max-width: 500px) { .badge { display: none; } .level-tag { display: none; } .header-divider { display: none; } #admin-shortcuts .badge {display: inline-flex; } }


/* =========================================
   5. SHARED UI: CARDS, MODALS, BUTTONS & FORMS
   ========================================= */
.glass-card, .main-card { background: var(--glass-bg); backdrop-filter: blur(12px); max-width: 1100px; border: 1px solid var(--glass-border); border-radius: 20px; padding: 2rem; box-shadow: var(--glass-shadow); text-align: center; color: white; width: 100%; margin-bottom: 20px; }
.center-screen .glass-card { max-width: 400px; width: 90%; margin: 0 auto; }
@media (max-width: 1100px) { .center-screen .glass-card { max-width: 400px; width: 95%; margin: 0 auto; } .glass-card, .main-card { padding: 2rem 1rem; } }
@media (max-width: 600px) { .center-screen .glass-card { max-width: 400px; width: 98%; margin: 0 auto; } .glass-card, .main-card { padding: 2rem 0.3rem; } }

.quiz-glass-card { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(25px); border: 1px solid var(--glass-border); border-top: 1px solid rgba(255, 255, 255, 0.4); border-left: 1px solid rgba(255, 255, 255, 0.4); border-radius: 24px; padding: 2.5rem; margin-bottom: 2.5rem; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); color: var(--text-light); transition: transform 0.3s ease; }
.quiz-glass-card:hover { transform: translateY(-5px) scale(1.005); box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4); border-color: rgba(255, 255, 255, 0.3); }

/* Modals & Loaders */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); z-index: 9999; justify-content: center; align-items: center; animation: fadeIn 0.2s ease; }
.modal-overlay.open { display: flex; }
.glass-modal { background: var(--modal-bg); border: 1px solid var(--glass-border); border-top: 1px solid rgba(255,255,255,0.3); box-shadow: 0 20px 50px rgba(0,0,0,0.5); padding: 30px; border-radius: 20px; width: 90%; max-width: 400px; text-align: center; color: white; }
.glass-modal h3 { margin-bottom: 15px; font-size: 1.4rem; }
.glass-modal p { font-size: 0.95rem; color: #cbd5e1; margin-bottom: 25px; line-height: 1.5; }
.glass-textarea { width: 100%; height: 100px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 10px; color: white; font-family: 'Poppins', sans-serif; margin-bottom: 20px; resize: none; }
.glass-textarea:focus { outline: none; border-color: var(--blue); }
.modal-actions { display: flex; gap: 15px; justify-content: center; }
.glass-toast { position: fixed; top: 0; left: 50%; transform: translate(-50%, -150%); background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.5); color: white; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); padding: 12px 25px; border-radius: 50px; font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; z-index: 10000; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.glass-toast.show { transform: translate(-50%, 70px); }
.glass-toast.dark-mode { background: rgba(8, 21, 53, 0.644); border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 10px 40px rgba(22, 21, 26, 0.6); color: #f8fafc; }
@media (max-width: 600px) { .glass-toast { width: 90%; justify-content: center; white-space: normal; text-align: center; z-index: 10000; } }

#global-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-dark); z-index: 20000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
#global-loader.show { opacity: 1; pointer-events: all; }
.spinner { width: 50px; height: 50px; border: 4px solid rgba(255, 255, 255, 0.1); border-top: 4px solid var(--blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Buttons */
.start-btn { padding: 15px 30px; border-radius: 12px; background: rgba(110, 58, 131, 0.01); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-top: 1px solid rgba(255, 255, 255, 0.4); color: white; cursor: pointer; font-weight: 600; letter-spacing: 0.5px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.2); text-decoration: none; display: inline-block; font-family: 'Poppins', sans-serif; flex: 1 0 auto; }
.start-btn:hover { background: rgba(110, 58, 131, 0.09); border-color: rgba(255, 255, 255, 0.6); transform: translateY(-2px); color: white; }
.start-btn:active { transform: translateY(0); }
#dict-form .start-btn, #owq-form .start-btn { flex: 0 0 auto; width: auto; min-width: 0; }
@media (max-width: 400px) { #dict-form .start-btn, #owq-form .start-btn { flex: 1 0 auto; width: 100%; } }

.btn-secondary { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); color: white; padding: 12px 25px; border-radius: 30px; cursor: pointer; font-weight: 600; transition: all 0.2s; text-decoration: none; display: inline-block; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.nav-control-btn { padding: 12px 25px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.2); color: white; font-weight: 600; cursor: pointer; transition: 0.2s; font-family: 'Poppins', sans-serif; }
.nav-control-btn:hover { background: rgba(255,255,255,0.4); transform: translateY(-2px); }
.nav-control-btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.submit-exam-btn { background: var(--pink); color: white; border: none; padding: 10px 20px; border-radius: 30px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 15px rgba(231, 60, 126, 0.4); transition: 0.2s; }
.submit-exam-btn:hover { background: #be185d; transform: translateY(-2px); }
.btn-exit-quiz { text-decoration: none; background: rgba(255, 255, 255, 0.1); color: rgb(231, 244, 255); padding: 12px 25px; border-radius: 10px; font-weight: 600; transition: 0.3s; font-size: 1.1rem; cursor: pointer; letter-spacing: 0.3px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-exit-quiz:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.btn-cancel { padding: 10px 20px; border-radius: 10px; border: none; background: rgba(255, 255, 255, 0.15); color: white; cursor: pointer; font-weight: 500; }
.btn-cancel:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.btn-submit { padding: 10px 20px; border-radius: 10px; border: none; background: rgba(255, 255, 255, 0.15); color: white; cursor: pointer; font-weight: 700; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.fab-btn { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; border-radius: 30%; background: #d3f2ff36; color: white; border: none; box-shadow: 0 10px 25px rgb(51 62 67 / 45%); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s ease; z-index: 1000; }
.fab-btn:hover { transform: scale(1.1) rotate(90deg); background: rgba(255, 255, 255, 0.644); color: var(--blue); }
@media (max-width: 600px) { .fab-btn { bottom: 20px; right: 20px; width: 50px; height: 50px; } }
.fav-btn { color: #94a3b8; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.fav-btn:hover { color: var(--blue); transform: scale(1.1); }
.fav-btn.active svg { fill: var(--blue-strong); stroke: var(--blue-strong); }
/* Bookmark (Save) Button - Dark Mode */
.audio-btn.save-btn { color: #94a3b8; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.audio-btn.save-btn:hover { color: var(--gold); transform: scale(1.1); }
.audio-btn.save-btn.active svg { fill: var(--gold); stroke: var(--gold); }
.focus-btn { background: none; border: none; cursor: pointer; color: #94a3b8; padding: 5px; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; }
.focus-btn:hover, .focus-active .focus-btn { color: var(--blue); }
.focus-active .brand-title, .focus-active .brand-subtitle, .focus-active .tab-description, .focus-active .nav-control-btn, .focus-active .nav-control-container, .focus-active .tip-text { display: none; }
.focus-active #study-card-container { margin-top: 10px; transition: margin 0.3s ease; }
@media (max-width: 600px) { .focus-active .glass-card { padding: 15px; margin-top: 0; } .focus-active { padding-top: 10px; } }

/* Inputs & Forms */
.input-group { display: flex; gap: 10px; margin: 1rem 0; max-width: 600px; margin-left: auto; margin-right: auto; flex-wrap: wrap; }
input, .custom-select { flex: 1; padding: 15px; border-radius: 12px; outline: none; background: rgba(110, 58, 131, 0.01); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-top: 1px solid rgba(255, 255, 255, 0.4); color: white; font-family: 'Poppins', sans-serif; font-size: 1rem; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.3s ease; }
input:focus, .custom-select:focus { background: rgba(110, 58, 131, 0.05); border-color: rgba(255, 255, 255, 0.9); border-radius: 12px; box-shadow: none; }
input::placeholder { color: rgba(255, 255, 255, 0.41); }
@media screen and (max-width: 768px) { input, .custom-select, .glass-input, textarea, select { font-size: 16px; } }
.glass-select { flex: 1; padding: 15px; border-radius: 12px; cursor: pointer; font-size: 1rem; color: white; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); border-top: 1px solid rgba(255, 255, 255, 0.4); box-shadow: 0 4px 10px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; position: relative; min-width: 200px; user-select: none; transition: all 0.2s ease; z-index: 5000; }
.glass-select.open .glass-arrow { transform: rotate(180deg); }
.glass-options-list { display: none; position: absolute; top: 110%; left: 0; width: 100%; background: rgba(30, 41, 59, 0.288); backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 12px; padding: 5px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 1000; overflow: hidden; animation: fadeIn 0.2s ease; }
.glass-select.open .glass-options-list { display: block; }
.glass-option { padding: 12px 15px; border-radius: 8px; color: rgba(255,255,255,0.8); transition: all 0.2s; }
.glass-option:hover { background: rgba(255, 255, 255, 0.15); color: white; padding-left: 20px; }
.glass-select.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; background: rgba(0, 0, 0, 0.2); border-color: rgba(255, 255, 255, 0.1); }
#tab-grammar .glass-options-list { background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8); }
#tab-grammar .glass-option:hover { background: rgba(45, 212, 191, 0.2); color: white; }
.form-checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; color: rgba(255,255,255,0.9); font-size: 0.9rem; user-select: none; }
.form-checkbox-input { display: none; }
.form-checkbox-custom { width: 20px; height: 20px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 6px; position: relative; transition: all 0.2s ease; }
.form-checkbox-label:hover .form-checkbox-custom { border-color: white; background: rgba(255,255,255,0.2); }
.form-checkbox-input:checked + .form-checkbox-custom { background: var(--blue); border-color: var(--blue); }
.form-checkbox-input:checked + .form-checkbox-custom::after { content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.password-wrapper { position: relative; width: 100%; }
.password-wrapper input { width: 100%; padding-right: 45px; }
.password-toggle-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 0; color: rgba(255, 255, 255, 0.5); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.2s; z-index: 10; }
.password-toggle-btn:hover { color: var(--blue); }
.time-input-fix { align-self: stretch; box-sizing: border-box; height: auto; min-height: 100%; }


/* =========================================
   6. DICTIONARY & WOTD
   ========================================= */
.editorial-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f040; padding-bottom: 15px; margin-bottom: 20px; }
.label-text { font-family: 'Poppins', sans-serif; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #e2af24; }
.date-text { font-family: 'Merriweather', serif; font-size: 0.85rem; font-style: italic; color: #cbdbf1; }
.alphabet-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 30px; }
.letter-link { text-decoration: none; color: white; background: rgba(255,255,255,0.15); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-weight: 500; border: 1px solid rgba(255,255,255,0.1); transition: 0.2s; }
.letter-link:hover { background: white; color: var(--pink); transform: translateY(-5px); }
.letter-link.active {
   background: #f9f0ff;
   color: var(--pink);
   box-shadow: inset 0px 0px 10px 0px #31154bad;
  }

.word-results { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 25px; width: 100%; }
.word-tag { background: rgba(255, 255, 255, 0.2); color: white; border: 1px solid rgba(255,255,255,0.3); padding: 10px 20px; border-radius: 30px; text-decoration: none; font-weight: 500; transition: background 0.2s; cursor: pointer; display: inline-block; }
.word-tag:hover { background: rgba(255, 255, 255, 0.4); }

.def-result-container { text-align: left; background: #263349; color: #f8fafc; border-radius: 16px; padding: 30px; margin-top: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); }
.def-header { display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; margin-bottom: 25px; flex-wrap: wrap; gap: 12px; width: 100%; }
.word-title { font-size: 2.2rem; font-weight: 800; color: #ffffff; line-height: 1; margin: 0; }
.pronunciation { font-family: 'Merriweather', serif; font-style: italic; color: #94a3b8; font-size: 1rem; }
.modern-pos-badge { background: #334155; color: white; font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.audio-btn { background: none; border: none; cursor: pointer; color: #94a3b8; padding: 5px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.audio-btn:hover { color: var(--blue); transform: scale(1.1); }
.audio-btn.loading { animation: pulse 1s infinite; color: var(--pink); }
.report-btn { margin-left: auto; background: none; border: none; cursor: pointer; color: #94a3b8; display: flex; align-items: center; justify-content: center; padding: 5px; transition: 0.2s; }
.report-btn:hover { color: var(--red); transform: scale(1.1); }
.meanings-wrapper { display: flex; flex-direction: column; gap: 20px; }
.pos-group-section { position: relative; padding-left: 20px; --pos-color: var(--blue); border-left: 3px solid var(--pos-color); padding: 20px; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 5px 10px rgba(0,0,0,0.2); }
.pos-group-header { font-size: 1.1rem; font-weight: 700; color: var(--pos-color); margin: 0 0 10px 0; font-family: 'Poppins', sans-serif; text-transform: capitalize; font-style: italic; }

.pos-noun { --pos-color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.pos-pronoun { --pos-color: #f43f5e; background: rgba(244, 63, 94, 0.1); }
.pos-adj, .pos-adjective { --pos-color: #10b981; background: rgba(16, 185, 129, 0.1); }
.pos-nounadj { --pos-color: #2dd4bf; background: rgba(45, 212, 191, 0.1); }
.pos-adjadv { --pos-color: #2dd4bf; background: rgba(45, 212, 191, 0.1); }
.pos-verb { --pos-color: #818cf8; background: rgba(129, 140, 248, 0.1); }
.pos-nounverb { --pos-color: #d946ef; background: rgba(217, 70, 239, 0.1); }
.pos-adv, .pos-adverb { --pos-color: #c084fc; background: rgba(192, 132, 252, 0.1); }
.pos-prep, .pos-preposition, .pos-conj, .pos-conjunction { --pos-color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.pos-interjection, .pos-interj { --pos-color: #2dd4bf; background: rgba(45, 212, 191, 0.1); }

.pos-group-content { display: flex; flex-direction: column; gap: 0px; }
.meaning-item { background: transparent; padding: 10px 0; border-bottom: 2px dashed rgb(253, 253, 253, 0.15); }
.meaning-item:last-child { border-bottom: none; }
.def-text { font-size: 1.05rem; color: #f8fafc; line-height: 1.6; font-weight: 500; }
.modern-examples { margin: 6px 0 0 15px; padding: 0; list-style: none; }
.modern-examples li { display: grid; grid-template-columns: max-content 1fr; gap: 12px; text-align: justify; font-family: 'Merriweather', serif; font-style: italic; font-weight: 500; font-size: 0.93rem; color: #cbd5e1; margin-top: 8px; line-height: 1.6; }
.modern-examples li::before { content: "—"; font-weight: 600; color: #64748b; }

.pills-container { margin-top: 20px; border-top: 1px solid rgba(0,0,0,0.08); padding-top: 20px; display: flex; flex-direction: column; }
.pills-section-title { font-size: 1.1rem; font-weight: 800; letter-spacing: 1px; margin-bottom: 20px; text-transform: uppercase; border-bottom: 2px solid rgba(0,0,0,0.05); display: inline-block; }
.pills-row-wrapper { display: flex; flex-direction: column; margin-bottom: 20px; gap: 10px; }
.pill-pos-badge { display: inline-block; width: fit-content; padding: 5px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; font-family: 'Poppins', sans-serif; color: var(--pos-color, #64748b); }
.pos-default { color: #f6ffea; background-color: rgb(17 30 47 / 58%); }
.indent-list { margin-left: 20px; padding-left: 15px; border-left: 2px solid rgba(0,0,0,0.05); }
.border-green { border-left: 3px solid var(--green); }
.border-red { border-left: 3px solid var(--red); }
.pills-flex { display: flex; flex-wrap: wrap; gap: 8px; }

.pills-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.vocab-pill { padding: 5px 12px; border-radius: 15px; display: inline-block; margin-right: 5px; margin-bottom: 5px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.2s; border: 1px solid transparent; }
.text-green { color: var(--green); border-color: rgba(16, 185, 129, 0.3); } 
.text-red { color: var(--red); border-color: rgba(244, 63, 94, 0.3); }
.pill-green { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; } 
.pill-green:hover { background: rgba(16, 185, 129, 0.25); transform: translateY(-1px); }
.pill-red { background: rgba(244, 63, 94, 0.15); color: #fda4af; } 
.pill-red:hover { background: rgba(244, 63, 94, 0.25); transform: translateY(-1px); }
.pill-linked { box-shadow: 0 0 25px rgba(251, 191, 36, 0.15); animation: breath-gold 3s ease-in-out infinite; font-weight: 600; position: relative; }
.pill-linked:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.15); }
.link-star { margin-right: 3px; font-size: 0.8rem; }
@keyframes breath-gold { 0% { box-shadow: 0 0 5px rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.6); } 50% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); border-color: rgba(251, 191, 36, 1); } 100% { box-shadow: 0 0 5px rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.6); } }

.root-box { margin-top: 20px; background: rgba(251, 191, 36, 0.05); border: 1px dashed rgba(251, 191, 36, 0.4); border-radius: 12px; padding: 15px; display: flex; gap: 15px; align-items: center; }
.root-icon { font-size: 1.2rem; }
.root-box p { margin: 0; font-size: 0.95rem; color: #fde68a; line-height: 1.7; }
.root-box strong { color: #fbbf24; text-shadow: none; }
body.home-mode .root-box strong { color: #ff902d; font-weight: 700; text-shadow: none; }

.tabs-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 20px; flex-wrap: wrap; }
.tab-btn { background: transparent; border: none; color: rgba(255,255,255,0.6); font-size: 1.1rem; font-weight: 600; padding: 10px 20px; cursor: pointer; transition: 0.3s; font-family: 'Poppins', sans-serif; outline: none; border-radius: 30px; }
.tab-btn:hover { color: white; background: rgba(255,255,255,0.05); }
.tab-btn.active { color: white; background: rgba(255,255,255,0.15); }
.tab-content { display: none; }
.tab-content.active-content { display: block; animation: fadeIn 0.3s ease-in-out; }


/* =========================================
   7. QUIZ, EXAM & REVIEW UI
   ========================================= */
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 15px; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.card-header-right { display: flex; align-items: center; gap: 12px; }
.header-divider { width: 1px; height: 20px; background: rgba(255,255,255,0.2); margin: 0 5px; }
.badge { background: rgba(255, 255, 255, 0.1); color: white; backdrop-filter: blur(4px); border: none; padding: 5px 10px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.5px; }
.question-count { color: rgba(255, 255, 255, 0.9); font-size: 1.1rem; font-weight: 700; }

.question-text { font-family: 'Merriweather', serif; font-size: 1.1rem; margin-bottom: 1.5rem; line-height: 1.6; font-weight: 600; text-align: justify; hyphens: none; }
.question-text p { margin-bottom: 1rem; margin-top: 0; }
.question-text p:last-child { margin-bottom: 0; }

.question-instruction { font-family: 'Poppins', sans-serif; font-size: 0.95rem; color: var(--teal); font-weight: 600; font-style: italic; margin-bottom: 12px; opacity: 0.9; border-bottom: 1px solid rgba(45, 212, 191, 0.2); padding-bottom: 8px; text-align: justify; hyphens: none; }
.question-instruction p { margin: 0; }

.passage-box { margin: 20px 0; padding: 25px; background: rgba(255,255,255,0.03); border-left: 4px solid var(--blue); border-radius: 8px; font-family: 'Merriweather', serif; font-size: 1.05rem; line-height: 1.8; box-shadow: 0px 0 9px 2px rgb(242 226 255 / 23%); text-align: justify; }
.passage-box p { margin-top: 0; margin-bottom: 1.5rem; }
.passage-box p:last-child { margin-bottom: 0; }

.blank-line { display: inline-block; width: 80px; border-bottom: 2px solid var(--text-muted); transform: translateY(4px); margin: 0 4px; }
.options-grid { display: flex; flex-direction: column; gap: 12px; counter-reset: option-counter; }
.glass-option-btn { width: 100%; text-align: left; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.9); padding: 18px; border-radius: 15px; cursor: pointer; font-size: 1.05rem; transition: all 0.2s ease; margin-bottom: 12px; font-weight: 500; position: relative; padding-left: 50px; display: flex; align-items: center; }
.glass-option-btn::before { counter-increment: option-counter; content: counter(option-counter, upper-alpha) "."; position: absolute; left: 15px; font-weight: 800; font-size: 1.1rem; color: #f1fbffe5; opacity: 0.8; }
.glass-option-btn:hover::before, .glass-option-btn.selected::before { color: white; opacity: 1; }
.glass-option-btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateX(5px); border-color: rgba(255, 255, 255, 0.4); }
.glass-option-btn.correct { background-color: rgba(16, 185, 129, 0.3); border: 1px solid var(--green); color: #6ee7b7; box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
.glass-option-btn.wrong { background-color: rgba(244, 63, 94, 0.2); border: 1px solid #c05e6e; color: #fda4af; }
.glass-option-btn.selected { background: rgba(56, 189, 248, 0.2); border-color: var(--blue); color: white; box-shadow: 0 0 10px rgba(56, 189, 248, 0.3); }

.quiz-glass-card.answered .glass-option-btn { cursor: default; transform: none; }
.quiz-glass-card.answered .glass-option-btn:hover { background: rgba(255, 255, 255, 0.08); }
.quiz-glass-card.answered .glass-option-btn.correct:hover { background-color: rgba(16, 185, 129, 0.3); }

.question-card.status-correct { border: 1px solid var(--green); box-shadow: 0 0 19 px rgba(16, 185, 129, 0.4); }
.question-card.status-wrong { border: 1px solid var(--red); box-shadow: 0 0 19px rgba(244, 63, 94, 0.4); }
.question-card.status-skipped { border: 1px solid var(--amber); box-shadow: 0 0 19px rgba(245, 158, 11, 0.4); }

.status-badge { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; margin-right: 10px; }
.badge-correct { background: rgba(16, 185, 129, 0.2); color: var(--green); border: 1px solid var(--green); }
.badge-wrong { background: rgba(244, 63, 94, 0.2); color: var(--red); border: 1px solid var(--red); }
.badge-skipped { background: rgba(245, 158, 11, 0.2); color: var(--amber); border: 1px solid var(--amber); }

.timer-box { display: flex; align-items: center; gap: 8px; font-family: 'Poppins', sans-serif; font-size: 1.2rem; font-weight: 700; color: #e2e8f0; background: rgba(255, 255, 255, 0.1); padding: 8px 15px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); transition: all 0.3s ease; }
.timer-box.timer-rush { color: var(--red); border-color: var(--red); box-shadow: 0 0 15px rgba(244, 63, 94, 0.3); animation: heartbeat 1s infinite; }
@keyframes heartbeat { 0% { transform: scale(1); } 50% { transform: scale(1.08); box-shadow: 0 0 25px rgba(244, 63, 94, 0.6); } 100% { transform: scale(1); } }

.explanation-box { display: none; margin-top: 20px; padding: 20px; border-radius: 16px; background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(45, 212, 191, 0.3); border-left: 4px solid var(--teal); color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; line-height: 1.6; opacity: 0; transform: translateY(-10px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.explanation-box.reveal, .explanation-box.admin-visible { display: block; animation: revealExp 0.5s forwards; opacity: 1; }
.explanation-box.admin-visible { transform: translateY(0); border-color: rgba(251, 191, 36, 0.6); box-shadow: 0 0 15px rgba(251, 191, 36, 0.1); }
.explanation-box.admin-visible .exp-header { color: var(--gold); }
.exp-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--teal); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.exp-content { color: #cbd5e1; font-family: 'Merriweather', serif; }
.exp-content p { display: block; margin-bottom: 12px; margin-top: 0; }
.exp-content p:last-child { margin-bottom: 0; }
.exp-content ul { list-style: none; padding-left: 10px; }
.exp-content li { position: relative; padding-left: 25px; margin-bottom: 8px; }
.exp-content li::before { content: "❖"; position: absolute; left: 0; top: 0px; font-size: 1.1rem; color: var(--text-blueLight); }

/* Review Filters */
.quiz-mode .badge.filter-btn { background: #d5ecf724; color: #ebdeff; border: 1px solid white; }
.quiz-mode .badge.filter-btn:hover { background: #817b95; color: #efe5ff; border: 1px solid white; }
.quiz-mode .badge.filter-btn.active { background: #817b95; color: #efe5ff; border: 1px solid white; }
.quiz-mode .badge.badge-wrong.filter-btn { background: #d5ecf724; color: #ebdeff; border: 1px solid red; }
.quiz-mode .badge.badge-wrong.filter-btn:hover { background: #e7433d; color: #fefeff; }
.quiz-mode .badge.badge-wrong.filter-btn.active { background: #e7433d; color: #fefeff; }
.quiz-mode .badge.badge-skipped.filter-btn { background: #d5ecf724; color: #ebdeff; border: 1px solid var(--amber); }
.quiz-mode .badge.badge-skipped.filter-btn:hover { background: #ac9e36; color: #fefeff; }
.quiz-mode .badge.badge-skipped.filter-btn.active { background: #ac9e36; color: #fefeff; }

/* Exam Nav Bar specific (Desktop) */
.exam-nav-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 5%; }
.nav-left-wrapper { flex: 1; display: flex; justify-content: flex-start; }
.attempt-wrapper { flex: 0 0 auto; color: var(--blue); font-weight: 600; text-align: center; white-space: nowrap; position: absolute; left: 50%; transform: translateX(-50%); }
.exam-actions-wrapper { flex: 1; display: flex; justify-content: flex-end; gap: 12px; }
.pause-btn-custom { padding: 8px 20px; border-radius: 30px; font-weight: 600; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,0.5); background: transparent; color: white; cursor: pointer; transition: 0.2s; }
.pause-btn-custom:hover { background: rgba(255,255,255,0.1); }
@media (max-width: 900px) { .exam-nav-bar .btn-text { display: none; } .exam-nav-bar .btn-icon { display: block; } .pause-btn-custom, #btn-exam-submit, .theme-toggle-btn { padding: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; } .exam-actions-wrapper { gap: 8px; } .attempt-label { display: inline; } }
@media (max-width: 600px) { .exam-nav-bar { padding: 10px 15px; } .attempt-label { display: none; } .exam-nav-bar .timer-text { font-size: 1.1rem; } .pause-btn-custom, #btn-exam-submit, .theme-toggle-btn { width: 38px; height: 38px; } }


/* =========================================
   8. SCOREBOARDS & ANALYTICS
   ========================================= */
.score-panel { position: fixed; right: 30px; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.3); padding: 20px; border-radius: 16px; width: 180px; box-shadow: 0 0 20px rgba(56, 189, 248, 0.2), 0 10px 40px rgba(0,0,0,0.5); z-index: 100; color: white; font-size: 0.9rem; }
.score-panel-title { text-align: center; margin-bottom: 15px; color: rgba(255,255,255,0.7); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.score-row { display: flex; justify-content: space-between; margin-bottom: 12px; align-items: center; }
.score-label { opacity: 0.8; font-weight: 500; }
.score-val { font-weight: 700; font-size: 1.1rem; }
.score-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 15px 0; }
.total-score { text-align: center; font-size: 1.1rem; font-weight: 700; }
.total-score span { display: block; font-size: 1.8rem; margin-top: 5px; color: var(--blue); text-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }

.analysis-panel { border: 1px solid rgba(45, 212, 191, 0.4); box-shadow: 0 0 25px rgba(45, 212, 191, 0.15), 0 10px 40px rgba(0,0,0,0.5); background: rgba(15, 23, 42, 0.95); }
.analysis-footer { display: none; justify-content: center; gap: 20px; margin-top: 40px; padding-bottom: 40px; animation: fadeIn 0.5s ease; }
#analysis-scoreboard[style*="none"] { display: none; }

.result-glass-modal { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(30px); border: 1px solid rgba(255, 255, 255, 0.3); border-top: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 30px 80px rgba(0,0,0,0.6); border-radius: 24px; padding: 40px 30px; width: 90%; max-width: 450px; text-align: center; color: white; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
#result-title { font-size: 2.2rem; margin-bottom: 6px; line-height: 1.2; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
#result-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 30px; }

.score-circle-outer { width: 170px; height: 170px; border-radius: 50%; margin: 0 auto 30px auto; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 60px rgba(56, 189, 248, 0.4); background: var(--text-main); transition: box-shadow 0.5s ease; }
.score-circle-inner { width: 140px; height: 140px; border-radius: 50%; background: rgba(0, 0, 0, 0.2); backdrop-filter: blur(10px); display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); border: none; }
.score-stats { display: flex; justify-content: space-around; align-items: center; border-top: 1px solid rgba(255,255,255,0.2); border-bottom: 1px solid rgba(255,255,255,0.2); padding: 20px 0; margin-bottom: 15px; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.stat-val { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }
.text-skipped { color: #e2e8f0; }
.cat-bar-bg { width: 100%; background: rgba(255,255,255,0.1); border-radius: 4px; height: 8px; overflow: hidden; margin-top: 4px; }

.show-scorecard-btn { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); color: white; padding: 12px 25px; border-radius: 30px; cursor: pointer; font-weight: 600; transition: all 0.2s; text-decoration: none; display: inline-block; }
.show-scorecard-btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-3px); }

@media (max-width: 1100px) { .score-panel { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; transform: none; display: flex; justify-content: space-around; align-items: center; border-radius: 20px 20px 0 0; border: none; border-top: 1px solid rgba(255,255,255,0.2); background: rgba(15, 23, 42, 0.95); padding: 15px; z-index: 1000; } .score-panel-title { margin-bottom: 0px; } .score-panel .score-divider { display: none; } .score-panel .score-row { flex-direction: column; margin-bottom: 0; gap: 2px; } .score-panel .total-score { text-align: center; display: flex; flex-direction: column; align-items: center; font-size: 0.9rem; } .score-panel .total-score span { font-size: 1.2rem; margin-top: 0; } body.quiz-mode { padding-bottom: 140px; } }
@media (max-width: 600px) { .score-panel-title { display: none; } }


/* Analytics Specific Grids & Bars */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; margin-bottom: 10px; }
.stat-num { font-size: 2.5rem; font-weight: 800; }
.master-progress-bg { width: 100%; height: 12px; background: rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; margin-top: 15px; }
.master-progress-fill { height: 100%; background: var(--blue); transition: width 1s ease-in-out; }
.chart-toggle-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); padding: 5px 15px; border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: 0.2s; }
.chart-toggle-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.chart-toggle-btn.active { background: var(--blue); border-color: var(--blue); color: #0f172a; font-weight: 700; box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .streak-card { grid-column: 1 / -1; }
    .charts-grid { grid-template-columns: 1fr !important; }
}

/* Custom Badge for Vocab Level */
.vocab-badge {
   display: inline-block;
   padding: 8px 24px;
   background: rgba(45, 212, 191, 0.15);
   color: var(--teal);
   border: 1px solid rgba(45, 212, 191, 0.3);
   border-radius: 30px;
   font-weight: 700;
   font-size: 1rem;
   letter-spacing: 0.5px;
   box-shadow: 0 4px 15px rgba(45, 212, 191, 0.2);
   transition: transform 0.3s ease;
}
.vocab-badge:hover {
   transform: translateY(-2px);
   box-shadow: 0 6px 20px rgba(45, 212, 191, 0.3);
}

/* Charts Grid (Fixes the shrink/overflow bug) */
.charts-grid { 
   display: flex; 
   flex-wrap: wrap; 
   gap: 20px; 
}
.charts-grid > .bar-chart-container {
   flex: 2 1 500px; /* Takes up 2/3 space, collapses below 500px */
}
.charts-grid > .srs-chart-container {
   flex: 1 1 300px; /* Takes up 1/3 space, collapses below 300px */
}

/* =========================================
   9. CHECKLIST & WORDCHECK
   ========================================= */
.checklist-search-group { display: flex; align-items: center; width: 100%; max-width: 100%; margin: 0 auto; gap: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 6px; }
.checklist-search-input { flex: 1; min-width: 0; background: transparent; border: none; box-shadow: none; padding: 10px 15px; color: white; font-size: 1rem; outline: none; }
.checklist-search-btn { flex: 0 0 auto; padding: 10px 24px; background: var(--pink); color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.checklist-search-btn:hover { background: #be185d; transform: translateY(-1px); }
.checklist-search-btn.close-variant { background: rgba(244, 63, 94, 0.2); color: var(--red); padding: 0; width: 40px; height: 40px; font-size: 1.1rem; }
.checklist-search-btn.close-variant:hover { background: var(--red); color: white; }
@media (max-width: 900px) { .checklist-search-group { max-width: 100%; margin: 0; } }

.checklist-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-bottom: 50px; }
@media (max-width: 1100px) { .checklist-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .checklist-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .checklist-grid { grid-template-columns: 1fr; } }

.check-item { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); border-top: 1px solid rgba(255, 255, 255, 0.2); padding: 10px 15px; border-radius: 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all 0.2s ease; }
.check-item:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.3); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.check-item.checked-active { background: rgba(16, 185, 129, 0.2); border-color: var(--green); box-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }
.check-item.checked-active .word-text { color: #6ee7b7; font-weight: 600; text-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }

.hidden-box { display: none; }
.custom-box { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 4px; display: inline-block; position: relative; flex-shrink: 0; transition: 0.2s; }
.custom-box::after { content: ''; position: absolute; left: 4px; top: 0px; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); display: none; }
.hidden-box:checked + .custom-box { background: var(--green); border-color: var(--green); }
.hidden-box:checked + .custom-box::after { display: block; }
.word-text { font-size: 0.9rem; color: rgba(255, 255, 255, 0.9); user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pagination-container { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 20px; padding-bottom: 50px; }
.page-btn { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: white; padding: 10px 25px; border-radius: 30px; text-decoration: none; font-weight: 600; transition: all 0.2s ease; outline: none; }
.page-btn:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.page-btn.disabled { opacity: 0.4; cursor: default; pointer-events: none; border-color: transparent; }
.page-info { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; font-family: 'Merriweather', serif; font-style: italic; }

.wordcheck-score-panel { position: fixed; right: 30px; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.3); padding: 20px; border-radius: 16px; width: 180px; box-shadow: 0 0 20px rgba(56, 189, 248, 0.2); z-index: 100; color: white; text-align: center; }
@media (max-width: 1200px) { .wordcheck-score-panel { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; border-radius: 20px 20px 0 0; background: rgba(15, 23, 42, 0.98); border: none; border-top: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 -5px 20px rgba(0,0,0,0.3); padding: 10px 20px; display: flex; flex-direction: row; justify-content: space-around; align-items: center; z-index: 2000; } .wordcheck-score-panel > div:nth-child(1) { display: none; } .wordcheck-score-panel > div:nth-child(3) { display: none; } .wordcheck-score-panel > div:nth-child(2) { margin-bottom: 0; text-align: center; order: 2; } .wordcheck-score-panel > div:nth-child(4), .wordcheck-score-panel > div:nth-child(5) { display: flex; flex-direction: column-reverse; align-items: center; margin-bottom: 0; gap: 2px; font-size: 0.8rem; } .wordcheck-score-panel > div:nth-child(4) span:last-child, .wordcheck-score-panel > div:nth-child(5) span:last-child { font-size: 1.2rem; } body { padding-bottom: 120px; } }

/* WordCheck Filter Action Bar */
.checklist-action-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 25px; padding: 12px 20px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.05); }
.filter-group { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-pill { padding: 8px 16px; border-radius: 30px; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; text-decoration: none; cursor: pointer; transition: all 0.3s ease; background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.1); display: inline-flex; align-items: center; justify-content: center; }
.filter-pill:hover { background: rgba(255, 255, 255, 0.15); color: white; transform: translateY(-2px); }
.filter-pill.active { background: var(--blue); color: #0f172a; border-color: var(--blue); box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4); }
.filter-pill.pill-checked.active { background: var(--green); color: #064e3b; border-color: var(--green); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); }
.filter-pill.pill-unchecked.active { background: var(--red); color: white; border-color: var(--red); box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4); }
.bulk-toggle-btn { padding: 8px 18px; border-radius: 30px; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease; background: transparent; color: white; border: 1px dashed rgba(255, 255, 255, 0.4); display: flex; align-items: center; gap: 8px; }
.bulk-toggle-btn:hover { background: rgba(255, 255, 255, 0.1); border-style: solid; transform: translateY(-2px); }

@media (max-width: 650px) {
    .checklist-action-bar { flex-direction: column; align-items: stretch; }
    .filter-group { justify-content: center; }
    .bulk-toggle-btn { justify-content: center; width: 100%; }
}

/* =========================================
   10. PERSONAL STUDY LIST & FAVORITES
   ========================================= */
.study-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.study-card { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / 20%); border-radius: 16px; padding: 20px; position: relative; transition: all 0.2s ease; display: flex; flex-direction: column; justify-content: space-between; min-height: 140px; border-left: 5px solid #ffffffba; }
.study-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.study-card-content { margin-bottom: 15px; }
.study-word { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: white; }
.study-remark { font-family: 'Merriweather', serif; font-style: italic; font-size: 0.95rem; color: rgb(255 255 255 / 88%); line-height: 1.5; }
.study-meta { font-size: 0.75rem; color: rgb(255 255 255 / 68%); margin-top: 10px; }
.study-delete-btn { position: absolute; bottom: 15px; right: 15px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.6); width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.study-delete-btn:hover { background: rgba(240, 130, 148, 0.781); border-color: var(--red); }


/* =========================================
   11. PROFILE SETTINGS
   ========================================= */
.profile-card-large { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; width: 90%; max-width: 1100px; overflow: hidden; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.3); margin: 20px auto; }
.profile-grid { display: grid; grid-template-columns: 280px 1fr 1fr; min-height: 450px; }
.p-col { padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.p-col-left { background: rgba(0, 0, 0, 0.2); border-right: 1px solid rgba(255,255,255,0.1); align-items: center; text-align: center; }
.p-avatar-box { width: 180px; height: 180px; border-radius: 24px; border: 3px solid var(--gold); padding: 5px; background: rgba(236, 234, 108, 0.1); margin-bottom: 20px; box-shadow: 0 10px 30px rgba(180, 212, 92, 0.3); }
.p-avatar { width: 100%; height: 100%; border-radius: 18px; object-fit: cover; }
.p-role { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; color: var(--blue); letter-spacing: 2px; }
.p-col-mid { border-right: 1px solid rgba(255,255,255,0.1); }
.p-section-title { color: var(--gold); font-size: 1.3rem; font-weight: 800; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 0.5px; }
.p-row { display: flex; justify-content: space-between; margin-bottom: 18px; font-size: 0.95rem; align-items: flex-start; gap: 15px; }
.p-label { color: rgba(255, 255, 255, 0.6); font-weight: 600; white-space: nowrap; }
.p-val { color: white; font-weight: 500; text-align: right; font-family: 'Poppins', sans-serif; word-break: break-all; line-height: 1.2; }
.p-divider { height: 2px; background: rgba(255, 255, 255, 0.1); margin: 25px 0; width: 50%; }

.edit-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(13, 18, 30, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: none; align-items: center; justify-content: center; z-index: 50; opacity: 0; transition: opacity 0.3s ease; border-radius: 24px; }
.edit-overlay.open { display: flex; opacity: 1; }
.edit-content-wrapper { width: 100%; max-width: 700px; margin: auto; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.edit-label { display: block; font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; text-align: left; }
.edit-row { margin-bottom: 20px; }
.edit-grid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; width: 100%; }
.edit-col { display: flex; flex-direction: column; min-width: 0; }

.glass-input-wide { width: 100%; padding: 15px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2); color: white; font-family: 'Poppins', sans-serif; font-size: 1rem; outline: none; transition: 0.2s; color-scheme: dark; }
.glass-input-wide:focus { background: rgba(255, 255, 255, 0.15); border-color: var(--blue); box-shadow: 0 0 15px rgba(56, 189, 248, 0.2); }

.edit-buttons-row { display: flex; gap: 20px; width: 100%; margin-top: 10px; background: transparent; border: none; box-shadow: none; height: auto; }
.edit-buttons-row .btn-secondary, .edit-buttons-row .start-btn { flex: 1; width: 100%; height: 50px; font-size: 1rem; border-radius: 12px; display: flex; align-items: center; justify-content: center; transition: all 0.25s ease; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.9); box-shadow: none; background-image: none; }
.edit-buttons-row .btn-secondary:hover { background-color: rgba(244, 63, 94, 0.2); border-color: var(--red); color: white; transform: translateY(-3px); box-shadow: 0 0 20px rgba(244, 63, 94, 0.4); }
.edit-buttons-row .start-btn:hover { background-color: rgba(16, 185, 129, 0.2); border-color: var(--green); color: white; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3); }

.btn-glassy-profile { width: 100%; margin-top: auto; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.9); padding: 12px 0; border-radius: 12px; font-weight: 600; cursor: pointer; transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); text-align: center; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }
.btn-glassy-profile:hover { background-color: white; color: var(--bg-dark); border-color: white; transform: translateY(-3px) scale(1.02); box-shadow: 0 0 25px rgba(255, 255, 255, 0.6); }

@media (max-width: 1100px) { .profile-grid { grid-template-columns: 1fr; } .p-col-left, .p-col-mid { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); } .p-col { padding: 30px 20px; } .p-divider { width: 100%; } .profile-card-large { width: 95%; margin: 20px auto; } .edit-grid-row { grid-template-columns: 1fr; } .edit-content-wrapper { padding: 20px; } }
@media (max-width: 400px) { .edit-buttons-row { flex-direction: column; } }


/* =========================================
   12. PLANS & CHECKOUT
   ========================================= */
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 20px 0; }
.plan-card { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.1); border-left: 4px solid var(--plan-color); box-shadow: 0 10px 30px rgb(225 232 235 / 30%); border-radius: 20px; display: flex; overflow: hidden; position: relative; transition: all 0.3s ease; min-height: 180px; color: white; }
.plan-card:hover { transform: translateY(-10px); box-shadow: 0 10px 40px rgba(193, 213, 236, 0.534); border-color: rgba(190, 216, 255, 0.534); border-left-color: var(--plan-color); }
.plan-left { width: 30%; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.2); border-right: 1px solid rgba(255, 255, 255, 0.1); padding: 15px; }
.plan-icon-wrapper { width: 80px; height: 80px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); border: 2px solid var(--plan-color); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px var(--plan-color-glow); color: var(--plan-color); }
.plan-icon-wrapper svg { filter: drop-shadow(0 0 5px var(--plan-color)); }
.plan-right { flex: 1; padding: 20px 25px; display: flex; flex-direction: column; justify-content: space-between; }
.plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.plan-title { font-size: 1.4rem; font-weight: 800; text-transform: uppercase; color: var(--plan-color); letter-spacing: 1px; }
.plan-price { font-size: 1.5rem; font-weight: 700; color: white; }
.plan-body { flex-grow: 1; }
.plan-info-row { display: flex; margin-bottom: 8px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.9); }
.plan-label { font-weight: 700; color: rgba(255,255,255,0.6); width: 80px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.plan-val { flex: 1; font-family: 'Merriweather', serif; font-style: italic; color: rgba(255,255,255,0.85); font-size: 0.85rem; line-height: 1.4; }
.btn-buy-plan { align-self: flex-end; background: transparent; border: 1px solid var(--plan-color); color: white; padding: 8px 30px; border-radius: 30px; font-weight: 600; cursor: pointer; transition: 0.2s; text-decoration: none; display: inline-block; box-shadow: 0 0 10px var(--plan-color-glow); margin-top: 10px; }
.btn-buy-plan:hover { background: var(--plan-color); color: #0f172a; transform: scale(1.05); box-shadow: 0 0 25px var(--plan-color-glow); }

.checkout-wrapper { display: flex; gap: 30px; }
.checkout-col { flex: 1; display: flex; flex-direction: column; }
.cc-visual { background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(10px); border-radius: 16px; padding: 20px; color: white; margin-bottom: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); font-family: monospace; text-shadow: 0 2px 2px rgba(0,0,0,0.5); }
.checkout-col .input-group { width: 100%; max-width: 100%; margin: 0 0 15px 0; display: block; }
.checkout-col .glass-card { flex: 1; height: 100%; display: flex; flex-direction: column; }
.checkout-col .glass-card form { flex: 1; display: flex; flex-direction: column; }
.checkout-col input { width: 100%; margin: 0; }
.coupon-row { display: flex; gap: 10px; align-items: center; width: 100%; }
.coupon-row input { flex: 1; height: 42px; padding: 0 15px; margin: 0; }
.coupon-row button { height: 42px; padding: 0 20px; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.coupon-row button.btn-secondary { border-radius: 12px; }
.coupon-msg { height: 0; overflow: hidden; opacity: 0; margin-top: 0; font-size: 0.8rem; transition: all 0.3s ease; }
.coupon-msg.active { height: auto; margin-top: 10px; opacity: 1; min-height: 1.2em; }
.checkout-row-split { display: flex; gap: 15px; margin-bottom: 15px; width: 100%; }
.checkout-row-split input { min-width: 0; flex: 1; }

@media (max-width: 1200px) { .checkout-wrapper { flex-direction: column; } .checkout-col { width: 100%; margin-bottom: 20px; } }
@media (max-width: 1000px) { .plans-grid { grid-template-columns: 1fr; } .plan-card { min-height: auto; } }
@media (max-width: 600px) { .plan-card { flex-direction: column; } .plan-left { width: 100%; height: auto; padding: 30px 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); } .btn-buy-plan { width: 100%; text-align: center; } .checkout-col .input-group input { max-width: 100%; width: 100%; } }


/* =========================================
   13. ADMIN & MAINTAINER DASHBOARD
   ========================================= */
.role-badge { padding: 6px 12px; border-radius: 20px; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.glass-table-container { overflow: visible; min-height: auto; }
.glass-table td { padding: 15px; vertical-align: middle; border-bottom: 1px solid rgba(255,255,255,0.05); overflow: visible; position: relative; }
.glass-table thead { border-radius: 20px 20px 0 0; }
.glass-table thead th:first-child { border-top-left-radius: 20px; }
.glass-table thead th:last-child { border-top-right-radius: 20px; }
.text-center { text-align: center; }
.btn-icon-white { background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.8); border: 1px solid rgba(255, 255, 255, 0.3); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.btn-icon-white:hover { background: white; color: var(--red); border-color: white; transform: scale(1.05); box-shadow: 0 0 15px rgba(255, 255, 255, 0.2); }
.btn-icon-white.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.context-link { color: white; opacity: 0.6; margin-left: 8px; text-decoration: none; font-weight: 400; transition: 0.2s; display: inline-block; }
.context-link:hover { opacity: 1; transform: translate(2px, -2px); color: var(--blue); }

/* =========================================
   RESPONSIVE OVERRIDES
   ========================================= */

/* Screens smaller than 900px */
@media (max-width: 900px) {
   /* Brand Title Scaling */
   .brand-title { font-size: 2.2rem; }

   .brand-subtitle {
      font-size: 1rem;
   }
   .placeholder-msg {
      font-size: 1rem;
   }

   .def-result-container {
      padding: 30px 15px;
      margin-top: 20px;
  }

  .indent-list {
   margin-left: 15px;
   padding-left: 15px;
   }
   
   /* Exam Mode Constraints */
   body.quiz-mode .container { width: 95%; margin: 0 auto; padding: 15px; }
   body.quiz-mode .passage-box { padding: 10px; }
   body.quiz-mode .quiz-glass-card { padding: 1.5rem; }
}

/* Screens smaller than 600px */
@media (max-width: 600px) {
   /* Brand Title Scaling */
   .brand-title { font-size: 1.8rem; }

   .brand-subtitle {
      font-size: 0.9rem;
   }
   .placeholder-msg {
      font-size: 0.9rem;
   }

   .def-result-container {
      padding: 30px 10px;
      margin-top: 20px;
  }

  .indent-list {
   margin-left: 10px;
   padding-left: 10px;
   }
   
   /* Hide 'Back to Home' Text, Keep SVG */
   .nav-extension .back-link { font-size: 0; gap: 0; }
   .nav-extension .back-link svg { width: 24px; height: 24px; display: block; margin: 0; }
}

/* Screens smaller than 500px */
@media (max-width: 500px) {
   /* Exam Mode Constraints */
   body.quiz-mode .container { width: 100%; margin: 0 auto; padding: 10px; }
   body.quiz-mode .passage-box { padding: 10px; }
   body.quiz-mode .quiz-glass-card { padding: 1rem; }
}