/* mkago.in — YouTube Shorts / Instagram Reels Dark & Vibrant UI */
:root {
  --bg-deep: #05050a;
  --bg-card: #11111d;
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-amber: #fbbf24;
  --accent-emerald: #10b981;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-deep);
  color: #f8fafc;
  font-family: 'Noto Sans Malayalam', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

/* Desktop Ambient Stage & Mobile Full-Screen Viewport */
.reels-stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.22), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.18), transparent 45%),
    #05050a;
}

.reels-phone-frame {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-width: 440px;
  background: #090910;
  overflow: hidden;
}

@media (min-width: 640px) {
  .reels-phone-frame {
    height: min(94dvh, 860px);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
      0 25px 70px -15px rgba(0, 0, 0, 0.85),
      0 0 0 1px rgba(139, 92, 246, 0.25);
  }
}

/* Vertical Snap-Scroll Feed (Shorts/Reels) */
.reels-feed {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.reels-feed::-webkit-scrollbar {
  display: none;
}

.reel-slide {
  position: relative;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #090910;
}

.reel-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 6s ease-out;
}

.reel-slide.is-active .reel-poster-img {
  transform: scale(1.06);
}

.reel-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 10, 0.78) 0%, rgba(5, 5, 10, 0.12) 26%, rgba(5, 5, 10, 0.18) 52%, rgba(5, 5, 10, 0.94) 88%, rgba(5, 5, 10, 0.99) 100%);
  pointer-events: none;
}

/* Glassmorphic Pills & Action Rail Buttons */
.glass-pill {
  background: rgba(10, 10, 18, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.rail-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 22, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transition: transform 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.rail-btn:hover {
  background: rgba(139, 92, 246, 0.55);
  transform: scale(1.08);
}

.rail-btn:active {
  transform: scale(0.92);
}

/* Glowing Primary Reels Play CTA */
.play-cta-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 55%, #ec4899 100%);
  color: #09090b;
  box-shadow: 0 10px 30px -6px rgba(249, 115, 22, 0.65);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.play-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -6px rgba(236, 72, 153, 0.75);
}

.play-cta-btn:active {
  transform: scale(0.96);
}

/* Swipe-Up Hint Animation */
@keyframes floatUp {
  0%, 100% { transform: translateY(0); opacity: 0.75; }
  50% { transform: translateY(-6px); opacity: 1; }
}

.swipe-hint {
  animation: floatUp 1.8s ease-in-out infinite;
}

/* Dark Interactive Player Overlay */
.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: #0a0a14;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.5) transparent;
}

/* Balarama Comic Story Card (Inside Dark Player) */
.comic-panel {
  border: 3px solid #111827;
  border-radius: 1.25rem;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.65);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.comic-panel.reading-active {
  box-shadow: 0 0 0 3px #fbbf24, 0 14px 34px rgba(251, 191, 36, 0.35);
}

.speech-bubble {
  position: relative;
  background: #ffffff;
  color: #0f172a;
  border: 2.5px solid #111827;
  border-radius: 1.1rem;
  padding: 0.9rem 1.05rem;
  box-shadow: 3px 3px 0 #111827;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 24px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-left: 2.5px solid #111827;
  border-top: 2.5px solid #111827;
  transform: rotate(45deg);
}

/* Neon 3D Arcade Word Scramble Tiles */
.letter-tile {
  min-width: 2.85rem;
  height: 3.1rem;
  border-radius: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.55);
  font-weight: 900;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, background-color 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.letter-tile:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}

/* Dark Mode Match Game Cards */
.match-item {
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.95rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.match-item.selected {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
}

.match-item.matched {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  pointer-events: none;
}

.match-item.wrong-flash {
  animation: shake 0.35s ease;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.22);
}

/* Dark Mode Quiz Option Buttons */
.quiz-option {
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  transition: all 0.16s ease;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
}

.quiz-option:hover:not(:disabled) {
  border-color: #a78bfa;
  background: rgba(139, 92, 246, 0.18);
}

.quiz-option.opt-correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.24);
  color: #a7f3d0;
}

.quiz-option.opt-wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.24);
  color: #fecaca;
}

/* Dark Mode AdSense Native Slot */
.ad-slot-dark {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #94a3b8;
}

/* Confetti Particle */
.confetti-piece {
  position: fixed;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  z-index: 999;
  pointer-events: none;
  animation: confettiFall 1.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes confettiFall {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(540deg) scale(0.5); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.94) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-pop {
  animation: popIn 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
