/* ===========================================
   LANDING PAGE & VIDEO PLAYER CSS
   =========================================== */

/* ===========================================
   LANDING PAGE
   =========================================== */
.landing-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem;
  gap: 2rem;
}

.landing-header {
  text-align: center;
  flex-shrink: 0;
}

.landing-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.landing-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.landing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  flex: 1;
  min-height: 0;
}

.landing-option {
  background: rgba(20, 24, 36, 0.6);
  border: 2px solid rgba(255, 107, 53, 0.4);
  border-radius: 24px;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.landing-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(247, 147, 30, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.landing-option:hover::before {
  opacity: 1;
}

.landing-option:hover {
  border-color: #ff6b35;
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(255, 107, 53, 0.3);
}

.landing-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.3);
}

.landing-option.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(148, 163, 184, 0.3);
}

.option-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
  z-index: 1;
}

.option-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.option-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  z-index: 1;
}

.option-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  max-width: 400px;
  z-index: 1;
}

.option-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  color: var(--success);
  font-weight: 600;
  z-index: 1;
}

.option-badge.disabled {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text-muted);
}

.badge-icon {
  font-size: 1.2rem;
}

/* Preview delle slide */
.option-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 1;
}

/* Option header per raggruppare icon + title */
.option-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  z-index: 1;
}

.preview-slide {
  width: 200px;
  height: 78px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preview-line {
  height: 6px;
  background: rgba(255, 107, 53, 0.5);
  border-radius: 3px;
  width: 100%;
}

.preview-line.short {
  width: 60%;
}

.preview-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tesina-sections-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.14), transparent 28%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.35);
}

.tesina-sections-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.tesina-sections-kicker {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.tesina-sections-title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.tesina-sections-description {
  margin: 0 auto;
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.tesina-sections-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tesina-section-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.25rem;
  border: 0;
  border-radius: 22px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  color: #1f2940;
  box-shadow: 0 18px 34px -24px rgba(31, 41, 64, 0.55);
}

.tesina-section-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 22px 40px -22px rgba(31, 41, 64, 0.48);
  filter: saturate(1.05);
}

.tesina-section-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: rgba(31, 41, 64, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tesina-section-mark {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.82);
  color: #1f2940;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.tesina-section-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.tesina-section-summary {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(31, 41, 64, 0.82);
}

