/**
 * main.css — Maths Manthra Recorded Classes Platform
 * Color Theme: Primary #1E40AF, Accent #F59E0B, BG #F8FAFC, Text #0F172A
 */

/* ═══════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES (Design Tokens)
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --primary: #1E40AF;
  --primary-dark: #1E3A8A;
  --primary-light: #3B82F6;
  --primary-lighter: #DBEAFE;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --accent-light: #FDE68A;
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-dark: #0F172A;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
  --shadow: 0 4px 12px rgba(15,23,42,0.08);
  --shadow-lg: 0 8px 30px rgba(15,23,42,0.12);
  --shadow-xl: 0 20px 60px rgba(15,23,42,0.15);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.toast-container-custom {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--success);
  animation: toastSlideIn 0.35s ease-out, toastFadeOut 0.4s 4s ease-in forwards;
  max-width: 380px;
  font-size: 0.9rem;
}

.toast-item.error {
  border-left-color: var(--danger);
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
  from { opacity: 1; }
  to { opacity: 0; pointer-events: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.login-page {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.5s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  font-size: 3rem;
  margin-bottom: 8px;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.login-form .form-label {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-icon-group {
  position: relative;
}

.input-icon-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.input-icon-group .form-control {
  padding-left: 42px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  padding: 12px 14px 12px 42px;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-icon-group .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.35);
}

.alert-custom {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-custom.success {
  background: rgba(16, 185, 129, 0.1);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-custom.error {
  background: rgba(239, 68, 68, 0.1);
  color: #991B1B;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PASSWORD GATE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.password-gate-page {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.password-gate-container {
  width: 100%;
  max-width: 440px;
}

.password-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.5s ease-out;
}

.password-card-header {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.course-thumbnail-gate {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.password-card-body {
  padding: 32px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-lighter);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.course-title-gate {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.course-desc-gate {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.password-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.password-error {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.password-input-group {
  margin-bottom: 16px;
}

.password-input-field {
  width: 100%;
  padding: 16px;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.password-input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.password-input-field::placeholder {
  letter-spacing: 12px;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.btn-enter-course {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-enter-course:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.35);
}

.password-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COURSE VIDEOS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.course-page {
  background: var(--bg);
  min-height: 100vh;
}

body.has-bottom-nav {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
}

/* App Top Header */
.app-top-header {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

.app-brand-icon {
  font-size: 1.25rem;
}

.app-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-lighter);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.course-banner {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.course-banner-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: blur(3px);
}

.course-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.85) 100%);
  display: flex;
  align-items: flex-end;
}

.course-banner-content {
  padding-bottom: 28px;
  color: white;
}

.brand-badge-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.course-title-banner {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.course-desc-banner {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin: 0 0 12px 0;
  max-width: 600px;
  line-height: 1.5;
}

.course-meta-banner {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.course-meta-banner i {
  margin-right: 4px;
}

/* Learning Progress Card */
.app-progress-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.progress-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.progress-card-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.progress-percent-badge {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-lighter);
  padding: 4px 10px;
  border-radius: 20px;
}

.app-progress-track {
  width: 100%;
  height: 10px;
  background: #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.app-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-app-resume {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 30px;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-app-resume:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
}

.progress-subtext {
  font-size: 0.85rem;
}

/* Video List Section */
.video-list-section {
  padding: 12px 0 40px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i {
  color: var(--primary);
}

.lessons-count-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 4px 10px;
  border-radius: 16px;
}

.video-list-student {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Day-wise Lesson Card */
.lesson-app-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.lesson-app-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-lighter);
  box-shadow: var(--shadow);
  color: inherit;
}

.lesson-app-card:active {
  transform: scale(0.985);
}

.lesson-app-card.is-completed {
  border-left: 4px solid var(--success);
}

.lesson-card-thumb-wrap {
  position: relative;
  width: 130px;
  min-width: 130px;
  height: 78px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.lesson-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.lesson-day-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity var(--transition);
}

.lesson-app-card:hover .play-overlay {
  opacity: 1;
}

.play-overlay i {
  font-size: 1.8rem;
  color: white;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.lesson-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lesson-header-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lesson-day-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-lighter);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.lesson-pdf-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: #DC2626;
  background: #FEE2E2;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lesson-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 4px 0 2px;
  color: var(--text);
  line-height: 1.35;
}

.lesson-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-status-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.lesson-status-pill.completed {
  color: var(--success);
  font-weight: 600;
}

.lesson-watch-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.empty-state-student {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-secondary);
}

.empty-state-student i {
  font-size: 2.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO PLAYER PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO PLAYER PAGE — MOBILE-FIRST LEARNING APP
   ═══════════════════════════════════════════════════════════════════════════ */
.player-page {
  background: var(--bg-dark);
  min-height: 100vh;
}

/* App Player Top Navigation */
.app-player-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.player-nav-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--transition);
  text-decoration: none;
}

.player-nav-back:hover {
  color: white;
}

.badge-lesson-counter {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-progress-bar-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.player-progress-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* Player Container & Large Video Embed */
.player-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

/* Student Page Copy Protection */
body.player-page,
body.player-page *,
body.course-page,
body.course-page * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

.player-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Transparent top blocker to intercept clicking YouTube title / Watch on YouTube / Share */
.player-top-shield {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 5;
  background: transparent;
  pointer-events: auto;
  cursor: default;
}

/* Permanent Watermark — Bottom Left Corner */
.player-watermark {
  position: absolute;
  bottom: 48px;
  left: 18px;
  z-index: 6;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.player-watermark .watermark-icon {
  color: var(--accent);
  font-size: 0.95rem;
}

.player-watermark .watermark-text {
  font-weight: 700;
}

.player-info-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 0 40px;
}

/* Anti-sharing Security Warning */
.anti-sharing-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-left: 4px solid #EF4444;
  color: #FCA5A5;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.5;
}

