/* =========================
   [style.css 최종 완성]
   - 폰트, 유리 질감, 반응형, 애니메이션 통합
   - 제목 중앙 정렬 적용
========================= */

/* 1. 폰트 불러오기 (Pretendard) */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  color: #111;
  background-color: #f3f4f6;
  
  /* 배경에 은은한 점 패턴 추가 */
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 20px 20px;
  
  scroll-behavior: smooth;
}

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

/* === 페이지 전환 애니메이션 === */
body { opacity: 0; transition: opacity 0.3s ease-in-out; }
body.page-ready { opacity: 1; }
body.page-leave { opacity: 0; }

/* === 헤더 (유리 질감) === */
header {
  position: sticky; top: 0; z-index: 1000;
  height: 64px;
  background: rgba(255, 255, 255, 0.75); /* 반투명 */
  backdrop-filter: blur(12px);          /* 블러 효과 */
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex; align-items: center; padding: 0 18px; gap: 14px;
}
.menu { order: 1; font-size: 28px; cursor: pointer; }
.logo { order: 2; font-weight: 800; font-size: 20px; }

/* === 사이드바 === */
.sidebar {
  position: fixed; top: 0; left: -280px;
  width: 280px; height: 100vh; background: #fff;
  box-shadow: 2px 0 18px rgba(0,0,0,0.12);
  z-index: 1100; transition: left 0.28s ease; padding: 18px 16px;
}
.sidebar.open { left: 0; }
.sidebar h3 { margin: 10px 0 12px; font-size: 18px; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li a { display: block; padding: 10px; border-radius: 10px; }
.sidebar li a:hover { background: #f2f4f7; }

.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  opacity: 0; visibility: hidden; transition: 0.2s; z-index: 1050;
}
.overlay.show { opacity: 1; visibility: visible; }

/* === Hero 섹션 === */
.hero {
  height: calc(100vh - 64px);
  background-image: url("https://images.pexels.com/photos/274422/pexels-photo-274422.jpeg");
  background-size: cover; background-position: center;
  position: relative; display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.hero-content { position: relative; text-align: center; padding: 22px; }
.hero-content h1 { font-size: 44px; margin-bottom: 10px; }

/* Hero 버튼 */
.hero-btn {
  display: inline-block; margin-top: 15px; padding: 16px 32px;
  background-color: #2563eb; color: #fff;
  font-size: 18px; font-weight: 800; border-radius: 50px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: all 0.3s ease;
}
.hero-btn:hover {
  background-color: #1d4ed8; transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.6);
}

/* === 메인 컨테이너 === */
.container {
  width: min(1600px, calc(100% - 40px));
  margin: 28px auto 70px;
  background: #fff; border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
  padding: 34px 26px 46px;
}

/* 뒤로가기 버튼 */
.back-link {
  display: inline-block; padding: 8px 16px;
  background-color: #f1f3f5; color: #495057;
  border-radius: 20px; font-size: 14px; font-weight: 600;
  transition: 0.2s; margin-bottom: 20px;
}
.back-link:hover { background-color: #e9ecef; color: #212529; }

/* === [수정] 제목 중앙 정렬 스타일 === */
h1 {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  /* 중앙 정렬 */
  display: block;        
  width: fit-content;     
  margin: 10px auto 30px; 
  text-align: center;
}

h1, h2 {
  text-align: center !important;
  letter-spacing: -0.5px; word-break: keep-all;
}
.container h2 { margin-top: 50px; margin-bottom: 30px; }

/* === 카드 리스트 === */
.card-container {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 1500px; margin: 34px auto 0; padding: 0 14px;
}
.card {
  background: #fff; border-radius: 24px; padding: 28px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08); height: 360px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}
.card img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 18px; transition: transform 0.5s ease; }
.card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12); }
.card:hover img { transform: scale(1.12); }

/* === 선수 프로필 === */
.player-profile {
  display: flex; flex-direction: column; align-items: center;
  margin: 60px auto; padding: 0 20px; max-width: 800px;
}
.player-profile figure {
  margin: 0 !important; padding: 0 !important;
  display: flex; flex-direction: column; align-items: center; width: 100%;
}
.player-profile img {
  width: 250px !important; height: 250px !important;
  object-fit: cover !important; border-radius: 50% !important;
  border: 5px solid #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  margin-bottom: 20px;
}
.player-profile figcaption {
  font-size: 24px; font-weight: 800; color: #111; margin-bottom: 15px;
}
.player-profile .player-info {
  background-color: #f8f9fa; border-radius: 20px; padding: 30px;
  width: 100%; text-align: center; line-height: 1.8; color: #444;
}
.player-info strong { color: #2563eb; font-weight: 900; margin-right: 6px; }

/* === 팀 이동 버튼 === */
.team-nav {
  display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px;
  border-top: 1px solid #eee;
}
.team-nav a {
  font-weight: 700; color: #555; padding: 10px 20px;
  background: #f1f3f5; border-radius: 10px; transition: 0.2s;
}
.team-nav a:hover { background: #e9ecef; color: #2563eb; }

/* === 푸터 === */
footer {
  background: #111; color: #aaa; padding: 40px 20px;
  text-align: center; margin-top: 80px; font-size: 14px;
}