/* HalıSaha Pro - Modern Dark & Neon Pitch Stilleri */

:root {
  --pitch-green: #00ff87;
  --pitch-green-dark: #059669;
  --pitch-glow: rgba(0, 255, 135, 0.35);
  --danger-red: #ff3366;
  --danger-glow: rgba(255, 51, 102, 0.35);
  --warning-amber: #f59e0b;
  --dark-bg: #090d16;
  --dark-surface: #111827;
  --dark-card: #162032;
  --dark-border: rgba(255, 255, 255, 0.08);
}

/* Genel Sıfırlama ve Font */
* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

button, [role="button"], select, summary, a {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed !important;
  opacity: 0.65;
}

body {
  background-color: var(--dark-bg);
  color: #f3f4f6;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Futbol Sahası Arka Plan Efekti */
.pitch-bg {
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 255, 135, 0.12) 0%, transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
}

/* Neon Işıltı Efektleri */
.neon-glow-green {
  box-shadow: 0 0 20px var(--pitch-glow), 0 0 40px rgba(0, 255, 135, 0.15);
}

.neon-glow-red {
  box-shadow: 0 0 20px var(--danger-glow), 0 0 40px rgba(255, 51, 102, 0.15);
}

.neon-border-green {
  border-color: rgba(0, 255, 135, 0.4);
}

.text-pitch-green {
  color: var(--pitch-green);
}

/* Glassmorphism Kartlar */
.glass-card {
  background: rgba(22, 32, 50, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--dark-border);
}

.glass-card-interactive {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card-interactive:active {
  transform: scale(0.98);
}

/* Tinder-Style Swipe Kart Alanı */
.swipe-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 380px;
  margin: 0 auto;
  perspective: 1000px;
}

.swipe-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: linear-gradient(145deg, #182438, #101927);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  cursor: grab;
  touch-action: none;
  transform-origin: 50% 100%;
  transition: transform 0.1s ease-out, box-shadow 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.swipe-card:active {
  cursor: grabbing;
}

.swipe-badge {
  position: absolute;
  top: 24px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  border-radius: 12px;
  border-width: 3px;
  border-style: solid;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.swipe-badge.badge-yes {
  right: 24px;
  color: var(--pitch-green);
  border-color: var(--pitch-green);
  transform: rotate(12deg);
  background: rgba(0, 255, 135, 0.15);
  box-shadow: 0 0 20px rgba(0, 255, 135, 0.3);
}

.swipe-badge.badge-no {
  left: 24px;
  color: var(--danger-red);
  border-color: var(--danger-red);
  transform: rotate(-12deg);
  background: rgba(255, 51, 102, 0.15);
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.3);
}

/* Pulses & Animations */
@keyframes pulseGreen {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}

.animate-pulse-green {
  animation: pulseGreen 2s infinite ease-in-out;
}

/* Custom Scrollbar for list */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 135, 0.4);
}

/* Bottom Safe Area for Mobile Thumb Access */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* =========================================================================
   FAZ 2: YEŞİL SAHA TAKTİK TAHTASI STİLLERİ
   ========================================================================= */
.tactics-pitch {
  position: relative;
  width: 100%;
  height: 560px;
  border-radius: 20px;
  overflow: hidden;
  background-color: #0d381e;
  background-image: repeating-linear-gradient(
    180deg,
    #0d381e,
    #0d381e 28px,
    #104424 28px,
    #104424 56px
  );
  border: 3px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  touch-action: none;
  user-select: none;
}

/* Saha Çizgileri */
.pitch-marking {
  position: absolute;
  pointer-events: none;
}

/* Dikey modda yatay çizgileri gizle */
.tactics-pitch:not(.pitch-horizontal) .pitch-h {
  display: none !important;
}

/* Yatay modda dikey çizgileri gizle */
.tactics-pitch.pitch-horizontal .pitch-v {
  display: none !important;
}

