/* =============================================
   전역 스타일: 색상, 타이포그래피, 레이아웃
   - 이 섹션은 사이트 전체 공통 규칙을 정의합니다
=============================================== */
:root {
  --bg: #0b0b10;
  --card: #141420;
  --text: #e8e8f0;
  --muted: #a0a0b3;
  --primary: #ff3366; /* Devil Bunnies 포인트 컬러 */
  --primary-700: #d12152;
  --accent: #7c4dff;
  --border: #26263a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Pretendard', system-ui, -apple-system, Segoe UI, Roboto, Apple SD Gothic Neo, Noto Sans KR, sans-serif;
  background: radial-gradient(1200px 800px at 10% -10%, #151528, transparent 60%) no-repeat, var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: rgba(11,11,16,0.8); backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
.brand-title { font-size: 18px; letter-spacing: 0.5px; margin: 0; font-weight: 800; }

.site-nav { display: flex; gap: 14px; }
.site-nav a { padding: 8px 10px; border-radius: 8px; color: var(--muted); }
.site-nav a.active, .site-nav a:hover { color: var(--text); background: var(--card); }

.app-root { max-width: 1100px; padding: 24px 20px 60px; margin: 0 auto; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); padding: 16px 20px; text-align: center; }

/* =============================================
   페이지 공통 컴포넌트
=============================================== */
.page-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 24px; font-weight: 800; margin: 8px 0 18px;
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.grid-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; justify-items: center; /* 카드 중앙 정렬 */
}
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }

/* 감독 섹션 전용 그리드 - 카드 하나를 가운데 정렬 */
.grid-coach {
  display: grid; grid-template-columns: 1fr; gap: 16px; justify-items: center; /* 감독 카드 중앙 정렬 */
}

.btn-back {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
  background: var(--card); color: var(--text);
}
.btn-back:hover { background: #1a1a2a; }

/* =============================================
   선수 카드
=============================================== */
.player-card { 
  cursor: pointer; 
  transition: transform .15s ease, box-shadow .15s ease; 
  text-align: left; /* 카드 내부 텍스트는 왼쪽 정렬 */
}
.player-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.player-photo { width: 100%; aspect-ratio: 4/3; background: #1c1c2e; border-radius: 10px; margin-bottom: 10px; }
.player-number { color: var(--text); font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.player-name { font-weight: 700; }
.player-role { color: var(--muted); font-size: 12px; }

/* 랜딩(홈) */
.landing {
  min-height: calc(100vh - 140px);
  display: grid; place-items: center;
}
.landing img { width: 220px; height: 220px; object-fit: contain; }

/* 구단 소개 중앙 정렬 */
.club-center { text-align: center; }
.club-center .emblem { width: 220px; height: 220px; margin: 0 auto 14px; object-fit: contain; }

/* 미디어 갤러리 */
.media-controls { display:flex; gap:10px; align-items:center; margin-bottom: 12px; }
.media-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 1100px) { .media-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .media-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
.media-item { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.media-item img { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; }

/* =============================================
   달력 스타일
=============================================== */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar .day-name { color: var(--muted); font-size: 12px; text-align: center; padding: 6px 0; }
.calendar .cell { border: 1px solid var(--border); border-radius: 10px; min-height: 90px; padding: 8px; background: var(--card); }
.calendar .cell .date { font-weight: 700; font-size: 12px; color: var(--muted); }
.game-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; background: rgba(255,51,102,.12); color: #ff799a; border: 1px solid rgba(255,51,102,.28); font-size: 12px; }

/* =============================================
   선수 성적 페이지
=============================================== */
.stats-container { max-width: 1200px; margin: 0 auto; }
.profile-card { 
  display: flex; gap: 20px; align-items: center; 
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; 
  padding: 20px; margin-bottom: 20px; 
}
.profile-photo { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; background: #1c1c2e; }
.profile-info h2 { margin: 0 0 8px; font-size: 24px; }
.profile-info .player-role { color: var(--muted); margin-bottom: 12px; }
.ability-grid { 
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; 
  margin-top: 12px; 
}
.ability-item { 
  text-align: center; padding: 8px; 
  background: rgba(255,255,255,0.05); border-radius: 8px; 
}
.ability-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ability-value { font-size: 18px; font-weight: 700; color: var(--primary); }

.tab-container { margin-bottom: 20px; }
.tab-nav { 
  display: flex; gap: 4px; margin-bottom: 16px; 
  background: var(--card); border-radius: 10px; padding: 4px; 
}
.tab-button { 
  flex: 1; padding: 10px 16px; border-radius: 8px; 
  background: transparent; color: var(--muted); border: none; 
  cursor: pointer; transition: all 0.2s; 
}
.tab-button.active { background: var(--primary); color: white; }
.tab-button:hover:not(.active) { background: rgba(255,255,255,0.05); }

.stats-section { 
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; 
  padding: 20px; margin-bottom: 16px; 
}
.section-header { 
  display: flex; justify-content: space-between; align-items: center; 
  margin-bottom: 16px; 
}
.section-title { font-size: 18px; font-weight: 700; margin: 0; }
.detail-button { 
  padding: 6px 12px; border-radius: 6px; 
  background: var(--primary); color: white; border: none; 
  cursor: pointer; font-size: 12px; 
}
.detail-button:hover { background: var(--primary-700); }

.stats-table { 
  width: 100%; border-collapse: collapse; 
}
.stats-table th, .stats-table td { 
  padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); 
}
.stats-table th { 
  background: rgba(255,255,255,0.05); font-weight: 600; color: var(--muted); 
}
.stats-table td { color: var(--text); }

.modal { 
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
  background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; 
  z-index: 1000; 
}
.modal-content { 
  background: var(--card); border-radius: 14px; padding: 24px; 
  max-width: 90vw; max-height: 90vh; overflow-y: auto; 
}
.modal-header { 
  display: flex; justify-content: space-between; align-items: center; 
  margin-bottom: 20px; 
}
.modal-title { font-size: 20px; font-weight: 700; margin: 0; }
.close-button { 
  background: none; border: none; color: var(--muted); 
  font-size: 24px; cursor: pointer; 
}