.tesina-section-card.section-italiano {
  background: linear-gradient(135deg, #ffe082 0%, #ffd54f 48%, #ffca28 100%);
}

.tesina-section-card.section-storia {
  background: linear-gradient(135deg, #ffccbc 0%, #ffab91 48%, #ff8a65 100%);
}

.tesina-section-card.section-geografia {
  background: linear-gradient(135deg, #b3e5fc 0%, #81d4fa 48%, #4fc3f7 100%);
}

.tesina-section-card.section-scienze {
  background: linear-gradient(135deg, #c8f7c5 0%, #9be7a2 48%, #6fdc8c 100%);
}

.tesina-section-card.section-matematica {
  background: linear-gradient(135deg, #d1c4e9 0%, #b39ddb 48%, #9575cd 100%);
}

.tesina-section-card.section-tecnologia {
  background: linear-gradient(135deg, #cfd8dc 0%, #b0bec5 48%, #90a4ae 100%);
}

.tesina-section-card.section-inglese {
  background: linear-gradient(135deg, #f8bbd0 0%, #f48fb1 48%, #f06292 100%);
}

.tesina-section-card.section-arte {
  background: linear-gradient(135deg, #ffd180 0%, #ffab40 30%, #ff8a80 65%, #ea80fc 100%);
}

.tesina-section-card.section-civica {
  background: linear-gradient(135deg, #a5d6a7 0%, #81c784 48%, #66bb6a 100%);
}

/* ===========================================
   VIDEO PLAYER PAGE
   =========================================== */
.video-page {
  background: var(--bg-dark);
}

.video-player-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 3rem 3rem 3rem;
  gap: 1.5rem;
  box-sizing: border-box;
  justify-content: center;
  min-height: calc(100vh - 4rem);
}

.video-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.back-button {
  height: 3rem;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: #ff6b35;
  color: #ff6b35;
  transform: translateX(-4px);
}

.back-icon {
  font-size: 1.5rem;
}

.video-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

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

.video-embed-wrapper {
  width: 90%;
  max-width: 1400px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 107, 53, 0.2);
  border: 1px solid rgba(255, 107, 53, 0.3);
  position: relative;
  padding-bottom: 35%;
  height: 0;
  margin: 0 auto;
  overflow: visible;
}

.video-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
}

.video-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.action-button .icon {
  font-size: 1.5rem;
}

.action-button.primary {
  background: transparent;
  border: 2px solid rgba(255, 107, 53, 0.5);
  color: #ff6b35;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.action-button.primary:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: #ff6b35;
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.25);
}

.action-button.secondary {
  background: transparent;
  border: 2px solid rgba(0, 0, 0, 0.15);
  color: #475569;
}

.action-button.secondary:hover {
  background: rgba(255, 107, 53, 0.05);
  border-color: rgba(255, 107, 53, 0.4);
  color: #ff6b35;
}

/* ===========================================
   LIGHT THEME
   =========================================== */
[data-theme="light"] .landing-title {
  background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .landing-option {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 107, 53, 0.4);
}

[data-theme="light"] .landing-option:hover {
  border-color: #ff6b35;
  box-shadow: 0 20px 60px rgba(255, 107, 53, 0.2);
}

[data-theme="light"] .option-icon {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

[data-theme="light"] .option-title {
  color: #0f172a;
}

[data-theme="light"] .option-description {
  color: #475569;
}

[data-theme="light"] .preview-line {
  background: rgba(255, 107, 53, 0.4);
}

[data-theme="light"] .preview-slide {
  border-color: rgba(255, 107, 53, 0.3);
}

[data-theme="light"] .back-button {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 107, 53, 0.3);
  color: #475569;
}

[data-theme="light"] .back-button:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: #ff6b35;
  color: #ff6b35;
}

[data-theme="light"] .video-title {
  color: #0f172a;
}

[data-theme="light"] .video-embed-wrapper {
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 30px rgba(255, 107, 53, 0.2);
}

[data-theme="light"] .action-button.primary {
  background: transparent;
  border: 2px solid rgba(255, 107, 53, 0.5);
  color: #ff6b35;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

[data-theme="light"] .action-button.primary:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: #ff6b35;
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.25);
}

[data-theme="light"] .action-button.secondary {
  background: transparent;
  border: 2px solid rgba(0, 0, 0, 0.15);
  color: #475569;
}

[data-theme="light"] .action-button.secondary:hover {
  background: rgba(255, 107, 53, 0.05);
  border-color: rgba(255, 107, 53, 0.4);
  color: #ff6b35;
}

/* ===========================================
   DARK IMAGE THEME
   =========================================== */
[data-theme="dark-image"] .video-page {
  background: radial-gradient(ellipse at top, rgba(26, 31, 53, 0.95) 0%, rgba(10, 14, 26, 0.98) 100%);
}

[data-theme="dark-image"] .landing-container,
[data-theme="dark-image"] .video-player-container {
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  padding: 2.5rem;
}

[data-theme="dark-image"] .landing-title {
  /*text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);*/
}

[data-theme="dark-image"] .landing-subtitle {
  color: #cbd5e1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

[data-theme="dark-image"] .landing-option {
  background: rgba(20, 24, 36, 0.8);
  border-color: rgba(255, 107, 53, 0.4);
  backdrop-filter: blur(10px);
}

[data-theme="dark-image"] .landing-option:hover {
  background: rgba(30, 34, 46, 0.9);
  border-color: #ff6b35;
  box-shadow: 0 20px 60px rgba(255, 107, 53, 0.4);
}

[data-theme="dark-image"] .option-icon {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.5);
}

[data-theme="dark-image"] .option-title {
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

[data-theme="dark-image"] .option-description {
  color: #e2e8f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

[data-theme="dark-image"] .option-badge {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

[data-theme="dark-image"] .preview-line {
  background: rgba(255, 107, 53, 0.6);
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

[data-theme="dark-image"] .preview-slide {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 107, 53, 0.3);
  backdrop-filter: blur(8px);
}

[data-theme="dark-image"] .preview-label {
  color: #cbd5e1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="dark-image"] .back-button {
  background: rgba(20, 24, 36, 0.8);
  border-color: rgba(255, 107, 53, 0.4);
  color: #e2e8f0;
  backdrop-filter: blur(10px);
}

[data-theme="dark-image"] .back-button:hover {
  background: rgba(30, 34, 46, 0.9);
  border-color: #ff6b35;
  color: #ff8c42;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

[data-theme="dark-image"] .video-title {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

[data-theme="dark-image"] .video-subtitle {
  color: #cbd5e1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

[data-theme="dark-image"] .video-embed-wrapper {
  border-color: rgba(255, 107, 53, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 107, 53, 0.3);
}

[data-theme="dark-image"] .action-button.primary {
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

[data-theme="dark-image"] .action-button.primary:hover {
  box-shadow: 0 12px 28px rgba(255, 107, 53, 0.6);
  transform: translateY(-3px);
}

[data-theme="dark-image"] .action-button.secondary {
  background: rgba(20, 24, 36, 0.8);
  border-color: rgba(255, 107, 53, 0.3);
  color: #e2e8f0;
  backdrop-filter: blur(10px);
}

[data-theme="dark-image"] .action-button.secondary:hover {
  background: rgba(30, 34, 46, 0.9);
  border-color: #ff6b35;
  color: #ff8c42;
}

/* ===========================================
   KIDS THEME
   =========================================== */
[data-theme="kids"] .tesina-sections-panel {
  background:
    radial-gradient(circle at top left, rgba(255, 214, 92, 0.35), transparent 26%),
    radial-gradient(circle at top right, rgba(84, 210, 255, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 255, 0.9));
  border: 3px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.28),
    0 24px 50px -28px rgba(44, 141, 249, 0.28);
}

[data-theme="kids"] .tesina-sections-kicker {
  color: #ff7a18;
}

[data-theme="kids"] .tesina-sections-title {
  color: #244160;
}

[data-theme="kids"] .tesina-sections-description {
  color: #47607c;
}

[data-theme="kids"] .tesina-section-card {
  border: 3px solid rgba(255, 255, 255, 0.7);
}

[data-theme="kids"] .landing-container {
  gap: 1.5rem;
  padding: 1.6rem;
}

[data-theme="kids"] .landing-title {
  background: none;
  -webkit-text-fill-color: initial;
  color: #526279;
  font-size: clamp(2rem, 2.4vw, 2.9rem);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.75);
}

[data-theme="kids"] .landing-subtitle {
  color: #3f5876;
  max-width: 900px;
  margin: 0 auto;
}

[data-theme="kids"] .landing-split {
  flex: 0 0 auto;
  min-height: auto;
  gap: 1.25rem;
  align-items: stretch;
}

[data-theme="kids"] .kids-landing-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
}

[data-theme="kids"] .kids-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-width: 18.5rem;
  min-height: 6rem;
  padding: 1.15rem 2.2rem;
  border-radius: 999px;
  border: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

[data-theme="kids"] .kids-action-button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: saturate(1.05);
}

[data-theme="kids"] .kids-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

[data-theme="kids"] .kids-action-button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #ff8a1f 0%, #ff5b2e 100%);
  box-shadow: 0 18px 34px -18px rgba(255, 107, 53, 0.55);
}

[data-theme="kids"] .kids-action-button.secondary {
  color: #62748a;
  background: rgba(255, 255, 255, 0.78);
  border: 3px solid rgba(200, 216, 234, 0.95);
  box-shadow: 0 16px 30px -24px rgba(53, 110, 178, 0.2);
}

[data-theme="kids"] .kids-action-button.tertiary {
  color: #ffffff;
  background: linear-gradient(135deg, #2c8df9 0%, #34c3ff 100%);
  box-shadow: 0 18px 34px -18px rgba(44, 141, 249, 0.5);
}

[data-theme="kids"] .kids-action-icon {
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

[data-theme="kids"] .kids-action-button.secondary .kids-action-icon {
  background: rgba(83, 112, 141, 0.1);
}

[data-theme="kids"] .kids-action-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

[data-theme="kids"] .landing-option {
  min-height: 0;
  padding: 1.4rem 1.4rem 1.25rem;
  justify-content: flex-start;
  gap: 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 249, 255, 0.88));
  border: 3px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 16px 36px -28px rgba(44, 141, 249, 0.34),
    0 0 0 4px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px);
}

[data-theme="kids"] .landing-option::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(255, 205, 92, 0.16), rgba(84, 210, 255, 0.1));
}

[data-theme="kids"] .landing-option:hover {
  border-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-4px);
  box-shadow:
    0 24px 40px -28px rgba(44, 141, 249, 0.42),
    0 0 0 5px rgba(255, 255, 255, 0.3);
}

[data-theme="kids"] .landing-option.disabled {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.68);
}