/* =========================================================================
   1. DİKEY SAHA ÇİZGİLERİ (PORTRAIT / MOBİL MOD)
   ========================================================================= */
.pitch-line-half {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%);
}

.pitch-circle-center {
  top: 50%;
  left: 50%;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-spot-center {
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-box-top {
  top: 0;
  left: 50%;
  width: 140px;
  height: 65px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.pitch-goal-top {
  top: 0;
  left: 50%;
  width: 68px;
  height: 24px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
}

.pitch-box-bottom {
  bottom: 0;
  left: 50%;
  width: 140px;
  height: 65px;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.pitch-goal-bottom {
  bottom: 0;
  left: 50%;
  width: 68px;
  height: 24px;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
}

/* =========================================================================
   2. YATAY DEV SAHA ÇİZGİLERİ (LANDSCAPE / PC YAYIN MODU)
   ========================================================================= */
.pitch-line-half-h {
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
}

.pitch-box-left {
  top: 50%;
  left: 0;
  width: 15%;
  height: 52%;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  transform: translateY(-50%);
}

.pitch-box-left-six {
  top: 50%;
  left: 0;
  width: 6%;
  height: 26%;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  transform: translateY(-50%);
}

.pitch-goal-left {
  top: 50%;
  left: 0;
  width: 14px;
  height: 24%;
  background: rgba(255, 255, 255, 0.85);
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.pitch-spot-left {
  top: 50%;
  left: 10.5%;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-box-right {
  top: 50%;
  right: 0;
  width: 15%;
  height: 52%;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  transform: translateY(-50%);
}

.pitch-box-right-six {
  top: 50%;
  right: 0;
  width: 6%;
  height: 26%;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  transform: translateY(-50%);
}

.pitch-goal-right {
  top: 50%;
  right: 0;
  width: 14px;
  height: 24%;
  background: rgba(255, 255, 255, 0.85);
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.pitch-spot-right {
  top: 50%;
  right: 10.5%;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: translate(50%, -50%);
}
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
}

/* Saha Oyuncu Yuvası (Target Slot) */
.pitch-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
  cursor: pointer;
}

.pitch-slot.slot-team-a {
  border-color: rgba(0, 255, 135, 0.35);
}

.pitch-slot.slot-team-b {
  border-color: rgba(255, 71, 87, 0.35);
}

.pitch-slot.dragover {
  transform: translate(-50%, -50%) scale(1.25);
  background: rgba(0, 255, 135, 0.35);
  border-color: #00ff87;
  box-shadow: 0 0 15px rgba(0, 255, 135, 0.6);
}

/* Saha Üzerindeki Oyuncu Tokenı */
.pitch-player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: grab;
  touch-action: none;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.2), box-shadow 0.2s;
}

.pitch-player:active {
  cursor: grabbing;
}

.pitch-player.dragging {
  z-index: 99 !important;
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(1.25);
  transition: none !important;
}

.pitch-player.selected .player-jersey {
  transform: scale(1.15);
  outline: 3px solid #ffffff;
  box-shadow: 0 0 20px #ffffff;
}

/* Forma Görünümü */
.player-jersey {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
  position: relative;
}

/* A Takımı Forması: Neon Fosforlu Yeşil Yelek */
.jersey-team-a {
  background: radial-gradient(circle at 35% 35%, #00ff87, #059669);
  color: #051a0e;
  border-color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 255, 135, 0.7);
}

/* B Takımı Forması: Ateş Kırmızısı / Turuncu Yelek */
.jersey-team-b {
  background: radial-gradient(circle at 35% 35%, #ff4757, #c0392b);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 14px rgba(255, 71, 87, 0.7);
}

/* Kaleci Özel Forması (Sarı/Siyah) */
.jersey-gk {
  background: radial-gradient(circle at 35% 35%, #f1c40f, #d35400) !important;
  color: #000000 !important;
  box-shadow: 0 0 14px rgba(241, 196, 15, 0.7) !important;
}

/* Oyuncu İsim ve Puan Etiketleri */
.player-name-label {
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(10, 15, 25, 0.88);
  padding: 1.5px 6px;
  border-radius: 6px;
  margin-top: 3px;
  max-width: 78px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.player-rating-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 9px;
  font-weight: 800;
  color: #000;
  background: #f59e0b;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  line-height: 14px;
}

/* Yedek / Havuz Oyuncu Kartı */
.bench-player-chip {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.bench-player-chip:active {
  transform: scale(0.95);
}

/* =========================================================================
   ANTRENÖR KOÇ MODU & SERBEST ÇİZİM VE TAM EKRAN SAHA (YENİ GİRİŞ EKRANI)
   ========================================================================= */
.coach-fullscreen-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Çizim Tuvali Katmanı */
.draw-canvas-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  pointer-events: none;
}

.draw-canvas-layer.drawing-active {
  pointer-events: auto;
  cursor: crosshair;
}

/* Oyuncular ve Top Çizim Modunda Bile Her Zaman Tutulabilir ve Taşınabilir */
.coach-pitch-player {
  cursor: grab !important;
  user-select: none !important;
  z-index: 25 !important;
}

.coach-pitch-player:active {
  cursor: grabbing !important;
  z-index: 40 !important;
}

/* Sürüklenebilir Futbol Topu */
.draggable-ball {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  z-index: 25;
  cursor: grab;
  touch-action: none;
  background: radial-gradient(circle at 35% 35%, #ffffff, #e5e7eb 60%, #9ca3af);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.7), inset 0 0 4px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1.5px solid #ffffff;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: translate(-50%, -50%);
}

.draggable-ball:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Antrenör Araç Çubuğu (Toolbar) Butonları */
.tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 24, 39, 0.85);
  color: #d1d5db;
  white-space: nowrap;
}

.tool-btn:hover {
  background: rgba(31, 41, 55, 0.95);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.tool-btn.active {
  background: #00ff87 !important;
  color: #000000 !important;
  border-color: #00ff87 !important;
  box-shadow: 0 0 15px rgba(0, 255, 135, 0.5);
  transform: scale(1.04);
}

/* Çizim Renk Seçici Noktaları */
.color-picker-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.color-picker-dot.active {
  transform: scale(1.3);
  border-color: #ffffff;
  box-shadow: 0 0 10px currentColor;
}

/* =========================================================================
   PC GENİŞ EKRAN ANTRENÖR STÜDYOSU (VIEWPORT FIT - SAHA EKRANA OTURUR, AŞAĞI KAYDIRILABİLİR)
   ========================================================================= */
@media (min-width: 1024px) {
  /* Taktik stüdyosu üstte tam ekran oturur, aşağı kaydırıldığında rehber ve altbilgi görünür */
  body.view-coach-active {
    min-height: 100vh;
    overflow-x: hidden;
  }
  body.view-coach-active #main-app-container {
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vh - 54px) !important;
    min-height: calc(100vh - 54px) !important;
    padding: 6px 16px 8px 16px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  body.view-coach-active #view-coach {
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.view-coach-active .studio-grid-container {
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 16px !important;
  }

  /* Sol ve Sağ Özellik Panelleri: Sabit genişlikte (320px), kenara yapışık, ekran boyutuna göre taşmaz */
  #coach-left-panel {
    width: 320px !important;
    min-width: 290px !important;
    max-width: 330px !important;
    flex-shrink: 0 !important;
    order: 1 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 135, 0.25) rgba(0, 0, 0, 0.2);
  }

  #coach-right-panel {
    width: 320px !important;
    min-width: 290px !important;
    max-width: 330px !important;
    flex-shrink: 0 !important;
    order: 3 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 135, 0.25) rgba(0, 0, 0, 0.2);
  }

  /* Orta Panel ve Saha: Viewport'un kalan TÜM genişliğini doldurur ve sahayı devasa yapar */
  #coach-center-panel {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow: hidden !important;
    order: 2 !important;
  }

  /* Yatay Dev Saha Boyutlandırması: Ekranın kalan tüm genişliğini ve yüksekliğini doldurur */
  .pc-pitch-wrapper.pitch-horizontal {
    height: 100% !important;
    max-height: calc(100vh - 170px) !important;
    width: 100% !important;
    max-width: min(100%, calc((100vh - 170px) * 1.62)) !important;
    margin: 0 auto !important;
    aspect-ratio: 1.62 / 1 !important;
    flex-shrink: 1 !important;
  }

  /* Dikey Saha Boyutlandırması */
  .pc-pitch-wrapper:not(.pitch-horizontal) {
    height: 100% !important;
    max-height: calc(100vh - 170px) !important;
    width: 100% !important;
    max-width: min(100%, calc((100vh - 170px) * 0.68)) !important;
    margin: 0 auto !important;
    aspect-ratio: 0.68 / 1 !important;
    flex-shrink: 1 !important;
  }

  /* Kontrol Çubukları & Oynatma Paneli Genişlikleri (Saha ile Birebir Eşit Genişlik) */
  #coach-center-panel.is-horizontal #coach-pitch-controls-bar,
  #coach-center-panel.is-horizontal #coach-playback-panel,
  #coach-center-panel.is-horizontal #coach-quick-share-bar,
  #coach-center-panel.is-horizontal #pitch-bottom-team-indicator {
    max-width: min(100%, calc((100vh - 170px) * 1.62)) !important;
    width: 100% !important;
  }

  #coach-center-panel:not(.is-horizontal) #coach-pitch-controls-bar,
  #coach-center-panel:not(.is-horizontal) #coach-playback-panel,
  #coach-center-panel:not(.is-horizontal) #coach-quick-share-bar,
  #coach-center-panel:not(.is-horizontal) #pitch-bottom-team-indicator {
    max-width: min(100%, calc((100vh - 170px) * 0.68)) !important;
    width: 100% !important;
  }
}

