/* ==================== STUDY FARM — DARK FOREST THEME ==================== */

:root {
  --bg-canvas: #060d09;
  --bg-elevated: #0b1610;
  --bg-card: #0e1d15;
  --bg-card-hover: #13281d;
  --bg-glass: rgba(11, 22, 16, 0.86);
  --bg-input: #0a150f;
  --border-subtle: rgba(52, 211, 153, 0.14);
  --border-strong: rgba(52, 211, 153, 0.32);
  --text-main: #ecfdf5;
  --text-soft: #a7cbb9;
  --text-muted: #6c9380;
  --accent: #10b981;
  --accent-bright: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-soft: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.42);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="light"] {
  --bg-canvas: #f2f8f4;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #eef7f1;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --bg-input: #f7fbf8;
  --border-subtle: rgba(16, 94, 62, 0.13);
  --border-strong: rgba(16, 185, 129, 0.38);
  --text-main: #0c2218;
  --text-soft: #315342;
  --text-muted: #5a7d6c;
  --accent: #059669;
  --accent-bright: #10b981;
  --accent-glow: rgba(5, 150, 105, 0.18);
  --accent-soft: rgba(16, 185, 129, 0.12);
  --shadow-card: 0 10px 26px rgba(10, 42, 26, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(16, 185, 129, 0.13), transparent 70%),
    radial-gradient(ellipse 50% 35% at 95% 15%, rgba(6, 95, 70, 0.16), transparent 65%);
  background-attachment: fixed;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(16, 185, 129, 0.09), transparent 70%);
}

a {
  color: inherit;
}

button,
input,
select {
  font-family: inherit;
}

/* ==================== HEADER & BREADCRUMBS ==================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.78rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #065f46, #10b981);
  color: #ecfdf5;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px var(--accent-glow);
  border: 1px solid rgba(110, 231, 183, 0.35);
}

.brand-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

.brand-badge {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--accent-bright);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.breadcrumbs-bar {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumbs-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.crumb {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  transition: color 0.15s;
}

.crumb:hover {
  color: var(--accent-bright);
}

.crumb.active {
  color: var(--accent-bright);
  font-weight: 700;
}

/* ==================== MAIN CONTAINER & HERO FILTER ==================== */

.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.35rem 1.25rem 3rem;
}

.filter-section {
  margin-bottom: 1.5rem;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 78, 59, 0.26));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
}

.hero-copy {
  max-width: 640px;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}

.hero-heading {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.hero-sub {
  font-size: 0.87rem;
  color: var(--text-soft);
}

.batch-view-tabs {
  display: inline-flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.batch-view-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background 0.18s, color 0.18s;
}

.batch-view-tab.active {
  background: var(--accent);
  color: #03150d;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.batch-tab-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
}

[data-theme="light"] .batch-view-tab:not(.active) .batch-tab-count {
  background: rgba(16, 94, 62, 0.1);
}

.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.search-input-wrapper {
  position: relative;
  flex: 1 1 320px;
  max-width: 560px;
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 0.78rem 2.5rem 0.78rem 2.65rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#searchInput::placeholder {
  color: var(--text-muted);
}

#searchInput:focus {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.clear-btn {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--accent-soft);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
}

.batch-stats {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==================== PAGE HEADERS, CARDS & LISTS ==================== */

.page-header {
  margin-bottom: 1.25rem;
}

.page-title {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-main);
}

.page-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.card-thumb-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #07120c;
  overflow: hidden;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  background: linear-gradient(135deg, #071910, #123625);
}

.card-enrolled-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(6, 78, 59, 0.92);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.45);
  backdrop-filter: blur(6px);
}

.card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}

.card-title-link {
  text-decoration: none;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .badge {
  background: rgba(16, 94, 62, 0.07);
}

.badge-primary {
  background: var(--accent-soft);
  color: var(--accent-bright);
  border-color: var(--border-strong);
}

.card-footer-actions {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.batch-meta-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.batch-price-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}

.batch-price-free {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--accent-bright);
}

.batch-price-strike {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.batch-free-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
}

