/* ═══════════════════════════════════════ */
/* INTENTRA CAROUSEL VIEWER               */
/* Design System: Locked                  */
/* ═══════════════════════════════════════ */

:root {
  --bg: #0B0B0F;
  --surface: #171717;
  --primary: #7C3AED;
  --primary-light: #8B5CF6;
  --primary-dark: #6D28D9;
  --text: #FFFFFF;
  --text-secondary: #A1A1AA;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --border: #27272A;
  --surface-hover: #1F1F23;
  --radius: 12px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════ */
/* LAYOUT                                  */
/* ═══════════════════════════════════════ */

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark svg {
  width: 18px;
  height: 18px;
  color: white;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.category-tab {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.category-tab:hover {
  color: var(--text);
  border-color: var(--text-secondary);
}

.category-tab.active {
  color: var(--text);
  background: var(--primary);
  border-color: var(--primary);
}

/* Carousel List */
.carousel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.carousel-list::-webkit-scrollbar {
  width: 4px;
}

.carousel-list::-webkit-scrollbar-track {
  background: transparent;
}

.carousel-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.carousel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.carousel-item:hover {
  background: var(--surface-hover);
}

.carousel-item.active {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.carousel-item-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  border-radius: 6px;
}

.carousel-item.active .carousel-item-number {
  background: var(--primary);
  color: var(--text);
}

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

.carousel-item-topic {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.carousel-item-category {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ═══════════════════════════════════════ */
/* MAIN CONTENT                            */
/* ═══════════════════════════════════════ */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.carousel-nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.carousel-nav-btn:hover {
  color: var(--text);
  border-color: var(--text-secondary);
}

.carousel-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.carousel-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kbd-hint {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
}

/* ═══════════════════════════════════════ */
/* SLIDE VIEWER                            */
/* ═══════════════════════════════════════ */

.viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
  position: relative;
}

.slide-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1080 / 1350;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 25px 50px -12px rgba(0,0,0,0.6);
}

.slide-wrapper {
  display: flex;
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 10%;
  position: relative;
  overflow: hidden;
  user-select: none;
}

/* Slide Types */
.slide--hook {
  background: var(--bg);
}

.slide--hook::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.slide--hook::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.slide--content {
  background: var(--surface);
}

.slide--cta {
  background: var(--bg);
  align-items: center;
  text-align: center;
}

.slide--cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 60%);
  pointer-events: none;
}

/* Slide Content Elements */
.slide-accent {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.slide-hook-text {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  position: relative;
  z-index: 1;
  max-width: 95%;
}

.slide-brand-watermark {
  position: absolute;
  bottom: 8%;
  right: 8%;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.08em;
  z-index: 1;
}

.slide-number {
  font-size: 64px;
  font-weight: 800;
  color: rgba(124,58,237,0.12);
  position: absolute;
  top: 8%;
  right: 8%;
  line-height: 1;
  letter-spacing: -0.04em;
}

.slide-icon-container {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124,58,237,0.12);
  border-radius: 12px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.slide-icon-container svg {
  width: 24px;
  height: 24px;
  color: var(--primary-light);
}

.slide-content-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.slide-content-text {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  position: relative;
  z-index: 1;
  max-width: 90%;
}

.slide-content-divider {
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

/* CTA Slide */
.slide-cta-question {
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.slide-cta-divider {
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.slide-cta-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.slide-cta-brand {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  letter-spacing: 0.02em;
  z-index: 1;
}

/* Visual decoration elements */
.slide-geo {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.slide-geo--circle {
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 50%;
}

.slide-geo--line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.15), transparent);
}

.slide-geo--dot {
  width: 4px;
  height: 4px;
  background: rgba(124,58,237,0.2);
  border-radius: 50%;
}

/* ═══════════════════════════════════════ */
/* SLIDE DOTS / PROGRESS                   */
/* ═══════════════════════════════════════ */

.slide-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.slide-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

.slide-counter {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Slide navigation arrows */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,11,15,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
}

.slide-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.slide-nav--prev {
  left: -56px;
}

.slide-nav--next {
  right: -56px;
}

.slide-nav svg {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════ */
/* CAPTION SECTION                         */
/* ═══════════════════════════════════════ */

.caption-section {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 32px;
  max-height: 180px;
  overflow-y: auto;
}

.caption-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.caption-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.copy-btn:hover {
  background: var(--primary-light);
}

.copy-btn.copied {
  background: var(--success);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.caption-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
}

.caption-hashtags {
  font-size: 13px;
  color: var(--primary-light);
  line-height: 1.6;
}

/* ═══════════════════════════════════════ */
/* MOBILE SIDEBAR TOGGLE                   */
/* ═══════════════════════════════════════ */

.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.mobile-toggle svg {
  width: 20px;
  height: 20px;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 49;
}

/* ═══════════════════════════════════════ */
/* RESPONSIVE                              */
/* ═══════════════════════════════════════ */

@media (max-width: 1024px) {
  .mobile-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    bottom: 0;
    z-index: 50;
    transition: left 300ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.open {
    left: 0;
  }

  .overlay.open {
    display: block;
  }

  .viewer {
    padding: 20px 16px;
  }

  .slide-container {
    max-width: 380px;
  }

  .slide-nav--prev {
    left: -44px;
  }

  .slide-nav--next {
    right: -44px;
  }

  .top-bar {
    padding: 16px 16px 16px 64px;
  }

  .caption-section {
    padding: 16px;
  }

  .kbd-hint {
    display: none;
  }
}

@media (max-width: 600px) {
  .slide-container {
    max-width: 300px;
  }

  .slide-nav--prev,
  .slide-nav--next {
    display: none;
  }

  .slide-hook-text {
    font-size: 24px;
  }

  .slide-content-text {
    font-size: 14px;
  }

  .slide-cta-question {
    font-size: 18px;
  }
}

/* ═══════════════════════════════════════ */
/* TOUCH SWIPE HINT                        */
/* ═══════════════════════════════════════ */

.swipe-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
  pointer-events: none;
}

/* ═══════════════════════════════════════ */
/* ANIMATIONS                              */
/* ═══════════════════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 300ms ease forwards;
}

/* Scrollbar styling */
.caption-section::-webkit-scrollbar {
  width: 4px;
}

.caption-section::-webkit-scrollbar-track {
  background: transparent;
}

.caption-section::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