/* Zarif Webkit İnce Kaydırma Çubuğu */
.studio-sidebar::-webkit-scrollbar {
  width: 4px;
}
.studio-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}
.studio-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 135, 0.25);
  border-radius: 6px;
}
.studio-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 135, 0.5);
}

/* =========================================================================
   STADYUM PROJEKTÖR IŞIKLARI & ZEMİN TEMALARI
   ========================================================================= */

/* 1. Stadyum Gece Projektör Işıkları Katmanı */
.pitch-floodlights-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 13;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background: 
    radial-gradient(ellipse 320px 240px at 0% 0%, rgba(255, 255, 255, 0.32) 0%, rgba(0, 255, 135, 0.12) 40%, transparent 80%),
    radial-gradient(ellipse 320px 240px at 100% 0%, rgba(255, 255, 255, 0.32) 0%, rgba(0, 255, 135, 0.12) 40%, transparent 80%),
    radial-gradient(ellipse 320px 240px at 0% 100%, rgba(255, 255, 255, 0.32) 0%, rgba(0, 255, 135, 0.12) 40%, transparent 80%),
    radial-gradient(ellipse 320px 240px at 100% 100%, rgba(255, 255, 255, 0.32) 0%, rgba(0, 255, 135, 0.12) 40%, transparent 80%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  mix-blend-mode: screen;
}