.batch-btn-study,
.batch-btn-enroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.58rem 0.75rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.18s, border-color 0.18s;
}

.batch-btn-study {
  background: var(--accent);
  color: #03150d;
  border: 1px solid transparent;
}

.batch-btn-study:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.batch-btn-enroll {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
}

.batch-btn-enroll:hover {
  background: var(--accent-soft);
}

.batch-btn-enroll.is-enrolled {
  background: var(--accent-soft);
  color: var(--accent-bright);
  border-color: var(--accent);
}

/* ==================== BUTTONS & LIST ROWS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary,
.btn-emerald {
  background: var(--accent);
  color: #03150d;
}

.btn-primary:hover:not(:disabled),
.btn-emerald:hover:not(:disabled) {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.item-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.88rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
}

.item-row:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.item-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.item-video-thumb {
  width: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  overflow: hidden;
  background: #07120c;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.item-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-details {
  min-width: 0;
  flex: 1;
}

.item-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-top: 0.22rem;
}

.item-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ==================== RESOURCE TABS & NOTES GRID ==================== */

.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.52rem 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.tab-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--accent);
  color: #03150d;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: border-color 0.18s, transform 0.15s;
}

.note-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.note-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-date {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.note-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
}

.note-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.note-action-btn:hover {
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  background: var(--accent-soft);
}

.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
}

.btn-load-more {
  padding: 0.65rem 1.4rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--accent-bright);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}

.btn-load-more:hover:not(:disabled) {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ==================== SCHEDULE DETAILS ==================== */

.schedule-back-row {
  margin-bottom: 1rem;
}

.schedule-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.schedule-hero-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 300px;
  min-width: 0;
}

.schedule-hero-thumb {
  width: 150px;
}

.schedule-section {
  margin-bottom: 1.5rem;
}

.schedule-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

/* ==================== QUIZ LIST & DPP QUIZ PLAYER ==================== */

.quiz-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.quiz-list-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.quiz-list-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quiz-list-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.quiz-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.btn-quiz-start {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  background: var(--accent);
  color: #03150d;
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
}

.btn-quiz-start:hover {
  background: var(--accent-bright);
}

body.quiz-mode .app-header,
body.quiz-mode .breadcrumbs-bar {
  display: none;
}

body.quiz-mode .main-container {
  max-width: 100%;
  padding: 0;
}

.dpp-quiz-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
}

.dpp-quiz-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.dpp-quiz-topbar-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.72rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dpp-quiz-top-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dpp-quiz-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dpp-quiz-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-bright);
  background: var(--accent-soft);
  padding: 0.35rem 0.65rem;
  border-radius: 9px;
}

.dpp-quiz-submit-top-btn {
  padding: 0.48rem 0.9rem;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: #03150d;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.dpp-quiz-strip-wrap {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.dpp-quiz-strip-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dpp-quiz-num-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}

.dpp-quiz-num-strip::-webkit-scrollbar {
  display: none;
}

.dpp-q-pill {
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.dpp-q-pill.is-answered {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--accent);
  color: var(--text-main);
}

.dpp-q-pill.is-correct {
  background: rgba(34, 197, 94, 0.24);
  border-color: #22c55e;
  color: #86efac;
}

.dpp-q-pill.is-wrong {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #fca5a5;
}

.dpp-q-pill.is-active {
  outline: 2px solid var(--accent-bright);
  outline-offset: 1px;
}

.dpp-q-pill.is-bookmarked::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.dpp-palette-trigger {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.dpp-quiz-main {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1rem 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dpp-quiz-title-caption {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-soft);
}

.dpp-q-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.dpp-q-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dpp-q-index-box {
  padding: 0.22rem 0.58rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-weight: 800;
  font-size: 0.82rem;
}

.dpp-q-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.16rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

.dpp-q-marks {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dpp-q-meta-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dpp-meta-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dpp-meta-icon-btn.is-bookmarked {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.45);
}

.dpp-more-menu {
  position: absolute;
  top: 40px;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 0.35rem;
  min-width: 190px;
  z-index: 25;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.dpp-more-menu-item {
  border: none;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
}

.dpp-more-menu-item:hover {
  background: var(--accent-soft);
}

.dpp-question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dpp-question-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.55;
}

.dpp-question-img,
.dpp-option-img,
.dpp-solution-img-wrap img {
  max-width: 100%;
  border-radius: 8px;
  background: #ffffff;
}

.dpp-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dpp-option-row {
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.78rem 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dpp-option-row.is-selected {
  border-color: var(--accent-bright);
  background: var(--accent-soft);
}

.dpp-option-row.is-correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
}

.dpp-option-row.is-wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}

.dpp-option-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.dpp-option-num {
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--text-soft);
  flex-shrink: 0;
}

