/* PartyHub — ince ayarlar & Tailwind'in kapsamadığı detaylar */

html, body {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

/* Zemin: düz koyu rengin üstüne, marka renklerinden yumuşak, sabit
   (scroll ile hareket etmeyen) ışık lekeleri — derinlik hissi verir ama
   dikkat dağıtmaz. */
body {
  background-color: #120E29;
  background-image:
    radial-gradient(60% 40% at 15% 0%, rgba(255, 61, 129, 0.16) 0%, transparent 60%),
    radial-gradient(50% 35% at 100% 12%, rgba(47, 230, 167, 0.12) 0%, transparent 60%),
    radial-gradient(45% 30% at 50% 100%, rgba(255, 201, 60, 0.09) 0%, transparent 65%);
  background-attachment: fixed;
}

* {
  -webkit-font-smoothing: antialiased;
}

/* Odak durumlarını (klavye erişilebilirliği) her yerde görünür tut */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid #FFC93C;
  outline-offset: 2px;
}

#topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* "Pass the phone" imza öğesi: oyuncu halkası etrafındaki dönen ok */
.holder-ring {
  position: relative;
}
.holder-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 2px dashed rgba(255, 201, 60, 0.55);
  animation: spin 6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Basit sayfa geçiş efekti */
.screen-enter {
  animation: floatCard 0.35s ease-out both;
}

/* Rol kartı: tıklanana kadar gizli tutulan kabartma his */
.role-card {
  background: radial-gradient(120% 140% at 50% 0%, #2A2160 0%, #1C1640 60%);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Zaman Bombası - kritik saniyelerde ekranın nabzı */
.pulse-danger {
  animation: pulseDanger 0.6s ease-in-out infinite;
}
@keyframes pulseDanger {
  0%, 100% { background-color: rgba(255, 82, 82, 0.08); }
  50% { background-color: rgba(255, 82, 82, 0.22); }
}

/* Paranoya — yazı tura animasyonu */
.coin {
  width: 84px;
  height: 84px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(145deg, #FFC93C, #FF3D81);
  box-shadow: 0 10px 30px -8px rgba(255, 61, 129, 0.6);
}
.coin-flip {
  animation: coinFlip 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes coinFlip {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(720deg) scale(1.15); }
  100% { transform: rotateY(1080deg) scale(1); }
}

/* Alnına Yapıştır — doğru/pas geçiş flaşı */
.flash-correct { animation: flashGreen 0.4s ease-out; }
.flash-pass { animation: flashAmber 0.4s ease-out; }
@keyframes flashGreen {
  0% { background-color: rgba(47, 230, 167, 0.35); }
  100% { background-color: transparent; }
}
@keyframes flashAmber {
  0% { background-color: rgba(255, 201, 60, 0.3); }
  100% { background-color: transparent; }
}

/* Konfeti (kazanma anları) — bkz. UIHelpers.confetti() */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 60;
}
.confetti-piece {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.9;
  animation-name: confettiFall;
  animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation-fill-mode: forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 0.95; }
  100% { transform: translateY(115vh) rotate(540deg); opacity: 0; }
}

/* Basit modal sistemi — bkz. UIHelpers.showModal() */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(6, 4, 18, 0.72);
  backdrop-filter: blur(2px);
  transition: opacity 0.2s ease;
  padding: 0 16px;
}
.modal-hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 78vh;
  overflow-y: auto;
  background: #1C1640;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  margin-bottom: 0;
  animation: modalSlideUp 0.25s ease-out both;
}
@media (min-width: 480px) {
  .modal-overlay { align-items: center; }
  .modal-card { border-radius: 24px; margin-bottom: 24px; }
}
@keyframes modalSlideUp {
  0% { transform: translateY(24px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.modal-card h4 {
  font-weight: 600;
  color: #F5F3FF;
  margin-top: 12px;
  margin-bottom: 4px;
}
.modal-card ol, .modal-card ul {
  padding-left: 1.1em;
  margin: 4px 0;
}
.modal-card li {
  margin-bottom: 4px;
}

/* Çark Çevir: Doğruluk mu Cesaret mi? — dokunmatik çark düğmesi */
.wheel-dial {
  width: 132px;
  height: 132px;
  border-radius: 9999px;
  background: conic-gradient(
    #FF3D81 0deg 60deg, #2FE6A7 60deg 120deg,
    #FF3D81 120deg 180deg, #2FE6A7 180deg 240deg,
    #FF3D81 240deg 300deg, #2FE6A7 300deg 360deg
  );
  padding: 6px;
  box-shadow: 0 14px 34px -10px rgba(255, 61, 129, 0.45);
}
.wheel-dial-inner {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: #1C1640;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.wheel-spin {
  animation: wheelSpin 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}
@keyframes wheelSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(900deg); }
}

/* Kaydırma çubuğunu sessizce gizle (mobilde zaten gizli) */
::-webkit-scrollbar { width: 0px; height: 0px; }

/* Hareketi azaltma tercihine saygı */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