.pitch-floodlights-layer.floodlights-off {
  opacity: 0 !important;
}

/* 4 Köşedeki Parlayan Projektör Armatürleri */
.floodlight-fixture {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 16px 5px #ffffff, 0 0 32px 10px rgba(0, 255, 135, 0.65);
  z-index: 15;
  pointer-events: none;
  transition: all 0.3s ease;
}

.floodlight-fixture.fixture-tl { top: 6px; left: 6px; }
.floodlight-fixture.fixture-tr { top: 6px; right: 6px; }
.floodlight-fixture.fixture-bl { bottom: 6px; left: 6px; }
.floodlight-fixture.fixture-br { bottom: 6px; right: 6px; }

.floodlights-off .floodlight-fixture {
  opacity: 0.25;
  background: #475569;
  box-shadow: none;
}

/* 2. Zemin Temaları */

/* Tema: Stadyum Gece (Varsayılan) */
.tactics-pitch.theme-stadium {
  background-color: #0b2e18;
  background-image: repeating-linear-gradient(
    180deg,
    #0b2e18,
    #0b2e18 28px,
    #0e381e 28px,
    #0e381e 56px
  );
  border-color: rgba(255, 255, 255, 0.45);
}

/* Tema: Islak / Yağmurlu Gece Sahası */
.tactics-pitch.theme-rain {
  background-color: #06170e;
  background-image: 
    radial-gradient(ellipse at 50% 25%, rgba(255, 255, 255, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 75%, rgba(255, 255, 255, 0.14) 0%, transparent 50%),
    repeating-linear-gradient(
      180deg,
      #06170e,
      #06170e 28px,
      #092114 28px,
      #092114 56px
    );
  border-color: rgba(186, 230, 253, 0.45);
  box-shadow: inset 0 0 50px rgba(0, 20, 15, 0.9), 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* Tema: Cyber Taktik / TV Analiz Odası */
.tactics-pitch.theme-cyber {
  background-color: #060a12;
  background-image: 
    linear-gradient(rgba(0, 255, 135, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 135, 0.08) 1px, transparent 1px),
    repeating-linear-gradient(
      180deg,
      #060a12,
      #060a12 28px,
      #0a0f1c 28px,
      #0a0f1c 56px
    );
  background-size: 24px 24px, 24px 24px, 100% 56px;
  border-color: rgba(0, 255, 135, 0.55);
  box-shadow: inset 0 0 50px rgba(0, 255, 135, 0.15), 0 0 35px rgba(0, 255, 135, 0.25);
}
.tactics-pitch.theme-cyber .pitch-marking {
  border-color: rgba(0, 255, 135, 0.55) !important;
}
.tactics-pitch.theme-cyber .pitch-line-half {
  background: rgba(0, 255, 135, 0.55) !important;
}
.tactics-pitch.theme-cyber .pitch-spot-center {
  background: #00ff87 !important;
  box-shadow: 0 0 12px #00ff87;
}

/* Tema: Doğal / Gündüz Çimi */
.tactics-pitch.theme-classic {
  background-color: #1a5728;
  background-image: repeating-linear-gradient(
    180deg,
    #1a5728,
    #1a5728 28px,
    #216831 28px,
    #216831 56px
  );
  border-color: rgba(255, 255, 255, 0.75);
}

/* =========================================================================
   YATAY DEV SAHA ZEMİN TEMALARI (90 DERECE ŞERİTLER - PC & TV YAYIN AÇISI)
   ========================================================================= */
.tactics-pitch.pitch-horizontal {
  background-image: repeating-linear-gradient(
    90deg,
    #0d381e,
    #0d381e 36px,
    #104424 36px,
    #104424 72px
  );
}

.tactics-pitch.pitch-horizontal.theme-stadium {
  background-image: repeating-linear-gradient(
    90deg,
    #0b2e18,
    #0b2e18 42px,
    #0e381e 42px,
    #0e381e 84px
  );
}

.tactics-pitch.pitch-horizontal.theme-rain {
  background-image: 
    radial-gradient(ellipse at 25% 50%, rgba(255, 255, 255, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 50%, rgba(255, 255, 255, 0.14) 0%, transparent 50%),
    repeating-linear-gradient(
      90deg,
      #06170e,
      #06170e 42px,
      #092114 42px,
      #092114 84px
    );
}

.tactics-pitch.pitch-horizontal.theme-cyber {
  background-image: 
    linear-gradient(rgba(0, 255, 135, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 135, 0.08) 1px, transparent 1px),
    repeating-linear-gradient(
      90deg,
      #060a12,
      #060a12 42px,
      #0a0f1c 42px,
      #0a0f1c 84px
    );
}
.tactics-pitch.pitch-horizontal.theme-cyber .pitch-line-half-h {
  background: rgba(0, 255, 135, 0.55) !important;
}

.tactics-pitch.pitch-horizontal.theme-classic {
  background-image: repeating-linear-gradient(
    90deg,
    #1a5728,
    #1a5728 42px,
    #216831 42px,
    #216831 84px
  );
}

/* Preset Taktik Butonları */
.preset-tactic-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-align: left;
}
.preset-tactic-btn:hover {
  background: rgba(31, 41, 55, 0.95);
  border-color: rgba(0, 255, 135, 0.4);
  color: #ffffff;
  transform: translateX(3px);
}
.preset-tactic-btn:active {
  transform: scale(0.97);
}

/* =========================================================================
   TAM EKRAN ANTRENÖR STÜDYOSU (FULLSCREEN STUDIO MODE - DOCKED & CENTERED)
   ========================================================================= */
body.studio-fullscreen-active {
  overflow: hidden !important;
  background: #030805 !important;
}

body.studio-fullscreen-active header,
body.studio-fullscreen-active footer,
body.studio-fullscreen-active #pwa-install-banner {
  display: none !important;
}

body.studio-fullscreen-active #fullscreen-exit-header {
  display: flex !important;
}