.dpp-option-sep {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

.dpp-option-content {
  font-size: 0.9rem;
  min-width: 0;
}

.dpp-option-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dpp-option-pct {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dpp-radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
}

.dpp-radio-circle.is-checkbox {
  border-radius: 5px;
}

.dpp-option-row.is-selected .dpp-radio-circle {
  background: var(--accent);
  border-color: var(--accent);
}

.dpp-option-row.is-correct .dpp-radio-circle {
  background: #22c55e;
  border-color: #22c55e;
  color: #03150d;
}

.dpp-option-row.is-wrong .dpp-radio-circle {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.dpp-numeric-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dpp-numeric-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-soft);
}

.dpp-numeric-input {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
}

.dpp-verdict-banner {
  padding: 0.72rem 0.95rem;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.dpp-verdict-banner.correct {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.dpp-verdict-banner.wrong {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.dpp-verdict-banner.skipped {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-soft);
  border: 1px solid var(--border-subtle);
}

.dpp-solution-card,
.dpp-result-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dpp-solution-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dpp-solution-title {
  font-weight: 800;
  font-size: 0.94rem;
}

.dpp-video-sol-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  background: var(--accent);
  color: #03150d;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.dpp-solution-text {
  font-size: 0.88rem;
  color: var(--text-soft);
  white-space: pre-wrap;
}

.dpp-result-score-big {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent-bright);
}

.dpp-result-score-big span {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.dpp-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.dpp-stat-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.7rem;
  text-align: center;
}

.dpp-stat-val {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
}

.dpp-stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.dpp-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 0.45rem;
}

.dpp-palette-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.dpp-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dpp-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dpp-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  z-index: 25;
}

.dpp-bottom-bar-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dpp-nav-sq-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dpp-nav-sq-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dpp-primary-submit-btn {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #03150d;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
}

.dpp-primary-submit-btn.is-secondary {
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.dpp-modal-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2, 8, 5, 0.76);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dpp-modal-card,
.pdf-modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  padding: 1.1rem;
}

.dpp-modal-head,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.dpp-modal-title,
.modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-soft);
  cursor: pointer;
}

.pdf-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 0.5rem 0;
}

.pdf-icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  display: grid;
  place-items: center;
}

.pdf-main-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.pdf-filename-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-soft);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.3rem;
}

.dpp-quiz-toast,
.watch-toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #0d261a;
  color: #ecfdf5;
  border: 1px solid var(--border-strong);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 95;
}

.dpp-quiz-toast.is-visible,
.watch-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dpp-raw-error-box {
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dpp-raw-error-pre {
  background: var(--bg-canvas);
  padding: 0.75rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow-x: auto;
  color: #fca5a5;
}

/* ==================== SKELETON LOADER ==================== */

.skeleton {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.16), rgba(16, 185, 129, 0.08));
  background-size: 200% 100%;
  animation: sfPulse 1.4s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-row {
  height: 62px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.16), rgba(16, 185, 129, 0.08));
  background-size: 200% 100%;
  animation: sfPulse 1.4s ease-in-out infinite;
}

@keyframes sfPulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==================== DEDICATED WATCH STUDIO (watch.html) ==================== */

body.watch-page {
  background: #040a07;
  color: #ecfdf5;
  overflow-x: hidden;
}

.watch-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.player-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #030705;
}

.player-stage {
  position: relative;
  flex: 1;
  min-height: 360px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.watch-video {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 58px);
  object-fit: contain;
}

.watch-video.is-audio-hidden {
  opacity: 0;
}

