:root {
  --bg-sky: radial-gradient(circle at 50% 15%, #bae6fd 0%, #e0f2fe 30%, #fbcfe8 70%, #f472b6 100%);
  --candy-pink: #ec4899;
  --candy-gold: #facc15;
  --dark-glass: rgba(15, 23, 42, 0.94);
  --card-glass: rgba(255, 255, 255, 0.72);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 100DVH KESİN MOBİL PORTRAIT KİLİDİ (Taşma Yok, Kaydırma Yok) */
html, body {
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-sky);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ARKA PLAN BULUT ANİMASYONLARI */
.clouds-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  filter: blur(12px);
}

.cloud-1 {
  width: 220px;
  height: 80px;
  top: 8%;
  left: -10%;
  animation: floatCloud 35s infinite linear;
}

.cloud-2 {
  width: 280px;
  height: 90px;
  top: 25%;
  right: -15%;
  animation: floatCloudRev 45s infinite linear;
}

.cloud-3 {
  width: 180px;
  height: 60px;
  top: 60%;
  left: 20%;
  animation: floatCloud 50s infinite linear;
}

@keyframes floatCloud {
  0% { transform: translateX(-150px); }
  100% { transform: translateX(110vw); }
}

@keyframes floatCloudRev {
  0% { transform: translateX(150px); }
  100% { transform: translateX(-110vw); }
}

/* ==========================================================================
   1. MİNİMAL VE MOBİL UYUMLU ÜST BAR
   ========================================================================== */
.app-header {
  height: 48px;
  min-height: 48px;
  width: 100%;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 50;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Oyun Seçici Sekmeler */
.game-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-btn {
  background: transparent;
  border: none;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #0f172a;
}

.tab-btn.active {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.tab-btn.bj-active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

@media (max-width: 520px) {
  .tab-text-full, .xray-text-full {
    display: none !important;
  }
  .tab-text-short, .xray-text-short {
    display: inline !important;
  }
}

.badge-edu {
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #831843;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-btn:hover {
  transform: translateY(-1px);
}

.btn-xray {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  border: 1px solid #60a5fa;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* ==========================================================================
   2. MERKEZ OYUN SAHNESİ
   ========================================================================== */
.game-section {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.main-stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  min-height: 0;
  overflow: hidden;
}

/* ==========================================================================
   SWEET BONANZA SLOT KABİNİ (6x5 Grid)
   ========================================================================== */
.slot-cabinet {
  position: relative;
  width: min(95vw, 540px);
  max-height: calc(100dvh - 195px);
  aspect-ratio: 6 / 5;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(254, 240, 245, 0.82) 100%);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 
    0 12px 35px rgba(236, 72, 153, 0.25),
    0 0 0 4px #f43f5e,
    inset 0 0 20px rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
}

/* Şeker Kamışı Çerçevesi */
.candy-frame-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 5px solid transparent;
  border-image: repeating-linear-gradient(45deg, #ef4444 0, #ef4444 10px, #ffffff 10px, #ffffff 20px) 5;
  border-radius: 20px;
  pointer-events: none;
  z-index: 5;
}

/* 6x5 Şeker Gridi */
.grid-columns {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(5, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.slot-col {
  display: contents;
}

.slot-cell {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.candy-svg {
  width: min(48px, 86%);
  height: min(48px, 86%);
  object-fit: contain;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.15));
}

/* Eşleşen Şekerler Parlaması */
.matched-cell {
  background: radial-gradient(circle, rgba(250, 204, 21, 0.65) 0%, rgba(245, 158, 11, 0.3) 100%) !important;
  border-color: #facc15 !important;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.8) !important;
}

.pop-out {
  animation: candyExplode 0.45s ease-out forwards;
}

@keyframes candyExplode {
  0% { transform: scale(1); }
  40% { transform: scale(1.35) rotate(15deg); filter: brightness(1.4); }
  100% { transform: scale(0) rotate(-30deg); opacity: 0; }
}

/* Lolipop Scatter ve Bomba Animasyonları */
.scatter-cell {
  background: radial-gradient(circle, rgba(244, 114, 182, 0.4) 0%, rgba(255, 255, 255, 0.6) 100%);
  animation: pulseScatter 0.8s infinite alternate;
}

@keyframes pulseScatter {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 8px #ec4899); }
}

.bomb-cell {
  background: radial-gradient(circle, rgba(254, 240, 138, 0.5) 0%, rgba(239, 68, 68, 0.3) 100%);
  animation: pulseBomb 0.4s infinite alternate;
}

@keyframes pulseBomb {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 12px #ef4444); }
}

/* Ekran Sarsıntı Efekti (Haptic Shake) */
@keyframes screenShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-4px, 2px) rotate(-0.5deg); }
  40% { transform: translate(4px, -3px) rotate(0.5deg); }
  60% { transform: translate(-3px, -2px) rotate(-0.3deg); }
  80% { transform: translate(3px, 2px) rotate(0.3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.shake-active {
  animation: screenShake 0.4s ease-in-out;
}

/* Bomba Şok Dalgası */
@keyframes shockwaveRing {
  0% { transform: scale(0.2); opacity: 1; border-width: 8px; }
  100% { transform: scale(2.6); opacity: 0; border-width: 1px; }
}

.bomb-shockwave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  margin-top: -65px;
  margin-left: -65px;
  border-radius: 50%;
  border: 4px solid #facc15;
  box-shadow: 0 0 30px #f59e0b, inset 0 0 20px #fde047;
  pointer-events: none;
  z-index: 95;
  animation: shockwaveRing 0.75s ease-out forwards;
}

/* Uçuşan Kazanç Rakamları (+160 ₺) */
.floating-wins-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 80;
}

.floating-win-text {
  position: absolute;
  font-size: 1.3rem;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7), -1px -1px 0 #000, 1px 1px 0 #000;
  animation: floatUpFade 1.2s forwards ease-out;
}

@keyframes floatUpFade {
  0% { transform: translateY(0) scale(0.7); opacity: 0; }
  25% { transform: translateY(-15px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-40px) scale(1); opacity: 0; }
}

/* Büyük Kazanç / Çarpan Bildirim Panosu */
.big-win-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, #fde047 0%, #f59e0b 60%, #b45309 100%);
  border: 4px solid #fff;
  border-radius: 20px;
  padding: 12px 24px;
  text-align: center;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.85), 0 10px 25px rgba(0,0,0,0.5);
  z-index: 100;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: min(90%, 360px);
}