body.studio-fullscreen-active #main-app-container {
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  background: #040906 !important;
  overflow: hidden !important;
}

body.studio-fullscreen-active #view-coach {
  height: 100vh !important;
  width: 100vw !important;
  padding: 54px 16px 12px 16px !important;
  margin: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* 3 Sütunlu Stüdyo Flexbox Düzeni */
body.studio-fullscreen-active .studio-grid-container {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  width: 100% !important;
  height: 100% !important;
  gap: 16px !important;
  margin: 0 !important;
}

/* SOL PANEL: Kenara yapışık sabit genişlik ve tam kaydırma */
body.studio-fullscreen-active #coach-left-panel {
  width: 315px !important;
  min-width: 315px !important;
  max-width: 315px !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  background: rgba(10, 15, 24, 0.9) !important;
  backdrop-filter: blur(12px) !important;
  padding: 12px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  order: 1 !important;
  flex-shrink: 0 !important;
}

/* SAĞ PANEL: Kenara yapışık sabit genişlik ve tam kaydırma */
body.studio-fullscreen-active #coach-right-panel {
  width: 315px !important;
  min-width: 315px !important;
  max-width: 315px !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  background: rgba(10, 15, 24, 0.9) !important;
  backdrop-filter: blur(12px) !important;
  padding: 12px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  order: 3 !important;
  flex-shrink: 0 !important;
}