.player-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(3, 10, 6, 0.85), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: opacity 0.25s;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.watch-brand-pill {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #03150d;
  background: #34d399;
  padding: 0.18rem 0.48rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.lecture-top-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #ecfdf5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
}

.stage-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 17, 11, 0.72);
  color: #ecfdf5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stage-icon-btn:hover {
  border-color: #34d399;
  color: #34d399;
}

.more-menu-popover {
  position: absolute;
  top: 52px;
  right: 16px;
  z-index: 24;
  background: #0d1d15;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 12px;
  padding: 0.35rem;
  min-width: 190px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}

.more-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #ecfdf5;
  padding: 0.58rem 0.72rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}

.more-menu-item:hover {
  background: rgba(16, 185, 129, 0.16);
}

.screen-lock-btn {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 17, 11, 0.72);
  color: #ecfdf5;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.25s;
}

.screen-lock-btn.is-locked {
  border-color: #f59e0b;
  color: #fbbf24;
}

.player-stage.controls-hidden .player-top-bar,
.player-stage.controls-hidden .stage-bottom-seek,
.player-stage.controls-hidden .screen-lock-btn {
  opacity: 0;
  pointer-events: none;
}

.player-stage.is-locked .player-top-bar,
.player-stage.is-locked .stage-bottom-seek {
  opacity: 0;
  pointer-events: none;
}

.audio-mode-overlay,
.stage-loading-overlay,
.stage-error-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  background: rgba(4, 10, 7, 0.85);
}

.audio-mode-disc {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #34d399;
  display: grid;
  place-items: center;
}

.audio-mode-title {
  font-weight: 800;
  font-size: 1rem;
}

.audio-mode-sub {
  font-size: 0.82rem;
  color: #9ec5b2;
  max-width: 340px;
}

.watch-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(52, 211, 153, 0.2);
  border-top-color: #34d399;
  animation: sfSpin 0.8s linear infinite;
}

@keyframes sfSpin {
  to {
    transform: rotate(360deg);
  }
}

.stage-error-card {
  max-width: 440px;
  background: #0d1d15;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stage-error-title {
  font-weight: 800;
  color: #fca5a5;
}

.stage-error-message {
  font-size: 0.82rem;
  color: #cbd5e1;
  word-break: break-word;
}

.stage-error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.watch-btn {
  padding: 0.52rem 0.9rem;
  border-radius: 9px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: #0f2419;
  color: #ecfdf5;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.watch-btn-primary {
  background: #10b981;
  color: #03150d;
  border-color: transparent;
}

.stage-bottom-seek {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  padding: 1.2rem 1rem 0.75rem;
  background: linear-gradient(0deg, rgba(3, 10, 6, 0.9), transparent);
  transition: opacity 0.25s;
}

.time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #d1fae5;
  margin-bottom: 0.4rem;
}

.sleep-badge-text {
  color: #fbbf24;
}