.big-win-banner.active {
  transform: translate(-50%, -50%) scale(1);
}

.big-win-text {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.big-win-amount {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 3px 6px rgba(0,0,0,0.6);
  margin: 2px 0;
}

.big-win-sub {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  opacity: 0.95;
}

/* ==========================================================================
   3. HER TÜRLÜ CİHAZDA KUSURSUZ ÇALIŞAN ALT KONTROL PANELİ
   ========================================================================== */
.app-footer {
  width: 100%;
  padding: 8px 12px;
  background: var(--dark-glass);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 50;
  color: #fff;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 8px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.6rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.stat-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
}

.balance-color {
  color: #4ade80 !important;
}

/* Hızlı Bahis Seçiciler (25 ₺, 50 ₺, MAX) */
.quick-bets {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-quick-bet {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-quick-bet.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fde047;
  color: #fff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  transform: scale(1.04);
}

/* Bilgi Şeridi */
.footer-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.ticker-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #e2e8f0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ticker-box.win-state {
  color: #facc15;
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.5);
}

/* Sağ Çevirme Butonu */
.footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.spin-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-spin-main {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #22c55e 0%, #16a34a 60%, #14532d 100%);
  border: 3px solid #bbf7d0;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-spin-main:hover {
  transform: scale(1.05);
}

.btn-spin-main:active {
  transform: scale(0.95);
}

.btn-spin-main:disabled {
  filter: grayscale(0.8);
  opacity: 0.4;
  cursor: not-allowed;
}

