/* ============================================
   ORCA SPORT - 다크 네이비 스포츠 톤 테마
   야구 강의+분석+커뮤니티 플랫폼 디자인
   ============================================ */

:root {
  /* 다크 네이비 컬러 팔레트 */
  --bg-dark: #0b1220;
  --bg-dark-secondary: #0f1a2b;
  --bg-dark-tertiary: #1a2332;
  --bg-card: #1e293b;
  --bg-card-hover: #253447;
  
  /* 그라데이션 */
  --gradient-primary: linear-gradient(135deg, #0b1220 0%, #0f1a2b 25%, #1a2332 50%, #1e293b 75%, #253447 100%);
  --gradient-accent: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
  --gradient-stadium: radial-gradient(ellipse at center, rgba(220, 38, 38, 0.15) 0%, rgba(11, 18, 32, 0.8) 70%);
  
  /* 텍스트 컬러 */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-disabled: rgba(255, 255, 255, 0.4);
  
  /* 액센트 컬러 (야구 톤) */
  --accent-primary: #dc2626;
  --accent-secondary: #ef4444;
  --accent-tertiary: #f87171;
  --accent-hover: #b91c1c;
  
  /* 스트로크/보더 */
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-hover: rgba(255, 255, 255, 0.2);
  --stroke-accent: rgba(220, 38, 38, 0.3);
  
  /* 그림자 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.3);
  
  /* 반경 */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  /* 간격 */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  
  /* 폰트 */
  font-family: "Inter", system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

/* ============================================
   전역 스타일
   ============================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 배경 패턴 (스타디움 느낌) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    var(--gradient-stadium),
    radial-gradient(circle at 20% 30%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(220, 38, 38, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

/* ============================================
   레이아웃
   ============================================ */

.layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.content {
  min-height: 100vh;
  background: transparent;
}

/* ============================================
   헤더 (다크 네이비 스타일)
   ============================================ */

.site-header {
  background: var(--gradient-primary);
  border-bottom: 1px solid var(--stroke);
  padding: var(--spacing-md) clamp(20px, 6vw, 72px);
  padding-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  justify-content: space-between;
}

.header-logo img {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.header-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.header-login-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  position: relative;
}

.header-login-toggle {
  background: rgba(220, 38, 38, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid var(--stroke-accent);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.header-login-toggle:hover {
  background: rgba(220, 38, 38, 0.3);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.header-login-box {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2001;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
}

.header-login-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--spacing-xs);
}

.header-login-form input {
  padding: 8px 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--bg-dark-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  transition: all 0.2s ease;
}

.header-login-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.header-nav-wrapper {
  margin-top: 0;
}

.header-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  background: transparent;
  border-top: 1px solid var(--stroke);
  padding: var(--spacing-sm) 0;
  flex-wrap: wrap;
}

.header-nav__link {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.header-nav__link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.header-nav__link.active {
  background: rgba(220, 38, 38, 0.2);
  color: var(--accent-secondary);
}

.header-nav__dropdown {
  position: relative;
  z-index: 1001;
}

.header-nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 8px 0;
  margin-top: 8px;
  z-index: 1002;
}

.header-nav__dropdown:hover .header-nav__dropdown-menu {
  display: block;
}

.header-nav__dropdown-item {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.header-nav__dropdown-item:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--text-primary);
}

.header-nav__dropdown-item.active {
  background: rgba(220, 38, 38, 0.2);
  color: var(--accent-secondary);
  font-weight: 600;
}

/* ============================================
   사이드바
   ============================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 240px;
  padding: 80px 18px 28px;
  background: var(--bg-card);
  border-right: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  z-index: 3000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text-primary);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar__link {
  display: block;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.sidebar__link.active {
  background: rgba(220, 38, 38, 0.2);
  color: var(--accent-secondary);
}

.sidebar__dropdown-menu {
  display: none;
  margin-top: 8px;
  padding-left: 16px;
  flex-direction: column;
  gap: 4px;
}

.sidebar__dropdown:hover .sidebar__dropdown-menu {
  display: flex;
}

.sidebar__dropdown-item {
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s ease;
}

.sidebar__dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.sidebar__dropdown-item.active {
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent-secondary);
  font-weight: 600;
}

.sidebar-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 3001;
  width: 44px;
  height: 44px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.sidebar-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.sidebar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.sidebar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   버튼
   ============================================ */

.button {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-family: inherit;
}

.button.primary {
  background: var(--gradient-accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.button.primary:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #ef4444 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.button.secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--stroke);
}

.button.secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--stroke-hover);
}

.button.ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--stroke);
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.button.small {
  padding: 8px 16px;
  font-size: 13px;
}

/* ============================================
   카드
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--stroke-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   섹션
   ============================================ */

.section {
  padding: var(--spacing-2xl) clamp(20px, 6vw, 72px);
  position: relative;
}

.section__title {
  margin-bottom: var(--spacing-xl);
}

.section__title h2 {
  margin: 4px 0;
  font-size: clamp(24px, 4vw, 32px);
  color: var(--text-primary);
  font-weight: 700;
}

.eyebrow {
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent-secondary);
  margin: 0;
  font-weight: 600;
}

.lede {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}

/* ============================================
   히어로 섹션
   ============================================ */

.hero-message {
  padding: var(--spacing-3xl) clamp(20px, 6vw, 72px);
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-message-card {
  max-width: 1200px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  padding: 64px clamp(32px, 5vw, 80px);
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-message-line1 {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  line-height: 1.5;
}

.hero-message-line2 {
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 400;
  margin: 0 0 32px 0;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
  line-height: 1.6;
}

.hero-message-brand {
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 700;
  margin: 0;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* ============================================
   푸터
   ============================================ */

.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--stroke);
  padding: var(--spacing-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================
   반응형
   ============================================ */

@media (max-width: 960px) {
  .header-brand {
    flex-wrap: wrap;
  }
  
  .header-login-container {
    position: relative;
    right: auto;
    margin-top: 12px;
  }
  
  .header-login-box {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .header-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .hero-message {
    padding: var(--spacing-xl) 20px;
  }

  .hero-message-card {
    padding: 48px 32px;
    border-radius: var(--radius-lg);
  }
  
  .section {
    padding: var(--spacing-xl) 20px;
  }
}

/* ============================================
   유틸리티 클래스
   ============================================ */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

/* 사이드바가 헤더 위에 표시되도록 z-index 조정 */
.sidebar {
  z-index: 3000 !important;
}

.sidebar-toggle {
  z-index: 3001 !important;
}