.anti-sharing-warning i {
  font-size: 1.25rem;
  color: #EF4444;
  flex-shrink: 0;
}

.player-day-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-dark);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-lesson-pill {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Interactive Mark as Completed Button */
.btn-complete-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: white;
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-complete-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.btn-complete-toggle.completed {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34D399;
}

.player-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: white;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.player-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

/* PDF Notes Section */
.app-notes-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.app-notes-card.no-notes {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
}

.notes-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.notes-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 2px;
}

.notes-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
}

.notes-subtext {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

.btn-note-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-note-view:hover {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.btn-note-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--primary);
  border: 1px solid var(--primary-light);
  color: white;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-note-download:hover {
  background: var(--primary-dark);
  color: white;
}

/* Navigation Buttons */
.player-navigation {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
}

.nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: white;
  text-decoration: none;
  transition: all var(--transition);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: white;
}

.nav-btn i {
  font-size: 1.2rem;
  color: var(--accent);
}

.nav-btn-text {
  min-width: 0;
}

.nav-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 2px;
}

.nav-title {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.next-btn {
  text-align: right;
  justify-content: flex-end;
}

.nav-btn-spacer {
  flex: 1;
}

.back-to-course {
  text-align: center;
}

.back-to-course a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition);
}

.back-to-course a:hover {
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIXED BOTTOM NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
}

.app-bottom-nav.app-bottom-nav-dark {
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  transition: color var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.app-bottom-nav-dark .bottom-nav-item {
  color: rgba(255, 255, 255, 0.5);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 600;
}

.app-bottom-nav-dark .bottom-nav-item:hover,
.app-bottom-nav-dark .bottom-nav-item.active {
  color: var(--accent);
  font-weight: 600;
}

.bottom-nav-icon {
  font-size: 1.25rem;
  margin-bottom: 2px;
  line-height: 1;
}

.bottom-nav-label {
  line-height: 1;
}

.bottom-nav-item.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COURSE FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.course-footer {
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-light);
}

.player-page .course-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ERROR PAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.error-container {
  text-align: center;
  max-width: 400px;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  color: var(--primary-lighter);
  line-height: 1;
  margin-bottom: 8px;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
}

.error-message {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.btn-error-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-error-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES & ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .course-banner {
    height: 220px;
  }

  .course-title-banner {
    font-size: 1.3rem;
  }

  /* Large Edge-to-Edge Player on Mobile */
  .player-container {
    max-width: 100%;
    width: 100%;
    padding: 0 !important;
  }

  .player-wrapper {
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .player-info-section {
    padding: 16px 4px 32px;
  }

  .player-title {
    font-size: 1.25rem;
  }

  .player-navigation {
    flex-direction: column;
    gap: 10px;
  }

  .next-btn {
    text-align: left;
    justify-content: flex-start;
  }

  /* Lesson App Cards */
  .lesson-card-thumb-wrap {
    width: 110px;
    min-width: 110px;
    height: 68px;
  }

  .lesson-app-card {
    padding: 10px 12px;
    gap: 12px;
  }

  /* PDF Notes Actions on Mobile */
  .app-notes-card {
    padding: 16px;
  }

  .notes-actions {
    flex-direction: column;
  }

  .btn-note-view,
  .btn-note-download {
    width: 100%;
    justify-content: center;
  }

  .password-card-header {
    height: 160px;
  }

  .password-card-body {
    padding: 24px;
  }

  .password-input-field {
    font-size: 1.4rem;
    letter-spacing: 12px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .course-banner {
    height: 190px;
  }

  .course-banner-content {
    padding-bottom: 20px;
  }

  .course-title-banner {
    font-size: 1.15rem;
  }

  .course-desc-banner {
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .app-progress-card {
    padding: 14px 16px;
  }

  .lesson-app-card {
    padding: 10px;
    gap: 10px;
    border-radius: 14px;
  }

  .lesson-card-thumb-wrap {
    width: 96px;
    min-width: 96px;
    height: 60px;
  }

  .lesson-day-badge {
    display: none;
  }

  .lesson-card-title {
    font-size: 0.88rem;
  }

  .lesson-card-desc {
    display: none;
  }

  .player-title {
    font-size: 1.15rem;
  }

  .login-card {
    padding: 28px 24px;
  }

  .password-input-field {
    font-size: 1.2rem;
    letter-spacing: 10px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CERTIFICATE SECTION & CARD STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
.app-certificate-card {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #EFF6FF 100%);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid #BFDBFE;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.08);
  position: relative;
  overflow: hidden;
}

.app-certificate-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.certificate-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.certificate-card-content {
  flex: 1;
  min-width: 240px;
}

.certificate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(191, 219, 254, 0.7);
}

.certificate-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.certificate-card-subtext {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.btn-get-certificate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, #2563EB 100%);
  color: #FFFFFF !important;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-get-certificate:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
  color: #FFFFFF !important;
}

.btn-get-certificate:active {
  transform: translateY(0);
}

@media (max-width: 767.98px) {
  .certificate-card-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .btn-get-certificate {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.95rem;
  }
}

/* Certificate Preview Display */
.certificate-frame {
  background: #FFFFFF;
  border: 8px solid #1E40AF;
  outline: 2px solid #F59E0B;
  outline-offset: -5px;
  border-radius: 12px;
  padding: 40px 30px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  position: relative;
  text-align: center;
}

.certificate-frame-seal {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
  margin-bottom: 16px;
}

@media print {
  body * {
    visibility: hidden;
  }
  .certificate-frame, .certificate-frame * {
    visibility: visible;
  }
  .certificate-frame {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    box-shadow: none;
  }
  .no-print {
    display: none !important;
  }
}

