/* ===================================================
   Say It With Idioms - ULTRA DİNAMİK OYUN ANİMASYONLARI
   =================================================== */

/* Ekran Sarsıntısı (Screen Shake) */
@keyframes screenShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(-6px, 4px) rotate(-1deg); }
  30% { transform: translate(5px, -5px) rotate(1deg); }
  45% { transform: translate(-4px, -3px) rotate(-0.5deg); }
  60% { transform: translate(4px, 3px) rotate(0.5deg); }
  75% { transform: translate(-2px, 2px) rotate(0deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.shake-it {
  animation: screenShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Tur Başlangıç Mega Splash Banner'ı */
@keyframes splashSlideIn {
  0% {
    transform: translate(-50%, -50%) scale(0.3) rotate(-15deg);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1) rotate(3deg);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(0.98) rotate(-1deg);
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes splashFadeOut {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
}

.turn-splash-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.turn-splash-banner {
  padding: 24px 60px;
  border-radius: 40px;
  border: 4px solid #FFFFFF;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 40px currentColor;
  text-align: center;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  animation: splashSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.turn-splash-banner.closing {
  animation: splashFadeOut 0.4s ease-in forwards;
}

.turn-splash-title {
  font-size: 42px;
  font-weight: 900;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.turn-splash-sub {
  font-size: 20px;
  font-weight: 700;
  color: #FFE600;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* Gerçek 3D Parabolik Piyon Zıplama & Squash-Stretch */
@keyframes pawnHop3D {
  0% {
    transform: translateY(0) translateZ(0) scale(1, 1);
  }
  30% {
    transform: translateY(-46px) translateZ(65px) scale(0.85, 1.3);
  }
  65% {
    transform: translateY(-8px) translateZ(10px) scale(1.18, 0.84);
  }
  85% {
    transform: translateY(-2px) translateZ(2px) scale(0.97, 1.03);
  }
  100% {
    transform: translateY(0) translateZ(0) scale(1, 1);
  }
}

.pawn-token.hopping .pawn-3d-model {
  animation: pawnHop3D 0.38s cubic-bezier(0.2, 0.9, 0.35, 1.15);
}

/* Piyon Eğlenceli Tıklama / Sallanma Animasyonu */
@keyframes pawnWiggleAnim {
  0% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-14deg) scale(1.15) translateY(-6px); }
  40% { transform: rotate(12deg) scale(1.15) translateY(-6px); }
  60% { transform: rotate(-7deg) scale(1.08) translateY(-3px); }
  80% { transform: rotate(3deg) scale(1.04); }
  100% { transform: rotate(0deg) scale(1); }
}

.pawn-token.pawn-wiggle .pawn-3d-model {
  animation: pawnWiggleAnim 0.48s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Piyon Zemin Şok Dalgası (Shockwave Ring) */
@keyframes shockwaveExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 1;
    border-width: 6px;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
    border-width: 1px;
  }
}

.shockwave-ring {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border-style: solid;
  pointer-events: none;
  animation: shockwaveExpand 0.5s ease-out forwards;
  z-index: 90;
}

/* Piyon Adım Sayacı Balonu (+1, +2, +3 Pop) */
@keyframes stepPopNumber {
  0% {
    transform: translate(-50%, -100%) scale(0.4);
    opacity: 0;
  }
  40% {
    transform: translate(-50%, -160%) scale(1.3);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -210%) scale(1);
    opacity: 0;
  }
}

.step-pop-bubble {
  position: absolute;
  font-family: 'Fredoka', sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: #FFE600;
  text-shadow: 0 2px 6px #000, 0 0 10px #FF9000;
  pointer-events: none;
  animation: stepPopNumber 0.55s ease-out forwards;
  z-index: 200;
}

/* İsim Rozeti Süzülme Animasyonu */
@keyframes badgeBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.pawn-name-badge {
  animation: badgeBob 2s ease-in-out infinite;
}

/* Özel Kare Aksiyon Pop-up Efekti (Comic Popup) */
@keyframes comicPopIn {
  0% {
    transform: translate(-50%, -50%) scale(0.2) rotate(-12deg);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.15) rotate(4deg);
    opacity: 1;
  }
  80% {
    transform: translate(-50%, -50%) scale(0.95) rotate(-1deg);
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.comic-action-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1C0A35, #351368);
  border: 4px solid #FFD166;
  border-radius: 28px;
  padding: 24px 36px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 40px #FFD166;
  text-align: center;
  z-index: 4000;
  animation: comicPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  max-width: 500px;
  pointer-events: none;
}

.comic-popup-icon {
  font-size: 60px;
  margin-bottom: 8px;
}

.comic-popup-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 30px;
  font-weight: 900;
  color: #FFD166;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.comic-popup-desc {
  font-size: 16px;
  color: #FFFFFF;
  line-height: 1.4;
}

/* 3D Tahta Sahne Stilleri */
.board-viewport {
  perspective: 1300px;
  transition: perspective 0.5s ease;
}

.board-3d-active #board-container {
  transform: rotateX(20deg) scale(0.96);
  box-shadow: 
    0 1px 0 #2A0E44,
    0 3px 0 #250C3D,
    0 6px 0 #1E0A32,
    0 10px 0 #180828,
    0 15px 0 #12061F,
    0 22px 0 #0C0415,
    0 35px 50px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(255, 193, 7, 0.25);
  transition: transform 0.6s cubic-bezier(0.2, 0.85, 0.3, 1.15), box-shadow 0.6s;
}

/* 2D Düz Tahta */
.board-2d-active #board-container {
  transform: rotateX(0deg) scale(1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.6s cubic-bezier(0.2, 0.85, 0.3, 1.15), box-shadow 0.6s;
}

/* Sayaç Panik Kalp Atışı */
@keyframes panicPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.4)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 22px rgba(239, 68, 68, 1)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.4)); }
}

