/* ═══════════════════════════════════════════════════════════
   SYNAPSE MODE — Cinematic English Learning
   Premium dark/neon design. No writing required.
═══════════════════════════════════════════════════════════ */

#synapse-root {
  font-family: var(--font-main, 'Inter', sans-serif);
  min-height: 100%;
  width: 100%;
  transition: background 0.8s ease;
  position: relative;
  overflow: hidden;
}

/* ── Shared: progress bar ─────────────────────────────── */
.syn-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.syn-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ── INTRO ──────────────────────────────────────────────── */
.syn-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-bottom: 40px;
}

/* Hero image block */
.syn-intro-hero {
  width: 100%;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0;
}
.syn-intro-hero-overlay {
  position: absolute;
  inset: 0;
}
.syn-intro-hero-content {
  position: relative;
  z-index: 1;
  padding: 32px 24px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Level tabs ──────────────────────────────────────────── */
.syn-level-tabs {
  display: flex;
  gap: 6px;
  padding: 16px 16px 4px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.syn-level-tabs::-webkit-scrollbar { display: none; }

.syn-level-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.syn-level-tab.active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.syn-level-tab:hover:not(.active) {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
}
.syn-tab-count {
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 1px 6px;
  color: rgba(255,255,255,0.5);
}
.syn-level-tab.active .syn-tab-count {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ── Episode cards grid ───────────────────────────────────── */
.syn-ep-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 16px 32px;
  width: 100%;
}

.syn-ep-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px 0 0;
  border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  overflow: hidden;
  position: relative;
}
.syn-ep-card.active {
  border-color: var(--card-accent, #7c5cfc);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 20px color-mix(in srgb, var(--card-accent, #7c5cfc) 20%, transparent);
}
.syn-ep-card:hover:not(.active) {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  transform: translateX(2px);
}

.syn-ep-card-img {
  width: 80px;
  height: 64px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.05);
  position: relative;
  border-radius: 12px 0 0 12px;
  overflow: hidden;
}
.syn-ep-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, rgba(0,0,0,0.3));
}
.syn-ep-card-num {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  line-height: 1;
}
.syn-ep-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.syn-ep-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.syn-ep-card-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.syn-ep-card-check {
  font-size: 14px;
  color: var(--card-accent, #7c5cfc);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Başla bar ──────────────────────────────────────────── */
.syn-intro-start-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  width: 100%;
  gap: 12px;
}

.syn-intro-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(16px);
  box-shadow: 0 32px 64px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  margin: 0 16px;
}

/* Hero text styles */
.syn-intro-level {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ep-accent, #7c5cfc);
}
.syn-intro-num {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
}
.syn-intro-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.syn-intro-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
}
.syn-intro-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  text-align: center;
}
.syn-btn-start {
  padding: 10px 28px;
  border-radius: 40px;
  border: none;
  background: var(--ep-accent, #7c5cfc);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ep-accent, #7c5cfc) 45%, transparent);
}
.syn-btn-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ep-accent, #7c5cfc) 60%, transparent);
}
.syn-btn-start:active { transform: translateY(0); }

/* ── CINEMATIC ──────────────────────────────────────────── */
.syn-cinematic {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
}

/* Background image layers */
.syn-cin-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transform: scale(1.05);
  filter: blur(2px);
  transition: background-image 0.6s ease;
}
.syn-cin-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
}
.syn-cinematic > *:not(.syn-cin-bg):not(.syn-cin-bg-overlay) {
  position: relative;
  z-index: 2;
}

.syn-cin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 8px;
}
.syn-cin-ep {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
}
.syn-cin-counter {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}

.syn-cin-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 16px;
  gap: 20px;
  position: relative;
}

.syn-cin-sentence {
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  text-align: center;
  max-width: 600px;
  letter-spacing: 0.2px;
}