.spin-icon {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

/* ==========================================================================
   4. 21 (BLACKJACK) MASASI
   ========================================================================== */
.bj-table {
  width: min(95vw, 680px);
  max-height: calc(100dvh - 195px);
  background: radial-gradient(ellipse at center, #065f46 0%, #064e3b 55%, #022c22 100%);
  border: 6px solid #78350f;
  box-shadow: 
    inset 0 0 40px rgba(0, 0, 0, 0.6),
    0 10px 25px rgba(0, 0, 0, 0.7),
    0 0 0 2px #d97706;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 10px 14px;
  position: relative;
  overflow: hidden;
  margin: auto;
}

.bj-hand-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  width: 100%;
}

.bj-hand-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fef08a;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bj-score-badge {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid #facc15;
  color: #fff;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.bj-cards-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 85px;
}

/* İskambil Kartları */
.card-item {
  width: clamp(48px, 14vw, 65px);
  height: clamp(70px, 20vw, 95px);
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px;
  font-family: Arial, sans-serif;
  user-select: none;
  position: relative;
  border: 1px solid #cbd5e1;
}

.card-item.red { color: #dc2626; }
.card-item.black { color: #0f172a; }

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.card-val {
  font-size: 0.82rem;
  font-weight: 900;
}

.card-suit {
  font-size: 0.7rem;
}

.card-center {
  font-size: 1.4rem;
  text-align: center;
  align-self: center;
  line-height: 1;
}

.card-corner.bottom {
  transform: rotate(180deg);
}

.card-back {
  background: #1e3a8a;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back-pattern {
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

@keyframes dealCard {
  0% { opacity: 0; transform: translateY(-30px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-deal {
  animation: dealCard 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.bj-banner {
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  color: #fef08a;
  text-align: center;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bj-banner.win-banner {
  background: rgba(16, 185, 129, 0.85);
  color: #fff;
  border-color: #34d399;
}

.bj-banner.loss-banner {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border-color: #f87171;
}

.bj-banner.tease-banner {
  background: rgba(217, 119, 6, 0.85);
  color: #fff;
  border-color: #fbbf24;
}

/* Blackjack Aksiyon Butonları */
.bj-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-bj-action {
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.btn-deal { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.btn-hit { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.btn-stand { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-double { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }

.btn-bj-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

/* ==========================================================================
   5. MOBİL KESİN DÜZELTME & ADAPTİF 2-SATIR FOOTER DÜZENİ (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Üst Bar Kompakt */
  .badge-edu {
    display: none; /* Mobilde yer kaplamasın */
  }

  .tab-btn {
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  /* Alt Kontrol Barı 2 Satıra Bölünür (Başparmak Ergonomisi) */
  .app-footer {
    flex-direction: column;
    height: auto;
    min-height: 94px;
    padding: 6px 10px env(safe-area-inset-bottom);
    gap: 6px;
  }

  /* 1. Satır: Bakiye, Bahis ve Bahis Seçiciler */
  .footer-left {
    width: 100%;
    justify-content: space-between;
  }

  .stat-pill {
    padding: 2px 6px;
  }

  .stat-title {
    font-size: 0.55rem;
  }

  .stat-value {
    font-size: 0.8rem;
  }

  .quick-bets {
    gap: 3px;
  }

  .btn-quick-bet {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* 2. Satır: Bilgi Şeridi ve Çevir Butonu */
  .footer-center {
    width: 100%;
    order: 2;
  }

  .footer-right {
    width: 100%;
    order: 3;
    justify-content: center;
  }

  /* Sweet Bonanza için Çevir Butonu ve Ticker Entegresi */
  #bonanzaSection .app-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px;
  }

  #bonanzaSection .footer-left {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  #bonanzaSection .footer-center {
    grid-column: 1;
    grid-row: 2;
    align-items: center;
  }

  #bonanzaSection .footer-right {
    grid-column: 2;
    grid-row: 2;
    width: auto;
  }

  #bonanzaSection .btn-spin-main {
    width: 46px;
    height: 46px;
  }

  #bonanzaSection .spin-icon {
    width: 22px;
    height: 22px;
  }

  /* Blackjack Butonları Mobilde Eşit Dağılır */
  .bj-footer {
    display: flex !important;
    flex-direction: column !important;
  }

  .bj-actions {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .btn-bj-action {
    flex: 1;
    justify-content: center;
    padding: 8px 4px;
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   MODALLAR
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  padding: 12px;
}

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

.modal-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: min(94vw, 680px);
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-box.modal-sm {
  width: min(94vw, 380px);
}

.modal-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.modal-body {
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: #cbd5e1;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Rapor Kartları & Tablo */
.edu-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
}

.edu-card.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
}

.edu-card-title {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  color: #f87171;
  margin-bottom: 4px;
  font-size: 0.82rem;
}

.edu-code {
  background: #020617;
  padding: 8px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.72rem;
  color: #38bdf8;
  margin-top: 6px;
  overflow-x: auto;
}

.turn-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  text-align: center;
}

.turn-history-table th, .turn-history-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.turn-history-table th {
  color: #94a3b8;
  font-weight: 700;
}

.tag-win { color: #4ade80; font-weight: 800; }
.tag-loss { color: #f87171; font-weight: 800; }
.tag-fake { color: #facc15; font-weight: 800; }

.btn-primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}