[data-theme="kids"] .option-header {
  gap: 0.75rem;
}

[data-theme="kids"] .option-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(255, 145, 71, 0.28);
}

[data-theme="kids"] .option-icon svg {
  width: 32px;
  height: 32px;
}

[data-theme="kids"] .option-title {
  font-size: 1.8rem;
  color: #244160;
}

[data-theme="kids"] .option-description {
  max-width: 32rem;
  font-size: 1rem;
  color: #4a627f;
}

[data-theme="kids"] .option-badge,
[data-theme="kids"] .option-badge.disabled {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 173, 78, 0.34);
  color: #ff7a18;
}

[data-theme="kids"] .preview-slide {
  width: 160px;
  height: 94px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 173, 78, 0.26);
}

[data-theme="kids"] .preview-line {
  background: rgba(255, 122, 24, 0.32);
}

[data-theme="kids"] .preview-label {
  color: #53708d;
}

[data-theme="kids"] .tesina-sections-panel {
  margin-top: 0;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
  .tesina-sections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-split {
    grid-template-columns: 1fr;
  }

  .landing-title {
    font-size: 2rem;
  }

  .option-title {
    font-size: 1.75rem;
  }

  .video-player-container {
    max-width: 900px;
    padding: 2rem 2rem 2.5rem 2rem;
  }
  
  .video-embed-wrapper {
    width: 95%;
  }
  
  .back-button {
    font-size: 0.9rem;
    padding: 0.7rem 1.15rem;
  }

  [data-theme="kids"] .landing-option {
    padding: 1.2rem;
  }

  [data-theme="kids"] .option-title {
    font-size: 1.45rem;
  }
}