.seek-track {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.seek-rail {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.seek-buffered {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
}

.seek-played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: #10b981;
}

.seek-thumb {
  position: absolute;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #34d399;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

.player-controls-bar {
  background: #08130d;
  border-top: 1px solid rgba(52, 211, 153, 0.14);
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #d1fae5;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ctrl-btn:hover,
.ctrl-btn.is-active {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.volume-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.volume-slider {
  width: 74px;
  accent-color: #10b981;
}

.settings-menu-backdrop {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.settings-menu-card {
  width: 100%;
  max-width: 340px;
  background: #0d1e15;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 14px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.settings-row {
  border: none;
  background: transparent;
  color: #ecfdf5;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  cursor: pointer;
}

.settings-row:hover {
  background: rgba(16, 185, 129, 0.14);
}

.settings-row-value {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #9ec5b2;
  font-size: 0.8rem;
}

.settings-row-value.is-active,
.settings-option-check {
  color: #34d399;
  font-weight: 700;
}

.settings-submenu-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(52, 211, 153, 0.14);
  margin-bottom: 0.2rem;
}

.settings-back-btn {
  border: none;
  background: transparent;
  color: #ecfdf5;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.settings-submenu-title {
  font-weight: 800;
  font-size: 0.88rem;
}

.settings-custom-sleep {
  display: flex;
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
}

.settings-custom-sleep input {
  flex: 1;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: #06100b;
  color: #ecfdf5;
  font-size: 0.82rem;
}

.panel-restore-bar {
  display: none;
  justify-content: center;
  padding: 0.6rem;
  background: #08130d;
  border-top: 1px solid rgba(52, 211, 153, 0.14);
}

.panel-restore-bar.is-visible {
  display: flex;
}

.resource-panel {
  background: #09150f;
  border-left: 1px solid rgba(52, 211, 153, 0.16);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.resource-panel.is-collapsed {
  display: none;
}

.panel-header {
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(52, 211, 153, 0.12);
}

.panel-heading {
  font-size: 0.98rem;
  font-weight: 800;
}

.panel-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  background: #0e2017;
  color: #a7cbb9;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.resource-tabs-wrap {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(52, 211, 153, 0.12);
}

.resource-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  background: #060f0a;
  padding: 0.25rem;
  border-radius: 10px;
}

.resource-tab-btn {
  border: none;
  background: transparent;
  color: #8eb6a2;
  padding: 0.48rem 0.4rem;
  border-radius: 8px;
  font-size: 0.77rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
}

.resource-tab-btn.active {
  background: #10b981;
  color: #03150d;
}

.resource-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #6c9380;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.attachment-list,
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.attachment-card {
  background: #0e1e16;
  border: 1px solid rgba(52, 211, 153, 0.14);
  border-radius: 11px;
  padding: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.pdf-icon-box {
  width: 40px;
  height: 44px;
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-mini-tag {
  font-size: 0.56rem;
  font-weight: 800;
}

.attachment-info {
  min-width: 0;
  flex: 1;
}

.attachment-title {
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-sub {
  font-size: 0.74rem;
  color: #6c9380;
}

.attachment-actions {
  display: flex;
  gap: 0.3rem;
}

.att-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  background: #09150f;
  color: #a7cbb9;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.att-icon-btn:hover {
  color: #34d399;
  border-color: #34d399;
}

.slides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.slide-card {
  background: #0e1e16;
  border: 1px solid rgba(52, 211, 153, 0.15);
  border-radius: 10px;
  overflow: hidden;
}

.slide-card.is-current {
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}

.slide-thumb-btn {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  background: #06100b;
  padding: 0;
  cursor: pointer;
  display: block;
}

.slide-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-footer {
  padding: 0.42rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
}

.slide-seek-btn {
  border: none;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
}

.timeline-item {
  width: 100%;
  text-align: left;
  background: #0e1e16;
  border: 1px solid rgba(52, 211, 153, 0.14);
  border-radius: 10px;
  padding: 0.68rem 0.8rem;
  color: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
}

.timeline-item:hover {
  border-color: #34d399;
}

.timeline-title {
  font-size: 0.84rem;
  font-weight: 600;
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #34d399;
  flex-shrink: 0;
}

.empty-state-box {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.84rem;
  color: #6c9380;
  background: #0d1c14;
  border: 1px dashed rgba(52, 211, 153, 0.2);
  border-radius: 10px;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 4, 0.94);
  display: flex;
  flex-direction: column;
}

.lightbox-top {
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lightbox-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-stage img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 10px;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(6, 17, 11, 0.8);
  color: #ecfdf5;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lightbox-nav-btn.prev {
  left: 16px;
}

.lightbox-nav-btn.next {
  right: 16px;
}

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

@media (max-width: 960px) {
  .watch-shell {
    grid-template-columns: 1fr;
  }
  .resource-panel {
    height: auto;
    min-height: 360px;
    border-left: none;
    border-top: 1px solid rgba(52, 211, 153, 0.16);
  }
}

@media (max-width: 640px) {
  .item-row {
    flex-direction: column;
    align-items: stretch;
  }
  .item-actions-group {
    justify-content: flex-end;
  }
  .item-video-thumb {
    width: 96px;
  }
  .dpp-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .volume-slider {
    display: none;
  }
}