/* ORTA PANEL: Tam merkezde, esnek ve sahayla tam hizalı */
body.studio-fullscreen-active #coach-center-panel {
  flex: 1 !important;
  min-width: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  order: 2 !important;
  padding: 0 4px !important;
  overflow: hidden !important;
}

/* Saha ve Üst/Alt Kontrol Çubuklarının Genişlikleri Birebir Eşit ve Merkezli */
body.studio-fullscreen-active #coach-center-panel.is-horizontal #coach-pitch-controls-bar,
body.studio-fullscreen-active #coach-center-panel.is-horizontal #coach-playback-panel,
body.studio-fullscreen-active #coach-center-panel.is-horizontal #coach-quick-share-bar,
body.studio-fullscreen-active #coach-center-panel.is-horizontal #pitch-bottom-team-indicator {
  width: 100% !important;
  max-width: min(100%, calc((100vh - 170px) * 1.62)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.studio-fullscreen-active #coach-center-panel:not(.is-horizontal) #coach-pitch-controls-bar,
body.studio-fullscreen-active #coach-center-panel:not(.is-horizontal) #coach-playback-panel,
body.studio-fullscreen-active #coach-center-panel:not(.is-horizontal) #coach-quick-share-bar,
body.studio-fullscreen-active #coach-center-panel:not(.is-horizontal) #pitch-bottom-team-indicator {
  width: 100% !important;
  max-width: min(100%, calc((100vh - 170px) * 0.68)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.studio-fullscreen-active .pc-pitch-wrapper.pitch-horizontal {
  height: 100% !important;
  max-height: calc(100vh - 170px) !important;
  width: 100% !important;
  max-width: min(100%, calc((100vh - 170px) * 1.62)) !important;
  aspect-ratio: 1.62 / 1 !important;
  margin: 0 auto !important;
  flex-shrink: 1 !important;
}

body.studio-fullscreen-active .pc-pitch-wrapper:not(.pitch-horizontal) {
  height: calc(100vh - 200px) !important;
  max-height: calc(100vh - 200px) !important;
  width: 100% !important;
  max-width: 530px !important;
  margin: 0 auto !important;
  flex-shrink: 0 !important;
}

/* Mobil / Küçük Ekran Tam Ekran Uyumu */
@media (max-width: 1023px) {
  body.studio-fullscreen-active #view-coach {
    overflow-y: auto !important;
  }
  body.studio-fullscreen-active .studio-grid-container {
    flex-direction: column !important;
    height: auto !important;
  }
  body.studio-fullscreen-active #coach-left-panel,
  body.studio-fullscreen-active #coach-right-panel {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
  body.studio-fullscreen-active #coach-center-panel {
    width: 100% !important;
    order: 1 !important;
  }
  body.studio-fullscreen-active #coach-left-panel {
    order: 2 !important;
  }
  body.studio-fullscreen-active #coach-right-panel {
    order: 3 !important;
  }
}

