/* ============================================
   모던 인덱스 페이지 스타일
   ============================================ */

/* 기본 설정 및 변수 */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #ec4899;
  --background: #ffffff;
  --surface: #f8fafc;
  --surface-hover: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* 다크모드 변수 */
body.dark-mode {
  --background: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border-color: #334155;
}

/* 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   네비게이션 바
   ============================================ */
.modern-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

body.dark-mode .modern-nav {
  background: rgba(15, 23, 42, 0.8);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.brand-logo {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.05);
}

/* 햄버거 메뉴 버튼 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* 테마 토글 */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.sun-icon {
  display: none;
}

.moon-icon {
  display: block;
}

body.dark-mode .sun-icon {
  display: block;
}

body.dark-mode .moon-icon {
  display: none;
}

/* ============================================
   사이드 메뉴
   ============================================ */
.side-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background: var(--background);
  box-shadow: var(--shadow-xl);
  z-index: 2000;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.side-menu.active {
  right: 0;
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.side-menu-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.close-menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.close-menu:hover {
  background: var(--surface-hover);
}

.side-menu-content {
  padding: 1rem;
}

.menu-category {
  margin-bottom: 2rem;
}

.menu-category h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  padding: 0 0.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  margin-bottom: 0.25rem;
}

.menu-item:hover {
  background: var(--surface-hover);
  transform: translateX(5px);
}

.menu-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.menu-theme-toggle {
  padding: 1rem 0.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1rem;
}

.theme-toggle-mobile {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1rem;
}

.theme-toggle-mobile:hover {
  background: var(--surface-hover);
}

/* 메뉴 오버레이 */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   알림 배너
   ============================================ */
.alert-banner {
  display: block;
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
  padding: 1rem;
  position: relative;
  animation: slideDown 0.3s ease;
}

body.dark-mode .alert-banner {
  background: linear-gradient(135deg, #064e3b, #065f46);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #065f46;
}

body.dark-mode .alert-content {
  color: #a7f3d0;
}

.alert-icon {
  font-size: 1.5rem;
}

.alert-text {
  flex: 1;
  font-size: 0.95rem;
}

.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  color: inherit;
}

.alert-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ============================================
   히어로 섹션
   ============================================ */
.hero-section {
  position: relative;
  padding: 8rem 2rem 6rem;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

body.dark-mode .hero-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.hero-content {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-title-main {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease;
}

.hero-title-sub {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-secondary);
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--primary-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--text-secondary);
}

.stat-label {
  font-size: 0.95rem;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 60px;
  background: var(--border-color);
}

/* 히어로 배경 애니메이션 */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-color);
  top: -200px;
  left: -200px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--secondary-color);
  bottom: -150px;
  right: -150px;
  animation-delay: -5s;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--primary-light);
  top: 50%;
  right: 10%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ============================================
   섹션 공통 스타일
   ============================================ */
.features-section,
.tools-section {
  padding: 5rem 2rem;
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 4rem;
}

/* ============================================
   주요 기능 카드
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
  overflow: hidden;
  cursor: pointer;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.feature-card-large {
  grid-column: span 1;
}

.feature-card-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.feature-card:hover .feature-card-icon {
  animation: none;
  transform: scale(1.1) rotate(5deg);
}

.feature-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.feature-card-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, rgb(239, 68, 68), rgb(220, 38, 38));
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feature-card-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--primary-color);
}

.feature-card:hover .feature-card-arrow {
  background: var(--primary-color);
  color: white;
  transform: translateX(5px);
}

/* ============================================
   도구 섹션
   ============================================ */
.tools-section {
  background: var(--surface);
}

.tool-category {
  margin-bottom: 4rem;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.category-icon {
  font-size: 2rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.tool-card-tag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.tool-card-tag.new {
  background: linear-gradient(135deg, #10b981, #059669);
}

.tool-card-tag.hot {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.tool-card-tag.update {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.tool-card-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
  flex-shrink: 0;
}

.tool-card-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.tool-card-content p {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* ============================================
   CTA 섹션
   ============================================ */
.cta-section {
  padding: 5rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: white;
  color: var(--primary-color);
  border-radius: var(--radius-md);
  font-size: 1.125rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   푸터
   ============================================ */
.modern-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 2rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.footer-copyright {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* ============================================
   반응형 디자인
   ============================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .desktop-menu {
    display: none;
  }

  .hero-section {
    padding: 4rem 1.5rem 3rem;
  }

  .hero-title-main {
    font-size: 2.5rem;
  }

  .hero-title-sub {
    font-size: 1.5rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-divider {
    display: none;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .features-section,
  .tools-section {
    padding: 3rem 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .cta-title {
    font-size: 1.75rem;
  }

  .cta-description {
    font-size: 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-container {
    padding: 1rem 1.5rem;
  }

  .alert-content {
    padding: 0 1.5rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .hero-title-main {
    font-size: 2rem;
  }

  .hero-title-sub {
    font-size: 1.25rem;
  }

  .side-menu {
    width: 100%;
    right: -100%;
  }

  .side-menu.active {
    right: 0;
  }
}

/* ============================================
   애니메이션 효과 (AOS 대체)
   ============================================ */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   접근성 개선
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 포커스 스타일 */
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 프린트 스타일 */
@media print {
  .modern-nav,
  .side-menu,
  .menu-overlay,
  .alert-banner,
  .cta-section {
    display: none;
  }
}
