/* Variables & Design Tokens (Fancy Dark Sporty Theme) */
:root {
  --bg-primary: #07080b; /* Deep Dark Space */
  --bg-secondary: rgba(14, 17, 28, 0.75); /* Dark Acrylic Glass */
  --bg-tertiary: #131724;
  --border-light: rgba(255, 255, 255, 0.05);
  
  --text-primary: #f8fafc; /* Near White */
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  
  --accent-color: #2ebd59; /* Bright Grass Green */
  --accent-hover: #27a84e;
  --accent-glow: rgba(46, 189, 89, 0.25);
  
  --pitch-green: #1a5e2f; /* Deep Grass Green for Darkmode */
  --pitch-green-light: #20723a;
  --pitch-line: rgba(255, 255, 255, 0.5);
  
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;

  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 20px;
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(46, 189, 89, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(32, 44, 57, 0.2) 0px, transparent 50%);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.5rem;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  margin-bottom: 0.4rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-fm {
  background: #202c39;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--border-radius-sm);
  letter-spacing: -0.5px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.logo-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

/* Quarter Tabs Bar */
.quarter-tabs-bar {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.25rem;
  gap: 0.25rem;
  border-radius: 30px;
}

.quarter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.35rem 1.25rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quarter-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.quarter-btn.active {
  background-color: #f8fafc;
  color: #07080b;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* Count Button Accent style */
.quarter-btn.count-btn {
  border: 1px solid rgba(46, 189, 89, 0.35);
  background: rgba(46, 189, 89, 0.1);
  color: var(--accent-color);
}

.quarter-btn.count-btn:hover {
  background: rgba(46, 189, 89, 0.2);
  color: white;
  border-color: transparent;
}

/* Main Workspace */
.main-content {
  display: flex;
  flex: 1;
  gap: 0.5rem;
  overflow: hidden;
  height: calc(100vh - 120px);
}

/* Pitch Section (Left) */
.pitch-section {
  flex: 1.5;
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

/* Replica Live Score Board (최강양정 / 1) */
.live-board-header {
  text-align: center;
  margin-bottom: 0.6rem;
  z-index: 5;
  pointer-events: none;
}

.live-board-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -0.5px;
}

.live-board-quarter {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: -0.2rem;
}

/* 3D Perspective Container */
.pitch-container {
  width: 100%;
  height: 100%;
  max-width: 620px;
  max-height: 750px;
  aspect-ratio: 4 / 5;
  perspective: 1200px;
  position: relative;
  overflow: visible;
}

/* Football Pitch (3D Rotated) */
.pitch {
  width: 100%;
  height: 100%;
  background-color: var(--pitch-green);
  
  /* Vertical grass stripe simulation */
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.12) 50%, transparent 50%),
    radial-gradient(circle at center, var(--pitch-green-light) 0%, var(--pitch-green) 100%);
  background-size: 16.66% 100%, 100% 100%;
  
  border: 4px solid #fff;
  border-radius: 8px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.6);
  position: relative;
  padding: 3%;
  
  /* 3D 기울기 효과 */
  transform: rotateX(26deg) scale(1.02);
  transform-style: preserve-3d;
  transform-origin: bottom center;
}