.timer-panic {
  animation: panicPulse 0.5s ease-in-out infinite !important;
  color: #EF4444 !important;
}

/* Arka Plan Yüzen Parıltı Yıldızları */
@keyframes floatAmbientStar {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
  50% { transform: translateY(-30px) rotate(180deg); opacity: 0.8; }
  100% { transform: translateY(0) rotate(360deg); opacity: 0.2; }
}

.ambient-star {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF885 0%, rgba(255,200,0,0) 70%);
  animation: floatAmbientStar 6s ease-in-out infinite;
  z-index: 1;
}

/* ===================================================
   Modal Giriş & Çıkış 3D Animasyonları
   =================================================== */

@keyframes modalEnterBounce {
  0% {
    transform: scale(0.35) rotate(-6deg) translateY(-80px);
    opacity: 0;
    filter: blur(10px);
  }
  60% {
    transform: scale(1.05) rotate(1.5deg) translateY(6px);
    opacity: 1;
    filter: blur(0px);
  }
  80% {
    transform: scale(0.98) rotate(-0.5deg) translateY(-2px);
  }
  100% {
    transform: scale(1) rotate(0deg) translateY(0);
    opacity: 1;
  }
}

@keyframes modalExitFly {
  0% {
    transform: scale(1) rotate(0deg) translateY(0);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: scale(0.6) rotate(-8deg) translateY(120px);
    opacity: 0;
    filter: blur(12px);
  }
}

@keyframes modalExitBlast {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0);
  }
  40% {
    transform: scale(1.15) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: scale(2.2) rotate(-6deg);
    opacity: 0;
    filter: blur(18px);
  }
}

.modal-enter {
  animation: modalEnterBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

.card-modal-content.closing,
.modal-animated-content.closing,
.setup-box.closing {
  animation: modalExitFly 0.36s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.setup-box.blast-exit {
  animation: modalExitBlast 0.48s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.modal-overlay.closing {
  transition: opacity 0.36s ease-in;
  opacity: 0 !important;
}

/* Anti-Cheat Kilitli Buton Stilleri */
.btn-locked-anticheat {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background: linear-gradient(135deg, #4A5568, #2D3748) !important;
  border-color: #718096 !important;
  color: #A0AEC0 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(0.6);
}

.btn-locked-anticheat:hover {
  transform: none !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5) !important;
}

.anticheat-warning-box {
  background: rgba(239, 68, 68, 0.2);
  border: 2px dashed #EF4444;
  color: #FECACA;
  font-weight: 800;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 14px;
  margin: 6px auto;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 90%;
  animation: panicPulse 1.5s infinite;
}

/* ===================================================
   Oyun Yükleme / Intro Splash Screen
   =================================================== */

.intro-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #2B1055 0%, #0F051D 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow: hidden;
}

.intro-splash-screen.closing {
  animation: modalExitBlast 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

.splash-logo-container {
  position: relative;
  margin-bottom: 24px;
  animation: splashLogoFloat 3s ease-in-out infinite;
}

@keyframes splashLogoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-12px) rotate(1deg) scale(1.03); }
}

