/* ===================================================
   3D Kart, Sınıf İçi Gizli Bakış (Stealth) ve Çizim Modalı
   =================================================== */

/* Kart Modalı Arka Planı */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 5, 25, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 15px;
  box-sizing: border-box;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Modal İçerik Kartı */
.card-modal-content {
  background: linear-gradient(145deg, #1E1035, #2B184C);
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(123, 44, 191, 0.3);
  width: 100%;
  max-width: 680px;
  max-height: 94vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .card-modal-content {
  transform: scale(1);
}

/* Modal Başlık ve Tur Bilgisi */
.turn-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
}

.team-badge-indicator {
  padding: 6px 18px;
  border-radius: 20px;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #FFFFFF;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.action-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 700;
  color: #FFE600;
}

/* 3D Kart Gösterim Alanı */
.card-perspective-container {
  perspective: 1200px;
  width: 280px;
  height: 400px;
  margin: 12px 0;
  position: relative;
}

.card-flipper {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-flipper.revealed {
  transform: rotateY(180deg);
}

/* Kart Yüzleri */
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  border: 3px solid #FFD166;
  box-sizing: border-box;
}

/* Kart Arka Kapağı (Sınıfın Gördüğü Kapalı Yüz) */
.card-back {
  background: radial-gradient(circle at center, #5A189A 0%, #240046 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #FFFFFF;
}

.card-back-pattern {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 2px dashed rgba(255, 209, 102, 0.4);
  border-radius: 12px;
  pointer-events: none;
}

.card-back .card-logo-mini {
  width: 180px;
  margin-bottom: 16px;
}

.card-back .secret-notice {
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #FFD166;
  line-height: 1.4;
  margin-top: 10px;
}

/* Kart Ön Yüzü (Deyim, Anlam, Çizim) */
.card-front {
  background: #FFFFFF;
  transform: rotateY(180deg);
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gizli Bakış (Hold-to-Peek) Butonu */
.stealth-button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  width: 100%;
}

.btn-stealth-peek {
  background: linear-gradient(135deg, #7B2CBF, #9D4EDD);
  color: #FFFFFF;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: 30px;
  border: 2px solid #FFD166;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(123, 44, 191, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.15s, background 0.2s;
}

.btn-stealth-peek:active, .btn-stealth-peek.holding {
  transform: scale(0.96);
  background: linear-gradient(135deg, #FF9E00, #FF6000);
}

.stealth-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

/* Süre Başlat & Kontrol Düğmeleri */
.round-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
}

.btn-game-primary {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-game-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-game-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #FFFFFF;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-game-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
}