/* ========================================================================= */
/* TAKTİK CANLI OYNATMA (PLAYBACK) & ANİMASYON EFEKTLERİ                      */
/* ========================================================================= */
.playback-moving-actor {
  filter: drop-shadow(0 0 10px rgba(0, 255, 135, 0.85)) !important;
  z-index: 40 !important;
}

.playback-moving-actor .player-jersey {
  animation: pulse-playback-actor 1.1s infinite ease-in-out;
}

@keyframes pulse-playback-actor {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(0, 255, 135, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 22px rgba(0, 255, 135, 0.95);
  }
}

.playback-moving-ball {
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.95)) drop-shadow(0 0 5px #ffffff) !important;
  z-index: 45 !important;
  animation: spin-playback-ball 0.75s infinite linear;
}

@keyframes spin-playback-ball {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1.18);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg) scale(1.18);
  }
}

#playback-progress-bar {
  box-shadow: 0 0 14px rgba(0, 255, 135, 0.75);
}

/* =========================================================================
   KADRO KİŞİ SAYISI SEÇİCİ & KALABALIK TAKIM (5v5 - 11v11)
   ========================================================================= */
.squad-size-btn {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.squad-size-btn:hover {
  border-color: rgba(0, 255, 135, 0.4);
}
.squad-size-btn.active {
  background: #00ff87 !important;
  color: #05140b !important;
  font-weight: 900 !important;
  border-color: #00ff87 !important;
  box-shadow: 0 0 12px rgba(0, 255, 135, 0.45);
}

/* Kalabalık Kadro (9, 10, 11 Kişi) Boyutlandırması */
.tactics-pitch.squad-dense .player-jersey {
  width: 32px !important;
  height: 32px !important;
  font-size: 11px !important;
}
.tactics-pitch.squad-dense .player-name-label {
  font-size: 9px !important;
  padding: 1px 4px !important;
}