.splash-logo-img {
  width: min(520px, 85vw);
  height: auto;
  filter: drop-shadow(0 15px 35px rgba(255, 200, 0, 0.55));
}

.splash-progress-wrapper {
  width: min(420px, 80vw);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 209, 102, 0.4);
  border-radius: 20px;
  padding: 4px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.splash-progress-bar {
  height: 16px;
  width: 0%;
  border-radius: 14px;
  background: linear-gradient(90deg, #10B981, #FFD166, #EF4444);
  background-size: 200% 100%;
  animation: progressStripes 1.5s linear infinite;
  transition: width 0.3s ease-out;
}

@keyframes progressStripes {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.splash-subtitle {
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #FFD166;
  letter-spacing: 1px;
  margin-bottom: 20px;
  text-align: center;
}

/* Yan Takım HUD Kartları (Side Team Cards) */
.side-team-hud-left,
.side-team-hud-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
  pointer-events: auto;
}

.side-team-hud-left {
  left: 14px;
}

.side-team-hud-right {
  right: 14px;
}

.side-team-card {
  background: rgba(24, 9, 52, 0.88);
  backdrop-filter: blur(12px);
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 16px 20px;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  transform: none !important; /* Ekranın ortasına doğru büyüme veya kayma yapmaz, sabit durur */
}

.side-team-card.is-active-turn {
  border-color: #FFD166 !important;
  box-shadow: 0 0 25px var(--team-glow, rgba(255, 209, 102, 0.8)), 0 10px 35px rgba(0, 0, 0, 0.8);
  animation: sideCardGlowAura 2s ease-in-out infinite alternate;
}

@keyframes sideCardGlowAura {
  0% { box-shadow: 0 0 16px var(--team-glow, #FFD166), 0 8px 25px rgba(0, 0, 0, 0.7); }
  100% { box-shadow: 0 0 36px var(--team-glow, #FFD166), 0 14px 40px rgba(0, 0, 0, 0.9); }
}

.side-team-pawn-preview {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 3px solid #FFFFFF;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.side-team-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 19px;
  font-weight: 900;
  color: #FFFFFF;
  text-align: center;
}

.side-team-space {
  font-size: 14px;
  font-weight: 800;
  color: #FFD166;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 12px;
}

.side-turn-tag {
  font-family: 'Fredoka', sans-serif;
  font-size: 13px;
  font-weight: 900;
  color: #1A0A3A;
  background: #FFE600;
  padding: 4px 12px;
  border-radius: 14px;
  letter-spacing: 0.5px;
  animation: panicPulse 1s infinite;
}

/* Buton Işıltı / Parlama Geçiş Animasyonu (Shimmer Sweep) */
@keyframes btnShimmerSweep {
  0% { left: -100%; opacity: 0; }
  15% { opacity: 0.8; }
  50% { left: 160%; opacity: 0; }
  100% { left: 160%; opacity: 0; }
}

.btn-roll-master, .btn-game-primary, .btn-action-tile {
  position: relative;
  overflow: hidden;
}

.btn-roll-master::before, .btn-game-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-25deg);
  animation: btnShimmerSweep 3s infinite ease-in-out;
  pointer-events: none;
}

/* Arka Planda Yüzen Renkli Oyun Simgeleri */
.floating-bg-icon {
  position: fixed;
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.4));
  animation: floatDrift 14s ease-in-out infinite alternate;
}

@keyframes floatDrift {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.9); }
  50% { transform: translate(25px, -35px) rotate(15deg) scale(1.1); }
  100% { transform: translate(-20px, -60px) rotate(-15deg) scale(0.95); }
}