@media (max-width: 768px) {
  .tesina-sections-panel {
    padding: 1.2rem;
    border-radius: 22px;
  }

  .tesina-sections-title {
    font-size: 1.25rem;
  }

  .tesina-sections-description {
    font-size: 0.9rem;
  }

  .tesina-sections-grid {
    grid-template-columns: 1fr;
  }

  .tesina-section-card {
    padding: 1rem;
    border-radius: 18px;
  }

  .tesina-section-name {
    font-size: 1.05rem;
  }

  .tesina-section-summary {
    font-size: 0.88rem;
  }

  .landing-container {
    padding: 1rem;
    min-height: 100vh;
    max-height: none !important;
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
  }

  .landing-header {
    flex-shrink: 0;
  }

  .landing-title {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }

  .landing-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.4;
  }

  .landing-split {
    gap: 1rem;
    overflow-y: visible;
    min-height: auto;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
  }

  .landing-option {
    padding: 1.5rem 1.25rem;
    margin-bottom: 0;
    min-height: auto;
    flex-shrink: 0;
  }

  /* Icon inline con titolo su mobile */
  .option-header {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .option-icon {
    width: 45px;
    height: 45px;
    margin: 0;
    flex-shrink: 0;
  }

  .option-icon svg {
    width: 24px;
    height: 24px;
  }

  .option-title {
    font-size: 1.15rem;
    text-align: left;
    margin: 0;
  }

  .option-description {
    font-size: 0.8rem;
    padding: 0 0.25rem;
    text-align: center;
  }

  .option-badge {
    margin: 0.5rem 0;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .preview-slide {
    width: 120px;
    height: 75px;
    padding: 0.75rem;
  }

  .preview-label {
    font-size: 0.75rem;
  }

  /* VIDEO PLAYER MOBILE OTTIMIZZATO */
  .video-player-container {
    padding: 1rem;
    max-width: 100%;
    overflow-y: visible;
    min-height: 100vh;
    gap: 1rem;
    justify-content: flex-start;
  }

  .back-button {
    align-self: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
    height: auto;
  }
  
  .back-icon {
    font-size: 1.25rem;
  }

  .video-header {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .video-title {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .video-subtitle {
    font-size: 0.85rem;
  }

  /* VIDEO A SCHERMO INTERO SU MOBILE */
  .video-embed-wrapper {
    width: 100vw;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    padding-bottom: 56.25%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: visible;
  }
  
  .video-embed-wrapper iframe {
    border-radius: 0;
  }

  /* PULSANTI COMPATTI E VISIBILI */
  .video-actions {
    flex-direction: column;
    margin-top: 1rem;
    gap: 0.75rem;
    padding: 0 0.5rem;
  }

  .action-button {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .action-button.primary {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(247, 147, 30, 0.1) 100%);
    border: 2px solid rgba(255, 107, 53, 0.6);
    color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
  }

  .action-button.primary:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
  }

  .action-button.secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
  }

  .action-button.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
  }

  .action-button .icon {
    font-size: 1.2rem;
  }

  [data-theme="kids"] .landing-container {
    gap: 1rem;
    padding: 1rem;
  }

  [data-theme="kids"] .landing-title {
    font-size: 1.55rem;
  }

  [data-theme="kids"] .landing-option {
    padding: 1rem;
    gap: 0.75rem;
  }

  [data-theme="kids"] .kids-landing-actions {
    gap: 0.75rem;
  }

  [data-theme="kids"] .kids-action-button {
    width: 100%;
    min-width: 0;
    min-height: 4.85rem;
    padding: 1rem 1.4rem;
    font-size: 1.05rem;
  }

  [data-theme="kids"] .option-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  [data-theme="kids"] .option-icon svg {
    width: 24px;
    height: 24px;
  }

  [data-theme="kids"] .option-title {
    font-size: 1.1rem;
  }

  [data-theme="kids"] .option-description {
    font-size: 0.82rem;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .video-player-container {
    padding: 0.75rem;
  }
  
  .back-button {
    font-size: 0.85rem;
    padding: 0.6rem 0.9rem;
  }
  
  .video-title {
    font-size: 1.1rem;
  }
  
  .video-subtitle {
    font-size: 0.8rem;
  }
  
  .video-embed-wrapper {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }
  
  .action-button {
    padding: 0.8rem 1.25rem;
    font-size: 0.9rem;
  }
}
