/* ========== ROOT VARIABLES ========== */
:root {
  --bg: #fafaf8;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --ink-dim: #4a4a4a;
  --muted: #8a8a8a;
  --accent: #06b6d4;
  --accent2: #8b5cf6;
  --like: #16a34a;
  --love: #ec4899;
  --dislike: #dc2626;
  --border: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(6, 182, 212, 0.25);
  --side-gap: clamp(8px, 3vw, 24px);
}

/* ========== RESET ========== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

#mctv-app {
  background: transparent !important;
  width: 100%;
  height: 100%;
}

/* ========== SCROLLBAR HIDE ========== */
#mctv-feed {
  scrollbar-width: none;
}

#mctv-feed::-webkit-scrollbar {
  display: none;
}

/* ========== DARK MODE ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --paper: #0f1530;
    --ink: #f1f5f9;
    --ink-dim: #cbd5e1;
    --muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(6, 182, 212, 0.2);
  }
}

/* ========== ANIMATIONS ========== */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== PERFORMANCE ========== */
#mctv-feed {
  will-change: scroll-position;
  contain: content;
  perspective: 1000px;
}

/* ========== UTILITY CLASSES ========== */
.mctv-container {
  position: relative;
  height: 100svh;
  width: 100%;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.section-card {
  position: relative;
  height: 100svh;
  width: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.02), rgba(139, 92, 246, 0.01));
  border-bottom: 1px solid var(--border);
  padding-inline: var(--side-gap);
}

.section-content {
  position: relative;
  width: 100%;
  max-width: 1024px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: clamp(12px, 4vh, 28px);
  z-index: 2;
}

/* ========== MOBILE RESPONSIVENESS ========== */
@media (max-width: 640px) {
  :root {
    --side-gap: 12px;
  }

  .section-card {
    padding-inline: var(--side-gap);
  }
}

@media (max-width: 768px) {
  .shop-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ========== SCROLLING ========== */
html {
  scroll-behavior: smooth;
}

/* ========== TEXT SELECTION ========== */
::selection {
  background: rgba(6, 182, 212, 0.2);
  color: var(--ink);
}

::-moz-selection {
  background: rgba(6, 182, 212, 0.2);
  color: var(--ink);
}

/* ========== FOCUS VISIBLE ========== */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========== PERFORMANCE: CONTAIN ========== */
section {
  contain: layout style paint;
}

iframe {
  display: block;
}

/* ========== VENDOR PREFIXES ========== */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari */
  #mctv-feed {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
}
