/* Google Fonts 임포트: 우아한 serif 서체 Playfair Display, 모던 sans-serif 서체 Outfit */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* 변수 정의: 프리미엄 다크 그린 & 앤티크 골드 컬러 팔레트 */
:root {
  --bg-color: hsl(140, 24%, 6%);
  --bg-gradient: radial-gradient(circle at 50% 50%, hsl(140, 20%, 10%) 0%, hsl(140, 30%, 4%) 100%);
  --panel-bg: hsla(140, 16%, 12%, 0.75);
  --panel-bg-hover: hsla(140, 16%, 16%, 0.85);
  --panel-border: hsla(43, 50%, 50%, 0.15);
  --panel-border-hover: hsla(43, 70%, 55%, 0.4);
  --accent-gold: hsl(43, 60%, 52%);
  --accent-gold-hover: hsl(43, 75%, 60%);
  --accent-green: hsl(142, 50%, 40%);
  --text-primary: hsl(0, 0%, 95%);
  --text-secondary: hsl(140, 10%, 75%);
  --text-muted: hsl(140, 5%, 55%);
  
  --font-title: 'Playfair Display', Georgia, serif;
  --font-sans: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 20px hsla(43, 60%, 52%, 0.15);
  --shadow-gold-hover: 0 0 30px hsla(43, 75%, 60%, 0.3);
  
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

/* 기본 스타일 및 초기화 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* 미적 깊이감을 주는 오로라/배경 블롭 효과 */
.bg-blur-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  mix-blend-mode: screen;
  animation: float-blob 20s infinite ease-in-out alternate;
}

.blob-1 {
  width: 45vw;
  height: 45vw;
  background-color: var(--accent-green);
  top: -10%;
  left: -10%;
}

.blob-2 {
  width: 35vw;
  height: 35vw;
  background-color: var(--accent-gold);
  bottom: -5%;
  right: -5%;
  animation-delay: -5s;
}

.blob-3 {
  width: 25vw;
  height: 25vw;
  background-color: hsl(150, 40%, 30%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.08;
  animation-delay: -10s;
}

@keyframes float-blob {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(50px, 30px) scale(1.1);
  }
}

/* 전체 컨테이너 및 헤더 스타일 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.header-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(218, 165, 32, 0.1);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  border-radius: 50px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 500;
  box-shadow: var(--shadow-gold);
}

.header h1 {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header h1 span {
  color: var(--accent-gold);
}

.header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
}

/* 필터 바 스타일 */
.filter-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 10px 24px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(8px);
}

.filter-btn:hover {
  background: rgba(218, 165, 32, 0.05);
  border-color: rgba(218, 165, 32, 0.3);
  color: var(--accent-gold);
}

.filter-btn.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: hsl(140, 24%, 6%);
  box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
  font-weight: 600;
}

/* 골퍼 카드 그리드 */
.golfers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  opacity: 1;
  transition: var(--transition-smooth);
}

/* 글래스모피즘 골퍼 카드 */
.golfer-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(16px);
}

.golfer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
  opacity: 0.8;
}

.golfer-card:hover {
  transform: translateY(-8px);
  background: var(--panel-bg-hover);
  border-color: var(--panel-border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-gold-hover);
}

.card-img-container {
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
  background: #111;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  filter: grayscale(20%) sepia(10%);
}

.golfer-card:hover .card-img-container img {
  transform: scale(1.05);
  filter: grayscale(0%) sepia(0%);
}

/* 우승 배지 오버레이 */
.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(10, 18, 14, 0.85);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.card-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-period {
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.golfer-card h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.card-origin {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-origin svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent-gold);
}

.card-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  font-weight: 300;
}

.card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(218, 165, 32, 0.05);
  border: 1px solid rgba(218, 165, 32, 0.2);
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
}

.golfer-card:hover .card-btn {
  background: var(--accent-gold);
  color: hsl(140, 24%, 6%);
  border-color: var(--accent-gold);
}

/* --- 상세 페이지 스타일 --- */

.back-btn-container {
  margin-bottom: 40px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  backdrop-filter: blur(8px);
}

.back-btn:hover {
  background: rgba(218, 165, 32, 0.05);
  border-color: rgba(218, 165, 32, 0.3);
  color: var(--accent-gold);
  transform: translateX(-4px);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 900px) {
  .detail-layout {
    grid-template-columns: 380px 1fr;
  }
}

/* 상세페이지 좌측 컬럼 (프로필 요약) */
.detail-profile-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 30px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 40px;
  height: fit-content;
}

.detail-img-container {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.05);
}

.detail-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(5%);
}

.no-photo-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
  font-weight: 500;
  gap: 10px;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  border-radius: 8px;
}

.no-photo-placeholder .placeholder-icon {
  width: 36px;
  height: 36px;
  stroke: rgba(255, 255, 255, 0.3);
}

.detail-name {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.lifespan-text {
  font-size: 0.65em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 6px;
  vertical-align: middle;
}

.detail-period-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 20px;
  padding: 2px 10px;
  border: 1px solid var(--accent-gold);
  border-radius: 4px;
  background: rgba(218, 165, 32, 0.05);
}

.profile-meta-list {
  list-style: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
}

.profile-meta-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.profile-meta-label {
  color: var(--text-muted);
}

.profile-meta-value {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

/* 상세페이지 우측 컬럼 (상세 내용 및 탭 시스템) */
.detail-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 아코디언/스택 형식의 섹션 */
.info-section {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.info-section:hover {
  border-color: var(--panel-border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.info-section h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(218, 165, 32, 0.15);
  padding-bottom: 10px;
}

.info-section h3 svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-gold);
}

.info-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 300;
}

/* 메이저 우승대회 카드 목록 */
.majors-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.major-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.major-medal {
  width: 40px;
  height: 40px;
  background: rgba(218, 165, 32, 0.1);
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}

.major-desc {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
}

/* 유튜브 관련 영상 영역 */
.video-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.video-embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 반응형 비율 */
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
  background: #000;
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-credit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.video-source {
  color: var(--text-secondary);
  font-weight: 500;
}

.video-source-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.video-source-link:hover {
  text-decoration: underline;
  color: #f1c40f;
}

/* 푸터 */
.footer {
  text-align: center;
  padding: 60px 0 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 80px;
}

.footer p {
  margin-bottom: 8px;
}

.footer-link {
  color: var(--accent-gold);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--accent-gold-hover);
  text-decoration: underline;
}

/* 에러(404) 페이지 전용 스타일 */
.error-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-lg);
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  max-width: 600px;
  margin: 100px auto;
}

.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: var(--accent-gold);
}

.error-card h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.error-card p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
}
