@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0b0e;
  --bg-card: #101218;
  --bg-card-hover: #161922;
  --bg-expert: #0d0f15;
  --accent-lime: #c6ff3e;
  --accent-lime-dim: rgba(198, 255, 62, 0.14);
  --accent-lime-glow: rgba(198, 255, 62, 0.4);
  --accent-blue: #38bdf8;
  --accent-purple: #c084fc;
  --accent-amber: #fbbf24;
  --accent-red: #f87171;
  --text-main: #f3f4f6;
  --text-muted: #848a9a;
  --text-dim: #4b5263;
  --border-subtle: #1c202a;
  --border-active: #2b3345;
  --border-lime: rgba(198, 255, 62, 0.4);
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-lime);
}

.font-mono {
  font-family: var(--font-mono);
}
.text-lime {
  color: var(--accent-lime);
}
.bg-lime {
  background-color: var(--accent-lime);
}
.border-lime {
  border-color: var(--accent-lime);
}

#app-root {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Slide Viewport */
#slide-viewport {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  padding: 1rem 0.75rem calc(60px + env(safe-area-inset-bottom, 12px)) 0.75rem;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

@media (min-width: 640px) {
  #slide-viewport {
    padding: 1.25rem 1.25rem calc(60px + env(safe-area-inset-bottom, 12px)) 1.25rem;
  }
}

@media (min-width: 1024px) {
  #slide-viewport {
    padding: 1.5rem 2rem calc(60px + env(safe-area-inset-bottom, 12px)) 2rem;
  }
}

.slide-wrapper {
  max-width: 1380px;
  width: 100%;
  margin: auto;
  position: relative;
}

.slide-content {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Dual Column Layout: Slide Presentation + Expert Dossier */
.dual-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr);
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .dual-layout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Slide Left Visual Box (Card) */
.slide-visual-box {
  background: #0d0e14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.25rem 2.5rem 1.25rem 2.5rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
}

@media (max-width: 768px) {
  .slide-visual-box {
    padding: 1.5rem 1.25rem 1rem 1.25rem;
    border-radius: 14px;
    min-height: 330px;
  }
}

/* Slide Right Expert Breakdown Box */
.slide-expert-box {
  background: var(--bg-expert);
  border: 1px solid #232938;
  border-radius: 16px;
  padding: 2rem 2.25rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
  position: relative;
}

@media (max-width: 768px) {
  .slide-expert-box {
    padding: 1.5rem 1.25rem;
    border-radius: 14px;
  }
}

.expert-tag-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(198, 255, 62, 0.14);
  color: var(--accent-lime);
  border: 1px solid rgba(198, 255, 62, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Slide Header Badges */
.slide-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 1.25rem;
  min-height: 1.75rem;
}

.slide-breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slide-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-live {
  background: rgba(198, 255, 62, 0.15);
  color: var(--accent-lime);
  border: 1px solid var(--accent-lime);
  animation: pulse-badge 2s infinite;
}

.badge-confirmed {
  background: rgba(198, 255, 62, 0.15);
  color: var(--accent-lime);
  border: 1px solid var(--accent-lime);
}

.badge-unconfirmed {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
}

.badge-safebet {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
}

.badge-likely {
  background: rgba(192, 132, 252, 0.15);
  color: var(--accent-purple);
  border: 1px solid var(--accent-purple);
}

.badge-wildcard {
  background: rgba(248, 113, 113, 0.15);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* Typography */
.slide-title-hero {
  font-size: clamp(2rem, 5.2vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #ffffff;
}

.slide-subtitle-hero {
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

/* Watermarks */
.watermark-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1.3rem);
  color: #94a3b8;
  overflow: hidden;
  user-select: none;
}

/* Built-in Slide Card Footer (matching screenshot) */
.slide-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  user-select: none;
}

.slide-card-subindex {
  color: #6b7280;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.slide-card-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.slide-card-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent-lime);
  box-shadow: 0 0 6px var(--accent-lime);
  display: inline-block;
}

/* Cards & Flow Components */
.jev-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
  transition: all 0.2s ease;
}

.jev-card:hover {
  border-color: var(--border-active);
}

.jev-card-glow {
  border-color: var(--border-lime);
  box-shadow: 0 0 25px rgba(180, 243, 77, 0.08);
}

/* Callout Box inside Expert Section */
.expert-callout {
  background: rgba(0, 0, 0, 0.45);
  border-left: 3px solid var(--accent-lime);
  padding: 0.85rem 1.15rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

.expert-equation {
  font-family: var(--font-mono);
  background: #06070a;
  border: 1px solid #1f2533;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: #bbf451;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* Bottom Progress Bar */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(10, 11, 14, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 50;
}

@media (min-width: 768px) {
  .bottom-nav-bar {
    padding: 0 2rem;
  }
}

.progress-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-lime);
  transition: width 0.25s ease-out;
  box-shadow: 0 0 8px var(--accent-lime);
}

.nav-counter {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: all 0.2s ease;
}

.nav-dot.active {
  background: var(--accent-lime);
  box-shadow: 0 0 6px var(--accent-lime);
}

/* Control Buttons */
.btn-icon {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-active);
}

.btn-icon.active {
  background: var(--accent-lime-dim);
  color: var(--accent-lime);
  border-color: var(--accent-lime);
}

.btn-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-pill-lime {
  background: var(--accent-lime);
  color: #000000;
  border: none;
  font-weight: 700;
}
.btn-pill-lime:hover {
  background: #c3ff5e;
  box-shadow: 0 0 14px var(--accent-lime-glow);
}

/* View Mode Toggle Pill */
.mode-toggle-group {
  display: inline-flex;
  background: #11131a;
  border: 1px solid #1f2533;
  border-radius: 9999px;
  padding: 2px;
}

.mode-toggle-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
  border: none;
  background: transparent;
}

.mode-toggle-btn.active {
  background: var(--accent-lime);
  color: #000000;
  font-weight: 700;
}

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(92vw, 1150px);
  background: #0c0e14;
  border-left: 1px solid var(--border-active);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  .drawer-panel {
    width: 100vw;
    border-left: none;
  }
}

.drawer-active .drawer-backdrop {
  display: block;
  opacity: 1;
}

.drawer-active .drawer-panel {
  transform: translateX(0);
}

/* Progress bar inside cards */
.bar-track {
  background: #1c202a;
  border-radius: 4px;
  overflow: hidden;
  height: 9px;
  position: relative;
}

.bar-fill {
  background: var(--accent-lime);
  height: 100%;
  border-radius: 4px;
  transition: width 0.35s ease;
}

/* Slide Animations */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-in-next {
  animation: slideInRight 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-in-prev {
  animation: slideInLeft 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
