/* =============================================================
   STUDENT AREA CSS — dashboard, login, courses, course_detail,
   checkout, profile, register, forgot_password, wishlist, notes, learn
   ============================================================= */

/* ── Base (shared across student pages) ── */
body { font-family: "Open Sans", sans-serif; background: #f4f5fb; }
body.login-page { background: linear-gradient(160deg, #041144 0%, #0b1023 100%); min-height: 100vh; }
.login-page-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
h1,h2,h3,h4,h5,h6 { font-family: "Playfair Display", serif; }
.topbar { background: #0b0c1e; padding: 14px 0; }
.topbar .brand { font-family: "Playfair Display", serif; color: #fff; font-size: 1rem; font-weight: 700; text-decoration: none; }
.card { border: none; border-radius: 14px; box-shadow: 0 2px 14px rgba(100,80,200,.07); }
.form-control:focus { border-color: #0b1023; box-shadow: 0 0 0 .2rem rgba(124,106,245,.2); }
.badge-level-beginner    { background: #d4edda; color: #155724; }
.badge-level-intermediate{ background: #fff3cd; color: #856404; }
.badge-level-advanced    { background: #f8d7da; color: #721c24; }

/* ── Dashboard ── */
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.course-card .progress { height: 6px; }
.stat-badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 50px; padding: 7px 16px; color: #fff; font-size: .82rem; font-family: "Open Sans", sans-serif; font-weight: 600; white-space: nowrap; transition: background .2s; }
.stat-badge:hover { background: rgba(255,255,255,.15); }
.stat-badge .badge-emoji { font-size: 1rem; line-height: 1; }
.stat-badge .badge-val { color: #f5c518; }
.referral-copy { cursor: pointer; font-size: .75rem; background: rgba(124,106,245,.35); border: none; color: #ccc; border-radius: 30px; padding: 2px 9px; transition: background .2s; }
.referral-copy:hover { background: rgba(124,106,245,.65); color: #fff; }

/* ── Student Courses listing ── */
.hero-courses { background: linear-gradient(135deg,#06061a,#0d0d35); padding: 50px 0 70px; color: #fff; }
.course-card { transition: .25s; cursor: pointer; }
.course-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(100,80,200,.15); }
.filter-btn.active { background: #0b1023; color: #fff; border-color: #0b1023; }

/* ── Student Course Detail (simple) ── */
.hero { background: linear-gradient(135deg,#06061a,#0d0d35); color: #fff; padding: 50px 0; }
.enroll-card { position: sticky; top: 80px; }
.lesson-item { padding: 12px 16px; border-bottom: 1px solid #f0f0f7; display: flex; align-items: center; gap: 12px; }
.lesson-item:last-child { border-bottom: none; }
.lesson-item .lesson-icon { width: 32px; height: 32px; border-radius: 8px; background: #e8e6f5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Login & Register (dark gradient bg) ── */
body.auth-page { background: linear-gradient(135deg,#06061a,#0d0d35); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border-radius: 20px; box-shadow: 0 24px 64px rgba(0,0,0,.35); max-width: 440px; width: 100%; overflow: hidden; }
.card-header-custom { background: linear-gradient(135deg,#06061a,#0d0d35); padding: 28px 32px 24px; text-align: center; }
.card-header-custom .logo-icon { width: 52px; height: 52px; background: linear-gradient(135deg,#f5c518,#e6a800); border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin: 0 auto 12px; }
.card-header-custom h2 { font-family: "Playfair Display", serif; color: #fff; font-size: 1.3rem; font-weight: 700; margin: 0 0 4px; }
.card-header-custom p { color: rgba(255,255,255,.55); font-size: .85rem; margin: 0; }
.card-body-custom { padding: 30px 32px 28px; }
.btn-primary-lp { background: linear-gradient(135deg,#0b1023,#5b4fd4); color: #fff; border: none; font-family: "Playfair Display", serif; font-size: .88rem; letter-spacing: .4px; padding: 12px; border-radius: 10px; transition: all .2s; }
.btn-primary-lp:hover { background: linear-gradient(135deg,#5b4fd4,#4a3fc0); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,106,245,.4); }
.step-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; }
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; transition: all .3s; border: 2px solid #e0dcf8; color: #bbb; }
.step-dot.done { background: #0b1023; border-color: #0b1023; color: #fff; }
.step-dot.active { background: #fff; border-color: #0b1023; color: #0b1023; }
.step-line { flex: 1; height: 2px; background: #e0dcf8; max-width: 50px; border-radius: 2px; }
.step-line.done { background: #0b1023; }
.otp-input { text-align: center; font-size: 2rem; font-weight: 700; letter-spacing: .5rem; height: 64px; border: 2px solid #e0dcf8; border-radius: 12px; font-family: monospace; }
.otp-input:focus { border-color: #0b1023; box-shadow: 0 0 0 .2rem rgba(124,106,245,.2); }
.email-chip { display: inline-flex; align-items: center; gap: 8px; background: #f0eeff; border: 1px solid #d4cfff; border-radius: 20px; padding: 6px 14px; font-size: .85rem; color: #5b4fd4; font-weight: 600; margin-bottom: 18px; }
.dev-notice { background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; font-size: .8rem; color: #92400e; margin-bottom: 16px; }
.dev-notice code { background: #fcd34d; color: #78350f; padding: 2px 8px; border-radius: 4px; font-size: 1rem; font-weight: 700; letter-spacing: .2rem; }

/* ── Register ── */
.btn-reg { background: linear-gradient(135deg,#0b1023,#5b4fd4); color: #fff; border: none; font-family: "Playfair Display", serif; font-size: .85rem; letter-spacing: .5px; padding: 11px; }
.btn-reg:hover { background: linear-gradient(135deg,#5b4fd4,#4a3fc0); color: #fff; }
.logo-icon { width: 48px; height: 48px; background: #f5c518; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin: 0 auto 12px; }

/* ── Forgot password OTP inputs ── */
.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-inputs input { width: 48px; height: 54px; text-align: center; font-size: 1.4rem; font-weight: 700; border: 2px solid #dee2e6; border-radius: 10px; }
.otp-inputs input:focus { border-color: #0b1023; outline: none; box-shadow: 0 0 0 .2rem rgba(124,106,245,.2); }

/* ── Checkout ── */
.checkout-hero { background: linear-gradient(135deg, #06061a, #0d0d35); padding: 48px 0 80px; }
.checkout-hero h2 { color: #fff; font-size: 1.5rem; }
.checkout-hero .subtitle { color: rgba(255,255,255,.55); font-size: .9rem; }
.order-card { background: #fff; }
.order-thumb { height: 140px; background: linear-gradient(135deg, #1a1040, #2e1f6e); border-radius: 12px 12px 0 0; display: flex; align-items: center; justify-content: center; }
.price-tag { font-size: 2rem; font-weight: 700; color: #0b1023; font-family: "Playfair Display", serif; }
.original-price { font-size: 1rem; color: #aaa; text-decoration: line-through; }
.discount-badge { background: #fef3c7; color: #92400e; font-size: .78rem; font-weight: 600; border-radius: 50px; padding: 3px 10px; }
.coupon-applied { background: #d1fae5; border: 1px solid #6ee7b7; border-radius: 8px; padding: 8px 14px; font-size: .85rem; color: #065f46; }
.coupon-error { background: #fee2e2; border: 1px solid #fca5a5; border-radius: 8px; padding: 8px 14px; font-size: .85rem; color: #991b1b; }
.btn-purple { background: #0b1023; color: #fff; border: none; border-radius: 10px; font-weight: 600; padding: 12px 28px; font-size: 1rem; transition: background .2s, transform .1s; }
.btn-purple:hover { background: #6554e0; color: #fff; transform: translateY(-1px); }
.btn-purple:active { transform: translateY(0); }
.btn-gold { background: #f59e0b; color: #fff; border: none; border-radius: 10px; font-weight: 600; padding: 12px 28px; font-size: 1rem; }
#paypal-button-container { min-height: 50px; }
.trust-item { font-size: .78rem; color: #6b7280; }
#payOverlay { display: none; position: fixed; inset: 0; background: rgba(11,12,30,.75); z-index: 9999; align-items: center; justify-content: center; flex-direction: column; gap: 16px; color: #fff; font-family: "Playfair Display", serif; font-size: 1rem; }
#payOverlay.show { display: flex; }

/* ── Wishlist ── */
.page-hero { background: linear-gradient(135deg, #06061a, #0d0d35); padding: 40px 0 68px; }
.page-hero h2 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.55); }
.course-thumb { height: 140px; background: linear-gradient(135deg, #1a1040, #2e1f6e); display: flex; align-items: center; justify-content: center; position: relative; }
.course-thumb i { font-size: 3rem; color: rgba(255,255,255,.2); }
.btn-wishlist-remove { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; background: rgba(239,68,68,.85); border: none; border-radius: 50%; color: #fff; font-size: .8rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, transform .15s; }
.btn-wishlist-remove:hover { background: #dc2626; transform: scale(1.1); }
.btn-wishlist-remove.loading { background: #9ca3af; pointer-events: none; }
.price-pill { display: inline-block; font-weight: 700; font-size: .95rem; color: #0b1023; }
.price-free { color: #10b981; }
.btn-outline-purple { background: transparent; border: 1.5px solid #0b1023; color: #0b1023; border-radius: 8px; font-size: .82rem; font-weight: 600; transition: all .2s; }
.btn-outline-purple:hover { background: #0b1023; color: #fff; }
.lp-toast { position: fixed; bottom: 24px; right: 24px; z-index: 9999; background: #1e1b4b; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: .85rem; box-shadow: 0 4px 16px rgba(0,0,0,.3); opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; pointer-events: none; }
.lp-toast.show { opacity: 1; transform: translateY(0); }

/* ── Notes ── */
.note-card { background: #fff; border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; border-left: 4px solid #0b1023; transition: box-shadow .2s; }
.note-card:hover { box-shadow: 0 4px 20px rgba(124,106,245,.15); }
.course-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #0b1023; background: rgba(124,106,245,.1); border-radius: 50px; padding: 2px 10px; display: inline-block; margin-bottom: 6px; }
.lesson-label { font-size: .82rem; font-weight: 600; color: #1e1b4b; }
.note-timestamp { font-size: .74rem; color: #9ca3af; }
.note-body { font-size: .9rem; color: #374151; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.btn-delete { background: none; border: 1px solid #fca5a5; color: #ef4444; border-radius: 8px; padding: 3px 10px; font-size: .78rem; transition: background .15s; }
.btn-delete:hover { background: #fee2e2; }
.btn-goto { background: rgba(124,106,245,.1); color: #0b1023; border: none; border-radius: 8px; padding: 4px 12px; font-size: .8rem; font-weight: 600; text-decoration: none; transition: background .15s; }
.btn-goto:hover { background: rgba(124,106,245,.2); color: #5b4dd4; }
.course-group-title { font-family: "Playfair Display", serif; font-size: .92rem; color: #0b0c1e; margin-bottom: 10px; margin-top: 28px; border-bottom: 1px solid #e5e7eb; padding-bottom: 8px; }
@media print {
    .topbar, .page-hero, .no-print, .btn-delete, .btn-goto, #downloadBtn { display: none !important; }
    body { background: #fff !important; font-family: serif; }
    .note-card { border: 1px solid #ddd !important; box-shadow: none !important; break-inside: avoid; }
    .container { max-width: 100% !important; }
    .course-group-title { page-break-before: auto; }
    .print-header { display: block !important; margin-bottom: 24px; }
}
.print-header { display: none; }

/* ── Learn (full-screen player) ── */
*, *::before, *::after { box-sizing: border-box; }
.learn-layout { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.learn-topbar { background: #06061a; border-bottom: 1px solid rgba(124,106,245,.25); padding: 0 20px; height: 52px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; z-index: 100; }
.learn-topbar .brand { font-family: "Playfair Display", serif; color: #fff; font-size: .88rem; font-weight: 700; white-space: nowrap; }
.learn-topbar .brand-icon { color: #f5c518; }
.learn-topbar .sep { color: rgba(255,255,255,.25); font-size: .7rem; }
.learn-topbar .course-title { color: rgba(255,255,255,.55); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-btn { background: rgba(124,106,245,.15); border: 1px solid rgba(124,106,245,.35); color: #c4b5fd; border-radius: 7px; padding: 5px 12px; font-size: .75rem; font-family: "Open Sans", sans-serif; cursor: pointer; transition: background .2s; white-space: nowrap; }
.topbar-btn:hover { background: rgba(124,106,245,.3); color: #fff; }
.learn-body { display: flex; flex: 1; overflow: hidden; }
.learn-sidebar { width: 270px; background: #0b0c1e; border-right: 1px solid rgba(124,106,245,.18); display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden; }
.sidebar-header { padding: 14px 16px; border-bottom: 1px solid rgba(124,106,245,.18); flex-shrink: 0; }
.sidebar-header .course-name { font-family: "Playfair Display", serif; font-size: .78rem; color: #c4b5fd; margin-bottom: 8px; line-height: 1.4; }
.progress-bar-wrap { height: 5px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #0b1023, #a78bfa); border-radius: 3px; transition: width .5s; }
.progress-pct { font-size: .7rem; color: rgba(255,255,255,.45); margin-top: 5px; }
.chapter-section { padding: 10px 16px 6px; border-bottom: 1px solid rgba(124,106,245,.12); flex-shrink: 0; }
.chapter-label { font-size: .65rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.3); margin-bottom: 6px; }
.chapter-marker { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; transition: background .15s; font-size: .76rem; }
.chapter-marker:hover { background: rgba(124,106,245,.2); }
.chapter-time-badge { background: rgba(124,106,245,.25); color: #a78bfa; border-radius: 4px; padding: 1px 6px; font-size: .67rem; font-family: monospace; white-space: nowrap; flex-shrink: 0; }
.chapter-name { color: #dde0f0; line-height: 1.3; }
.lesson-list { overflow-y: auto; flex: 1; }
.lesson-item { padding: 10px 14px; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.04); transition: background .15s; }
.lesson-item:hover { background: rgba(124,106,245,.12); }
.lesson-item.active { background: rgba(124,106,245,.2); border-left: 3px solid #0b1023; }
.lesson-item.done .lesson-num { background: #10b981; color: #fff; }
.lesson-num { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 700; flex-shrink: 0; margin-top: 1px; color: #c4b5fd; }
.lesson-title-text { font-size: .78rem; color: #dde0f0; line-height: 1.35; }
.lesson-duration { font-size: .67rem; color: rgba(255,255,255,.35); margin-top: 2px; }
.learn-main { flex: 1; overflow-y: auto; background: #0e0f25; }
.main-inner { max-width: 900px; margin: 0 auto; padding: 24px 28px 60px; }
.lesson-meta-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.badge-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.badge-done { background: rgba(16,185,129,.2); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.badge-num { background: rgba(255,255,255,.07); color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.1); }
.badge-done-banner { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #34d399; border-radius: 8px; padding: 10px 16px; font-size: .82rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.lesson-heading { font-size: 1.35rem; color: #f0eeff; margin-bottom: 18px; line-height: 1.4; }
.video-outer { background: #000; border-radius: 14px; overflow: hidden; margin-bottom: 0; box-shadow: 0 8px 40px rgba(0,0,0,.6); position: relative; }
.video-outer.yt-wrap { padding-bottom: 56.25%; height: 0; }
.video-outer.yt-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-outer.local-wrap video { width: 100%; display: block; max-height: 70vh; background: #000; user-select: none; -webkit-user-select: none; pointer-events: auto; }
.video-controls-bar { background: #06061a; border: 1px solid rgba(124,106,245,.2); border-top: none; border-radius: 0 0 14px 14px; padding: 8px 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.controls-group { display: flex; align-items: center; gap: 5px; }
.controls-label { font-size: .68rem; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: .7px; margin-right: 2px; }
.speed-btn { background: rgba(124,106,245,.1); border: 1px solid rgba(124,106,245,.25); color: #a78bfa; border-radius: 5px; padding: 3px 9px; font-size: .72rem; cursor: pointer; transition: background .15s, color .15s; font-family: "Open Sans", sans-serif; }
.speed-btn:hover { background: rgba(124,106,245,.3); color: #fff; }
.speed-btn.active { background: #0b1023; color: #fff; border-color: #0b1023; }
.ctrl-btn { background: rgba(124,106,245,.1); border: 1px solid rgba(124,106,245,.25); color: #a78bfa; border-radius: 5px; padding: 4px 11px; font-size: .75rem; cursor: pointer; transition: background .15s; font-family: "Open Sans", sans-serif; display: flex; align-items: center; gap: 5px; }
.ctrl-btn:hover { background: rgba(124,106,245,.3); color: #fff; }
.ctrl-btn.active { background: #0b1023; color: #fff; border-color: #0b1023; }
.controls-divider { width: 1px; height: 20px; background: rgba(255,255,255,.1); margin: 0 4px; }
.autoplay-toggle { display: flex; align-items: center; gap: 7px; font-size: .75rem; color: rgba(255,255,255,.5); }
.toggle-switch { position: relative; width: 34px; height: 18px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: rgba(255,255,255,.15); border-radius: 9px; cursor: pointer; transition: background .25s; }
.toggle-slider::before { content: ''; position: absolute; width: 12px; height: 12px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .25s; }
.toggle-switch input:checked + .toggle-slider { background: #0b1023; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }
.content-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 20px 24px; font-size: .88rem; line-height: 1.85; color: #b8bcd8; margin-bottom: 20px; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.btn-complete { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: none; border-radius: 8px; padding: 9px 20px; font-family: "Playfair Display", serif; font-size: .8rem; cursor: pointer; transition: opacity .2s; display: flex; align-items: center; gap: 7px; }
.btn-complete:hover { opacity: .88; }
.btn-nav { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #c4b5fd; border-radius: 8px; padding: 9px 18px; font-size: .8rem; font-family: "Open Sans", sans-serif; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; transition: background .15s; }
.btn-nav:hover { background: rgba(124,106,245,.2); color: #fff; }
.btn-notes-toggle { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); color: #fbbf24; border-radius: 8px; padding: 9px 18px; font-size: .8rem; font-family: "Open Sans", sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; margin-left: auto; transition: background .15s; }
.btn-notes-toggle:hover { background: rgba(245,158,11,.25); }
.section-heading { font-family: "Playfair Display", serif; font-size: 1rem; color: #c4b5fd; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(124,106,245,.2); display: flex; align-items: center; gap: 8px; }
.qa-form-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.qa-textarea { width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(124,106,245,.25); border-radius: 8px; color: #dde0f0; padding: 10px 14px; font-family: "Open Sans", sans-serif; font-size: .84rem; resize: vertical; min-height: 80px; transition: border-color .2s; outline: none; }
.qa-textarea:focus { border-color: #0b1023; }
.qa-textarea::placeholder { color: rgba(255,255,255,.25); }
.btn-submit { background: linear-gradient(135deg, #0b1023, #6d5fe0); color: #fff; border: none; border-radius: 7px; padding: 8px 20px; font-size: .8rem; font-family: "Playfair Display", serif; cursor: pointer; margin-top: 10px; transition: opacity .2s; }
.btn-submit:hover { opacity: .88; }
.qa-item { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.qa-meta { font-size: .7rem; color: rgba(255,255,255,.35); margin-bottom: 6px; }
.qa-question { font-size: .84rem; color: #c4b5fd; line-height: 1.5; }
.qa-answer { margin-top: 10px; padding: 10px 14px; background: rgba(16,185,129,.07); border-left: 3px solid #10b981; border-radius: 0 7px 7px 0; font-size: .82rem; color: #a7f3d0; line-height: 1.55; }
.qa-answer-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .7px; color: #34d399; margin-bottom: 4px; }
.qa-empty { color: rgba(255,255,255,.3); font-size: .82rem; padding: 12px 0; }
.notes-panel { position: fixed; top: 52px; right: 0; width: 320px; height: calc(100vh - 52px); background: #09091f; border-left: 1px solid rgba(245,158,11,.25); display: flex; flex-direction: column; z-index: 200; transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: -8px 0 32px rgba(0,0,0,.5); }
.notes-panel.open { transform: translateX(0); }
.notes-panel-header { padding: 14px 16px; border-bottom: 1px solid rgba(245,158,11,.2); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.notes-panel-title { font-family: "Playfair Display", serif; font-size: .85rem; color: #fbbf24; }
.notes-close { background: none; border: none; color: rgba(255,255,255,.4); font-size: 1rem; cursor: pointer; padding: 2px 6px; line-height: 1; }
.notes-close:hover { color: #fff; }
.timestamp-display { padding: 10px 16px; background: rgba(245,158,11,.08); border-bottom: 1px solid rgba(245,158,11,.15); font-size: .75rem; color: rgba(255,255,255,.45); display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.timestamp-display .ts-value { font-family: monospace; color: #fbbf24; font-size: .85rem; }
.notes-form { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.notes-input { width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(245,158,11,.25); border-radius: 7px; color: #dde0f0; padding: 9px 12px; font-family: "Open Sans", sans-serif; font-size: .8rem; resize: none; min-height: 70px; outline: none; transition: border-color .2s; }
.notes-input:focus { border-color: #f59e0b; }
.notes-input::placeholder { color: rgba(255,255,255,.2); }
.btn-save-note { background: linear-gradient(135deg, #f59e0b, #d97706); color: #06061a; border: none; border-radius: 6px; padding: 7px 18px; font-size: .76rem; font-family: "Playfair Display", serif; font-weight: 700; cursor: pointer; margin-top: 8px; width: 100%; transition: opacity .2s; }
.btn-save-note:hover { opacity: .88; }
.notes-list { overflow-y: auto; flex: 1; padding: 10px 16px; }
.note-item { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.note-ts { font-family: monospace; font-size: .67rem; color: #f59e0b; margin-bottom: 5px; cursor: pointer; }
.note-ts:hover { text-decoration: underline; }
.note-text { font-size: .79rem; color: #c4b5fd; line-height: 1.5; }
.note-actions { display: flex; gap: 5px; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.06); justify-content: flex-end; }
.note-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    color: #c4b5fd;
    font-size: .62rem;
    font-weight: 500;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all .15s ease;
    height: 22px;
    min-width: 22px;
}
.note-action-btn i { font-size: .62rem; }
.note-action-btn span { display: inline; }
.note-action-btn:hover { background: rgba(124,106,245,.2); border-color: rgba(124,106,245,.5); color: #fff; }
.note-action-btn.note-action-danger { color: #fca5a5; }
.note-action-btn.note-action-danger:hover { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.55); color: #fff; }
.btn-cancel-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.15);
    color: #c4b5fd;
    font-size: .72rem;
    padding: 6px 10px;
    border-radius: 6px;
    margin-left: 6px;
    cursor: pointer;
}
.btn-cancel-edit:hover { background: rgba(255,255,255,.06); color: #fff; }
.notes-empty { color: rgba(255,255,255,.25); font-size: .79rem; text-align: center; padding: 20px 0; }
#lp-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(10,10,30,.95); border: 1px solid rgba(124,106,245,.4); color: #c4b5fd; padding: 10px 22px; border-radius: 30px; font-size: .8rem; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; z-index: 9999; white-space: nowrap; }
#lp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.done-banner { background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(5,150,105,.1)); border: 1px solid rgba(16,185,129,.35); border-radius: 12px; padding: 14px 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; color: #34d399; font-size: .88rem; }
.done-banner .done-icon { font-size: 1.4rem; }
.done-banner a { color: #6ee7b7; text-decoration: underline; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #13142d; }
::-webkit-scrollbar-thumb { background: #0b1023; border-radius: 4px; }
/* ── Sidebar backdrop (mobile only) ─────────────────────────────────── */
#sidebarBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 499;
}
#sidebarBackdrop.show { display: block; }

/* ── Controls bar flush against local video ─────────────────────────── */
.video-outer.local-wrap { border-radius: 14px 14px 0 0; }

@media (max-width: 768px) {
    .learn-sidebar { display: none; }
    .learn-sidebar.mobile-open { display: flex; position: fixed; top: 0; left: 0; height: 100vh; z-index: 500; width: 280px; box-shadow: 4px 0 20px rgba(0,0,0,.5); }
    .main-inner { padding: 16px 14px 60px; }
    .notes-panel { width: 100%; }

    /* Toast — wrap long messages instead of bleeding off-screen */
    #lp-toast { max-width: 90vw; white-space: normal; text-align: center; }

    /* Server switcher — bigger tap targets */
    .server-btn { padding: 10px 14px; font-size: .85rem; }
    .server-switcher { gap: 6px; }

    /* Speed / control buttons — bigger tap targets */
    .speed-btn  { padding: 7px 10px; font-size: .76rem; }
    .ctrl-btn   { padding: 7px 10px; }

    /* Controls bar — make it scrollable so it never wraps into a mess */
    .video-controls-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; }
    .controls-divider   { flex-shrink: 0; }
}

/* ── Server Switcher ─────────────────────────────────────────────────── */
.server-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.server-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(124,106,245,.25);
    color: rgba(255,255,255,.65);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
    font-family: inherit;
}
.server-btn i { font-size: .75rem; opacity: .7; }
.server-btn:hover {
    background: rgba(124,106,245,.15);
    border-color: rgba(124,106,245,.5);
    color: #fff;
}
.server-btn.active {
    background: linear-gradient(135deg, #7c6af5, #6c63ff);
    border-color: #7c6af5;
    color: #fff;
    box-shadow: 0 2px 10px rgba(124,106,245,.35);
}
.server-btn.active i { opacity: 1; }
.srv-badge {
    background: rgba(0,0,0,.25);
    color: rgba(255,255,255,.75);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .3px;
}
.server-btn.active .srv-badge {
    background: rgba(0,0,0,.3);
    color: rgba(255,255,255,.9);
}
