/* 폰트 및 기본 설정 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;

  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: rgba(26, 26, 46, 0.8);
  --bg-article: rgba(255, 255, 255, 0.03);

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: var(--primary-color);

  --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: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

body {
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 배경 장식 요소들 */
.background-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  opacity: 0.05;
  animation: float 8s ease-in-out infinite;
}

.shape-1 {
  width: 150px;
  height: 150px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 100px;
  height: 100px;
  top: 60%;
  right: 15%;
  animation-delay: 3s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  bottom: 30%;
  left: 20%;
  animation-delay: 6s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(180deg);
  }
}

/* 메인 컨테이너 */
.container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
}

/* 헤더 */
.header {
  text-align: center;
  margin-bottom: 3rem;
  animation: slideInDown 0.8s ease-out;
}

.header h1 {
  font-size: 2rem;
  font-weight: 900;
  -webkit-text-stroke: 0.5px #ea00da00;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  opacity: 0.9;
}

/* 네비게이션 */
.nav {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  animation: slideInUp 0.8s ease-out 0.1s both;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.nav a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
}

/* 카드 */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  animation: slideInUp 0.8s ease-out 0.2s both;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3);
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.card h2::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem 0;
}

.card p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.card p:last-child {
  margin-bottom: 0;
}

.card ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.card li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.card li:last-child {
  margin-bottom: 0;
}

/* 푸터 */
.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  animation: slideInUp 0.8s ease-out 0.4s both;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer p:last-child {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0;
}

.footer a {
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-decoration: none;
  font-weight: 400;
}

.footer a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* 애니메이션 */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .card h2 {
    font-size: 1.25rem;
  }

  .card h3 {
    font-size: 1rem;
  }

  .card p {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.25rem;
  }

  .nav a {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .card {
    padding: 1.25rem;
  }

  .card h2 {
    font-size: 1.1rem;
  }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-article: rgba(0, 0, 0, 0.02);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-color: rgba(0, 0, 0, 0.1);
  }

  .floating-shape {
    opacity: 0.03;
  }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-shape {
    animation: none;
  }
}

/* 포커스 표시 개선 */
.nav a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 선택 스타일 */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* 스무스 스크롤 */
html {
  scroll-behavior: smooth;
}