/* Goalpost Decoration */
.goalpost-decor {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 90px;
  height: 18px;
  transform: translateX(-50%) translateZ(0px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-bottom: none;
  background-image: radial-gradient(circle, transparent 20%, rgba(255, 255, 255, 0.2) 21%, rgba(255, 255, 255, 0.2) 25%, transparent 26%);
  background-size: 4px 4px;
  z-index: 2;
  box-shadow: 0 -2px 10px rgba(255, 255, 255, 0.2);
}

/* Football Pitch Markings */
.pitch-line {
  position: absolute;
  border: 1.5px solid var(--pitch-line);
  pointer-events: none;
}

.pitch-line.half-way {
  top: 50%;
  left: 2%;
  right: 2%;
  height: 0;
  transform: translateY(-50%);
}

.pitch-line.center-circle {
  top: 50%;
  left: 50%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-line.penalty-area {
  left: 16%;
  right: 16%;
  width: 68%;
  height: 16%;
}

.pitch-line.penalty-area.top {
  top: 2%;
  border-top: none;
}

.pitch-line.penalty-area.bottom {
  bottom: 2%;
  border-bottom: none;
}

.pitch-line.goal-area {
  left: 33%;
  right: 33%;
  width: 34%;
  height: 5%;
}

.pitch-line.goal-area.top {
  top: 2%;
  border-top: none;
}

.pitch-line.goal-area.bottom {
  bottom: 2%;
  border-bottom: none;
}

/* Brand Badge Replica (#LINEUP11) */
.brand-badge-replica {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 0.95rem;
  font-weight: 900;
  font-style: italic;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: -0.5px;
  pointer-events: none;
  font-family: 'Outfit', sans-serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Overlays */
.guides-overlay, .players-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.guides-overlay {
  pointer-events: auto;
}

/* Position Guides (Slots) - 3D Billboard Rotation */
.position-slot {
  position: absolute;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%) rotateX(-26deg);
  transform-style: preserve-3d;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background-color: rgba(0, 0, 0, 0.25);
}

.position-slot.drag-over {
  border-color: white;
  background-color: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%) rotateX(-26deg) scale(1.08);
}

.position-slot.awaiting-placement {
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
  animation: slot-flash-guide 1.2s infinite ease-in-out;
}

@keyframes slot-flash-guide {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; transform: translate(-50%, -50%) rotateX(-26deg) scale(1.06); }
}

.position-slot-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Placed Player Badge - 3D Billboard & Floating Jersey style */
.placed-player {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -60%) rotateX(-26deg);
  transform-style: preserve-3d;
  cursor: pointer;
  pointer-events: auto;
  z-index: 5;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

/* 3D 지면 밀착형 그림자 */
.placed-player::before {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 50%;
  width: 32px;
  height: 5px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  transform: translateX(-50%) translateZ(-1px);
  filter: blur(1.5px);
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* 3D Floating Jersey Card */
.placed-player-card {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-smooth);
  animation: jersey-float 3s infinite ease-in-out;
}

@keyframes jersey-float {
  0%, 100% { 
    transform: translateY(-4px); 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35)); 
  }
  50% { 
    transform: translateY(-9px); 
    filter: drop-shadow(0 9px 12px rgba(0,0,0,0.55)); 
  }
}

/* Selected placed player */
.placed-player.selected {
  transform: translate(-50%, -60%) rotateX(-26deg) scale(1.15);
  z-index: 10;
}
.placed-player.selected::before {
  width: 24px;
  background: rgba(0, 0, 0, 0.7);
}
.placed-player.selected .placed-player-card {
  animation-play-state: paused;
  transform: translateY(-11px);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7)) drop-shadow(0 11px 16px rgba(0, 0, 0, 0.6));
}

/* Player Name */
.placed-player-name {
  margin-top: 1px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  
  text-shadow: 
    -1.5px -1.5px 0 #000,  
     1.5px -1.5px 0 #000,
    -1.5px  1.5px 0 #000,
     1.5px  1.5px 0 #000,
     0px -1.5px 0 #000,
     0px  1.5px 0 #000,
    -1.5px  0px 0 #000,
     1.5px  0px 0 #000,
     0px 4px 6px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

/* Remove button for placed player */
.remove-player-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--danger-color);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: var(--transition-smooth);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.placed-player:hover .remove-player-btn {
  opacity: 1;
  transform: scale(1);
}

/* Control & Squad Panel (Right) - Dark Glassmorphism */
.control-section {
  flex: 0.8;
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  gap: 1.25rem;
  overflow-y: auto;
}

