/* Global elegant, responsive theme */
:root {
  /* 다크 테마 (기본) */
  --color-bg: #0b0b0c;
  --color-surface: #151518;
  --color-elev-1: rgba(255, 255, 255, 0.04);
  --color-elev-2: rgba(255, 255, 255, 0.06);
  --color-text: #f4f7fb;
  --color-text-dim: #b7beca;
  --color-primary: #ff1493; /* hot pink accent */
  --color-primary-2: #ff69b4;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius-1: 12px;
  --radius-2: 20px;
  
  /* 배경 그라데이션 */
  --bg-gradient-1: radial-gradient(1200px 600px at 10% -10%, rgba(255, 20, 147, 0.06), transparent 60%);
  --bg-gradient-2: radial-gradient(900px 500px at 110% 10%, rgba(255, 180, 218, 0.05), transparent 60%);
  --bg-gradient-3: linear-gradient(180deg, #0b0b0c, #0d0d10);
}

/* 라이트 테마 */
[data-theme="light"] {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-elev-1: rgba(0, 0, 0, 0.05);
  --color-elev-2: rgba(0, 0, 0, 0.08);
  --color-text: #000000;
  --color-text-dim: #666666;
  --color-primary: #ff1493; /* hot pink accent */
  --color-primary-2: #ff69b4;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.1);
  
  /* 라이트 테마 배경 그라데이션 */
  --bg-gradient-1: radial-gradient(1200px 600px at 10% -10%, rgba(255, 20, 147, 0.02), transparent 60%);
  --bg-gradient-2: radial-gradient(900px 500px at 110% 10%, rgba(255, 180, 218, 0.01), transparent 60%);
  --bg-gradient-3: linear-gradient(180deg, #ffffff, #fafafa);
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--bg-gradient-1), var(--bg-gradient-2), var(--bg-gradient-3);
  font-family: 'NanumSquareNeo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* Card surface utility */
.surface {
  background: var(--color-elev-1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

/* 테마 토글 버튼 */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background: var(--color-elev-1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.theme-toggle:hover {
  background: var(--color-elev-2);
  border-color: var(--color-primary);
}

.theme-toggle__slider {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-2) 100%);
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
}

/* 다크 테마일 때 */
[data-theme="dark"] .theme-toggle__slider {
  transform: translateX(0);
}

[data-theme="dark"] .theme-toggle__icon {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z'/%3E%3C/svg%3E");
}

/* 라이트 테마일 때 */
[data-theme="light"] .theme-toggle__slider {
  transform: translateX(30px);
}

[data-theme="light"] .theme-toggle__icon {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z'/%3E%3C/svg%3E");
}

/* 푸터 테마 토글 */
.footer__theme-toggle {
  background: var(--color-elev-1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  padding: 8px 16px;
  border-radius: var(--radius-1);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__theme-toggle:hover {
  background: var(--color-elev-2);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.footer__theme-toggle .theme-toggle {
  width: 40px;
  height: 20px;
}

.footer__theme-toggle .theme-toggle__slider {
  width: 16px;
  height: 16px;
}

[data-theme="light"] .footer__theme-toggle .theme-toggle__slider {
  transform: translateX(20px);
}

/* 푸터 스타일 */
.footer {
  background: var(--color-elev-1);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-top: auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.footer__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer__brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer__subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.footer__description {
  color: var(--color-text-dim);
  margin: 0;
  line-height: 1.6;
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links li {
  margin: 0;
}

.footer__links a {
  color: var(--color-text-dim);
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
}

.footer__links a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
  text-align: center;
}

.footer__copyright {
  color: var(--color-text-dim);
  margin: 0;
  font-size: 0.9rem;
}

/* 개선된 테마 스위처 디자인 */
.theme-switcher {
  margin-top: -5px;
  margin-left: -3px;
  display: flex;
  align-items: center;
}

.theme-switcher__button {
  --switcher-bg: var(--color-elev-1);
  --switcher-border: var(--color-elev-2);
  --switcher-text: var(--color-text);
  --switcher-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  
  background: var(--switcher-bg);
  border: 1px solid var(--switcher-border);
  color: var(--switcher-text);
  padding: 8px 12px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-width: 120px;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--switcher-shadow);
  user-select: none;
  -webkit-user-select: none;
}

.theme-switcher__button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 20, 147, 0.15), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.theme-switcher__button:hover::before {
  left: 100%;
}

.theme-switcher__button:hover {
  --switcher-bg: var(--color-elev-2);
  --switcher-border: var(--color-primary);
  --switcher-shadow: 0 4px 16px rgba(255, 20, 147, 0.2);
  
  transform: translateY(-1px);
}

.theme-switcher__button:active {
  --switcher-shadow: 0 2px 8px rgba(255, 20, 147, 0.3);
  
  transform: translateY(0);
}

.theme-switcher__button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.theme-switcher__track {
  --track-bg: var(--color-elev-2);
  --track-border: var(--color-elev-1);
  
  width: 40px;
  height: 20px;
  background: var(--track-bg);
  border: 1px solid var(--track-border);
  border-radius: 10px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  will-change: background-color, border-color;
}

.theme-switcher__thumb {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-2) 100%);
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  will-change: transform;
}

/* 아이콘 제거 - 깔끔한 스위치만 유지 */

/* 기존 아이콘 스타일 제거 - CSS 의사 요소로 대체됨 */

.theme-switcher__label {
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  font-size: 0.8rem;
  z-index: 1;
  position: relative;
}

/* 다크 테마 상태 */
[data-theme="dark"] .theme-switcher__track {
  --track-bg: var(--color-elev-2);
}

[data-theme="dark"] .theme-switcher__thumb {
  transform: translateX(0);
}

/* 아이콘 제거로 인한 다크 테마 스타일 정리 */

/* 라이트 테마 상태 */
[data-theme="light"] .theme-switcher__track {
  --track-bg: #e0e0e0;
  --track-border: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-switcher__thumb {
  transform: translateX(20px);
}

/* 아이콘 제거로 인한 라이트 테마 스타일 정리 */

/* 라이트 테마 푸터 스타일 */
[data-theme="light"] .footer {
  background: #f8f9fa;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .footer__bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-switcher__button {
  --switcher-bg: #ffffff;
  --switcher-border: rgba(0, 0, 0, 0.1);
  --switcher-text: #000000;
  --switcher-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-switcher__button:hover {
  --switcher-bg: #f8f8f8;
  --switcher-border: var(--color-primary);
  --switcher-shadow: 0 4px 16px rgba(255, 20, 147, 0.2);
}

/* 반응형 */
@media (max-width: 768px) {
  .footer__content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer__container {
    padding: 1.5rem 1rem;
  }
  
  .footer__brand-wrap {
    justify-content: center;
  }
  
  .theme-switcher {
    justify-content: center;
    margin-top: 0;
  }
  
  .theme-switcher__button {
    min-width: 100px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  
  .theme-switcher__track {
    width: 36px;
    height: 18px;
  }
  
  .theme-switcher__thumb {
    width: 14px;
    height: 14px;
  }
  
/* 아이콘 제거로 인한 반응형 스타일 정리 */
}

@media (max-width: 480px) {
  .theme-switcher__button {
    min-width: 90px;
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  
  .theme-switcher__track {
    width: 32px;
    height: 16px;
  }
  
  .theme-switcher__thumb {
    width: 12px;
    height: 12px;
  }
  
/* 아이콘 제거로 인한 모바일 스타일 정리 */
}

/* Smooth links */
a {
  color: var(--color-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn-primary-gradient {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(45deg, var(--color-primary), var(--color-primary-2));
  color: #fff;
  border: 0;
  box-shadow: 0 6px 22px rgba(255, 20, 147, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 20, 147, 0.4);
}

/* Footer refined */
.footer {
  background: #0a0a0b;
  color: #fff;
  padding: 64px 20px 24px;
}

.footer__container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.footer__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
  margin-bottom: 32px;
}

.footer__title {
  font-size: 24px;
  font-family: 'NanumSquareNeoHeavy', sans-serif;
  background: linear-gradient(45deg, var(--color-primary), #ffb4da);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer__description {
  color: var(--color-text-dim);
  line-height: 1.65;
}

.footer__subtitle {
  font-size: 16px;
  font-family: 'NanumSquareNeoBold', sans-serif;
  margin-bottom: 14px;
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__links li { margin-bottom: 10px; }

.footer__links a {
  color: var(--color-text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--color-primary);
}

.footer__bottom {
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__copyright {
  color: #7b8290;
  font-size: 13px;
}

@media (max-width: 768px) {
  .footer { padding: 48px 20px 20px; }
  .footer__content { grid-template-columns: 1fr; gap: 28px; }
  .footer__section { text-align: center; }
}

/* Small polish for index sections to feel cohesive with global theme */
.hero, .stats, .cta { position: relative; }
.feature { border: 1px solid rgba(255, 255, 255, 0.08); }

/* 테마 전환 애니메이션 */
.theme-transitioning * {
  transition: background-color var(--transition-duration, 300ms) ease,
              color var(--transition-duration, 300ms) ease,
              border-color var(--transition-duration, 300ms) ease,
              box-shadow var(--transition-duration, 300ms) ease !important;
}

/* 테마 스위처 펄스 애니메이션 */
@keyframes themeTogglePulse {
  0% { 
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 20, 147, 0.1);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 20, 147, 0.3);
  }
  100% { 
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 20, 147, 0.1);
  }
}

/* Optional subtle shimmer keyframes if not defined */
@keyframes shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

