/* ==========================================================================
   MANIFEST — TOZ PEMBE ÖZEL MODU STİLLERİ
   ========================================================================== */

/* 1. MANIFEST BUTONLARI */
.btn-manifest-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(244, 114, 182, 0.35));
  color: #fff;
  border: 1px solid #f472b6;
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.3), inset 0 0 8px rgba(244, 114, 182, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-manifest-toggle:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(244, 114, 182, 0.5));
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.55), inset 0 0 12px rgba(244, 114, 182, 0.3);
  transform: translateY(-1px);
}

.btn-manifest-toggle:active {
  transform: translateY(0);
}

.btn-manifest-toggle .manifest-sparkle {
  display: inline-block;
  animation: manifestSparklePulse 2s infinite ease-in-out;
}

@keyframes manifestSparklePulse {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 2px #fff); }
  50% { transform: scale(1.25) rotate(12deg); filter: drop-shadow(0 0 6px #f472b6); }
}

.nav-item.manifest-nav-btn {
  border: 1px dashed rgba(244, 114, 182, 0.5) !important;
  color: #f472b6 !important;
}

.nav-item.manifest-nav-btn:hover {
  background: rgba(244, 114, 182, 0.15) !important;
  color: #fff !important;
}

/* 2. PEMBE TEMA OVERRIDE (Aktifken geçici uygulanır) */
[data-manifest="true"] {
  --bg-primary: #140312 !important;
  --bg-secondary: #1f051c !important;
  --bg-card: rgba(244, 114, 182, 0.08) !important;
  --bg-card-hover: rgba(244, 114, 182, 0.14) !important;
  --accent: #f472b6 !important;
  --accent-rgb: 244, 114, 182 !important;
  --accent-cyan: #fb7185 !important;
  --accent-magenta: #ec4899 !important;
  --accent-glow: rgba(244, 114, 182, 0.35) !important;
  --border-subtle: rgba(244, 114, 182, 0.22) !important;
  --border-accent: rgba(244, 114, 182, 0.55) !important;
  --text-primary: #fff1f2 !important;
  --text-secondary: #fda4af !important;
  --text-muted: rgba(253, 164, 175, 0.7) !important;
}

[data-manifest="true"] body {
  background-color: #140312 !important;
  color: #fff1f2 !important;
}

[data-manifest="true"] .card,
[data-manifest="true"] .terminal-window,
[data-manifest="true"] .daily-quote-card,
[data-manifest="true"] .player-container,
[data-manifest="true"] .experiment-card,
[data-manifest="true"] .project-card,
[data-manifest="true"] .top-hud,
[data-manifest="true"] .floating-nav {
  background: rgba(28, 6, 25, 0.85) !important;
  border-color: rgba(244, 114, 182, 0.28) !important;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.15) !important;
}

[data-manifest="true"] .btn-cyber-primary {
  background: linear-gradient(135deg, #ec4899, #f472b6) !important;
  color: #fff !important;
  border-color: #f472b6 !important;
  box-shadow: 0 0 15px rgba(244, 114, 182, 0.4) !important;
}

[data-manifest="true"] .text-cyan,
[data-manifest="true"] .text-magenta {
  color: #f472b6 !important;
  text-shadow: 0 0 8px rgba(244, 114, 182, 0.4) !important;
}

/* 3. DİSKO / PARTİ IŞIK EFEKTLERİ */
#manifest-disco-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 990;
  overflow: hidden;
  opacity: 0.75;
  mix-blend-mode: screen;
  will-change: opacity, transform;
  background:
    radial-gradient(circle at 20% 25%, rgba(244, 114, 182, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 35%, rgba(236, 72, 153, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 45% 85%, rgba(251, 113, 133, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(244, 63, 94, 0.12) 0%, transparent 40%);
  animation: manifestDiscoSweep 10s ease-in-out infinite alternate;
}

@keyframes manifestDiscoSweep {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.08) rotate(3deg);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.02) rotate(-2deg);
    opacity: 0.7;
  }
}

/* 4. KARE VİDEO KONTEYNERI (ASPECT-RATIO: 1 / 1 & OBJECT-FIT: CONTAIN) */
#manifest-floating-video {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 998;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 2px solid rgba(244, 114, 182, 0.85);
  box-shadow:
    0 12px 35px rgba(236, 72, 153, 0.45),
    0 0 25px rgba(244, 114, 182, 0.35),
    inset 0 0 15px rgba(244, 114, 182, 0.2);
  background: #000;
  overflow: hidden;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: box-shadow 0.3s ease;
}

/* Video boyutu: Viewport'a göre responsive, asla tüm ekranı kaplamaz */
@media (min-width: 769px) {
  #manifest-floating-video {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 768px) and (min-width: 481px) {
  #manifest-floating-video {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 480px) {
  #manifest-floating-video {
    width: 115px;
    height: 115px;
  }
}

@media (max-width: 360px) {
  #manifest-floating-video {
    width: 100px;
    height: 100px;
  }
}

#manifest-floating-video video {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain; /* Video kare değilse tamamı görünsün, kırpılmasın */
  display: block;
  background: #000;
  border-radius: 14px;
}

/* 5. MANIFEST MODUNDAN ÇIKMA BUTONU */
#btn-manifest-exit {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1001;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #db2777, #f472b6);
  color: #ffffff;
  border: 1px solid #fff;
  border-radius: 30px;
  padding: 8px 18px;
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(219, 39, 119, 0.6), 0 0 10px rgba(244, 114, 182, 0.4);
  transition: all 0.2s ease;
  animation: manifestExitGlow 2.5s infinite alternate ease-in-out;
}

#btn-manifest-exit:hover {
  background: linear-gradient(135deg, #be185d, #ec4899);
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(219, 39, 119, 0.8);
}

#btn-manifest-exit:active {
  transform: scale(0.98);
}

@keyframes manifestExitGlow {
  0% { box-shadow: 0 4px 15px rgba(219, 39, 119, 0.5); }
  100% { box-shadow: 0 6px 25px rgba(244, 114, 182, 0.8), 0 0 15px rgba(255, 255, 255, 0.5); }
}

/* 6. AUTOPLAY FALLBACK PROMPT */
#manifest-autoplay-prompt {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(28, 6, 25, 0.95);
  border: 1.5px solid #f472b6;
  border-radius: 30px;
  padding: 10px 22px;
  color: #fff1f2;
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.5);
  cursor: pointer;
  animation: manifestBounceIn 0.4s ease-out;
}

#manifest-autoplay-prompt:hover {
  background: #db2777;
  color: #fff;
}

@keyframes manifestBounceIn {
  0% { opacity: 0; transform: translate(-50%, 20px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

/* 7. PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
  #manifest-disco-overlay {
    animation: none !important;
    opacity: 0.3 !important;
  }
  .btn-manifest-toggle .manifest-sparkle {
    animation: none !important;
  }
  #manifest-floating-video {
    transition: none !important;
  }
  #btn-manifest-exit {
    animation: none !important;
  }
}