.panel {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.panel-title {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-primary);
  margin-bottom: 1rem;
  border-left: 4px solid var(--text-primary);
  padding-left: 0.5rem;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel-header .panel-title {
  margin-bottom: 0;
}

/* Tactics Selector Grid */
.tactics-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.tactics-btn {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 0.6rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tactics-btn:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: white;
  transform: translateY(-1px);
}

.tactics-btn.active {
  background-color: #f8fafc;
  color: #07080b;
  border-color: transparent;
  box-shadow: 0 3px 8px rgba(255, 255, 255, 0.1);
}

/* Search input */
.search-input {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: white;
  padding: 0.65rem 0.9rem;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: white;
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

/* Squad List Pool */
.squad-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Custom Scrollbar */
.squad-list::-webkit-scrollbar, .control-section::-webkit-scrollbar {
  width: 6px;
}
.squad-list::-webkit-scrollbar-track, .control-section::-webkit-scrollbar-track {
  background: transparent;
}
.squad-list::-webkit-scrollbar-thumb, .control-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.squad-list::-webkit-scrollbar-thumb:hover, .control-section::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Squad Player Cards */
.player-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-sm);
  padding: 0.65rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between; /* 배지가 있으면 양 끝 정렬 */
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.player-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Selected squad card */
.player-card.selected {
  border-color: white;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.player-card.placed {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
  border-color: transparent;
  background-color: rgba(0, 0, 0, 0.2);
}

.player-card-icon {
  font-size: 1rem;
}

.player-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1; /* 이름 길면 영역 차지 */
}

/* Realtime Quarter Play count badge */
.play-badge {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.1);
  margin-left: 0.25rem;
}

.play-badge.active {
  background-color: rgba(46, 189, 89, 0.15);
  border-color: rgba(46, 189, 89, 0.35);
  color: var(--accent-color);
  box-shadow: 0 0 8px rgba(46, 189, 89, 0.15);
}

.loading {
  grid-column: span 2;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 0;
}

/* Action Panel (Reset Button) */
.action-panel {
  margin-top: auto;
}

.reset-button {
  width: 100%;
  background-color: rgba(239, 68, 68, 0.08);
  color: var(--danger-color);
  border: 1px solid rgba(239, 68, 68, 0.15);
  padding: 0.85rem;
  border-radius: var(--border-radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.reset-button:hover {
  background-color: var(--danger-color);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.25);
  transform: translateY(-1.5px);
}

/* ==========================================================================
   Modal Stats Popup & Table Styles
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background: rgba(19, 23, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  width: 92%;
  max-width: 500px;
  max-height: 80vh;
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stats-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-weight: 500;
}

.stats-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

.stats-table .highlight-row td {
  color: var(--accent-color);
  font-weight: 700;
}

.stats-table .highlight-num {
  font-weight: 800;
  color: var(--accent-color);
}

.stats-table .badge-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.stats-table .table-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.stats-table .table-badge.active {
  background: rgba(46, 189, 89, 0.12);
  border-color: rgba(46, 189, 89, 0.35);
  color: var(--accent-color);
}

/* ==========================================================================
   Responsive Styles for Mobile
   ========================================================================== */
@media (max-width: 900px) {
  .tactics-buttons {
    grid-template-columns: repeat(5, 1fr);
  }
  .squad-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
    height: auto;
  }
  
  .app-container {
    height: auto;
    padding: 0.25rem;
  }

  .main-header {
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
  }

  .quarter-tabs-bar {
    padding: 0.2rem;
  }

  .quarter-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
  }

  .main-content {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .pitch-section {
    flex: none;
    width: 100%;
    padding: 0.5rem 0.1rem;
    height: auto;
    border-radius: var(--border-radius-md);
  }
  
  .live-board-title {
    font-size: 1.5rem;
  }
  
  .live-board-quarter {
    font-size: 1.05rem;
  }

  .pitch-container {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 4 / 5;
    perspective: 800px;
  }
  
  .pitch {
    transform: rotateX(22deg) scale(1.01);
  }

  .control-section {
    flex: none;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-light);
    padding: 0.75rem;
    overflow-y: visible;
    border-radius: var(--border-radius-md);
  }

  .squad-list {
    grid-template-columns: repeat(2, 1fr);
    max-height: 250px;
  }

  .tactics-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .placed-player {
    transform: translate(-50%, -60%) rotateX(-22deg); /* 3D Billboard Tilt */
  }
  
  .placed-player.selected {
    transform: translate(-50%, -60%) rotateX(-22deg) scale(1.12);
  }
  
  .placed-player-card {
    width: 48px;
    height: 48px;
  }
  
  .placed-player-name {
    font-size: 0.8rem;
    max-width: 75px;
  }

  .position-slot {
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%) rotateX(-22deg);
  }
  
  .position-slot.drag-over {
    transform: translate(-50%, -50%) rotateX(-22deg) scale(1.08);
  }
  
  .position-slot-label {
    font-size: 0.65rem;
  }
}