.syn-word {
  cursor: default;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s, text-shadow 0.15s;
  display: inline;
  padding: 1px 2px;
}
.syn-vocab-word {
  cursor: pointer;
  border-bottom: 2px solid var(--ep-accent, #7c5cfc);
  color: #fff;
}
.syn-vocab-word:hover {
  background: rgba(255,255,255,0.07);
}
.syn-word-active {
  background: var(--ep-accent, #7c5cfc) !important;
  color: #fff !important;
  border-radius: 5px;
  text-shadow: 0 0 20px var(--ep-accent, #7c5cfc);
}

.syn-ws { display: inline; }

.syn-cin-vocab {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 500px;
}
.syn-vocab-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--chip-c, #7c5cfc) 50%, transparent);
  background: color-mix(in srgb, var(--chip-c, #7c5cfc) 10%, transparent);
  color: var(--chip-c, #7c5cfc);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.syn-vocab-chip:hover {
  background: color-mix(in srgb, var(--chip-c, #7c5cfc) 20%, transparent);
  transform: translateY(-1px);
}
.vc-ipa {
  font-size: 11px;
  opacity: 0.6;
  font-weight: 400;
}

/* Definition popup */
.syn-cin-popup {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 20;
  padding: 32px;
  animation: syn-pop-in 0.15s ease;
}
@keyframes syn-pop-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.syn-popup-word {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
}
.syn-popup-ipa {
  font-size: 16px;
  color: rgba(255,255,255,0.45);
}
.syn-popup-tr {
  font-size: 20px;
  color: var(--ep-accent, #7c5cfc);
  font-weight: 600;
  margin-top: 8px;
}
.syn-popup-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.5);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.syn-popup-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Controls */
.syn-cin-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px 32px;
}
.syn-ctrl-btn {
  padding: 12px 20px;
  border-radius: 40px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.syn-ctrl-btn:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.09);
}
.syn-ctrl-next {
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  background: var(--btn-c, #7c5cfc);
  border-color: transparent;
  color: #fff;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--btn-c, #7c5cfc) 40%, transparent);
}
.syn-ctrl-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--btn-c, #7c5cfc) 55%, transparent);
}
.syn-pulse {
  animation: syn-btn-pulse 1s ease-in-out infinite;
}
@keyframes syn-btn-pulse {
  0%,100% { box-shadow: 0 4px 16px color-mix(in srgb, var(--btn-c, #7c5cfc) 40%, transparent); }
  50%      { box-shadow: 0 4px 28px color-mix(in srgb, var(--btn-c, #7c5cfc) 80%, transparent); }
}

/* ── RECALL ─────────────────────────────────────────────── */
.syn-recall {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}
.syn-recall-header {
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
  width: 100%;
  text-align: center;
}
.syn-recall-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  width: 100%;
  max-width: 420px;
}
.syn-rc-word {
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  animation: syn-word-in 0.3s ease;
}
@keyframes syn-word-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.syn-rc-ipa {
  font-size: 16px;
  color: rgba(255,255,255,0.35);
  margin-top: -4px;
}
.syn-rc-tr {
  font-size: 22px;
  font-weight: 600;
  color: var(--ep-accent, #7c5cfc);
  margin-top: 16px;
  text-align: center;
  transition: visibility 0.2s;
}
.syn-rc-reveal {
  margin-top: 16px;
  padding: 12px 36px;
  border-radius: 30px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.syn-rc-reveal:hover { background: rgba(255,255,255,0.1); }
.syn-rc-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.syn-rc-no, .syn-rc-yes {
  padding: 12px 32px;
  border-radius: 30px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.syn-rc-no {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1.5px solid rgba(239,68,68,0.3);
}
.syn-rc-no:hover { background: rgba(239,68,68,0.25); }
.syn-rc-yes {
  background: var(--yes-c, #10b981);
  color: #fff;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--yes-c, #10b981) 40%, transparent);
}
.syn-rc-yes:hover { transform: translateY(-1px); }

/* ── SHADOW ─────────────────────────────────────────────── */
.syn-shadow {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.syn-shadow-header {
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
  text-align: center;
}
.syn-shadow-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px 48px;
}
.syn-shadow-instr {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
}
.syn-shadow-text {
  font-size: clamp(18px, 4vw, 26px);
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-align: center;
  line-height: 1.6;
  max-width: 520px;
}
.syn-shadow-listen {
  padding: 14px 40px;
  border-radius: 40px;
  border: none;
  background: var(--sh-c, #7c5cfc);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--sh-c, #7c5cfc) 40%, transparent);
}
.syn-shadow-listen:hover { transform: translateY(-2px); }
.syn-shadow-mic-wrap {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.syn-shadow-mic {
  padding: 14px 40px;
  border-radius: 40px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.syn-shadow-mic:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.1); }
.syn-shadow-mic:disabled { opacity: 0.5; cursor: not-allowed; }
.syn-shadow-result {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  text-align: center;
  max-width: 400px;
}
.syn-shadow-result.visible { color: rgba(255,255,255,0.7); }
.syn-shadow-next {
  padding: 13px 36px;
  border-radius: 40px;
  border: none;
  background: var(--sh-c, #7c5cfc);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--sh-c, #7c5cfc) 40%, transparent);
}
.syn-shadow-next:hover { transform: translateY(-1px); }

/* ── COMPLETE ────────────────────────────────────────────── */
.syn-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 48px 24px;
  gap: 16px;
}
.syn-complete-icon {
  font-size: 56px;
  line-height: 1;
  animation: syn-icon-spin 1.5s ease;
}
@keyframes syn-icon-spin {
  from { opacity: 0; transform: scale(0.3) rotate(-180deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
.syn-complete-ep {
  font-size: 14px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1px;
}
.syn-complete-grade {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}
.syn-complete-stats {
  display: flex;
  gap: 32px;
  margin: 16px 0;
  padding: 24px 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
}
.syn-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.syn-stat-n {
  font-size: 32px;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
}
.syn-stat-l {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.5px;
}
.syn-complete-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.syn-btn-replay {
  padding: 13px 32px;
  border-radius: 40px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.syn-btn-replay:hover { background: rgba(255,255,255,0.1); }
.syn-btn-next-ep {
  padding: 13px 32px;
  border-radius: 40px;
  border: none;
  background: var(--ep-accent, #7c5cfc);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ep-accent, #7c5cfc) 40%, transparent);
}
.syn-btn-next-ep:hover { transform: translateY(-1px); }

/* ── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 480px) {
  .syn-cin-sentence { font-size: 20px; }
  .syn-rc-word { font-size: 32px; }
  .syn-intro-title { font-size: 24px; }
  .syn-complete-stats { gap: 20px; padding: 20px 28px; }
  .syn-stat-n { font-size: 26px; }
}
