:root {
  /* Light Theme */
  --primary-color: oklch(0.65 0.25 260);
  --accent-color: oklch(0.7 0.25 320);
  --bg-color: oklch(0.98 0.01 260);
  --card-bg: oklch(1 0 0);
  --text-color: oklch(0.2 0.05 260);
  --border-color: oklch(0.9 0.02 260);
  --shadow-color: rgba(0, 0, 0, 0.05);
  --header-bg: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] {
  /* Dark Theme */
  --primary-color: oklch(0.7 0.2 260);
  --accent-color: oklch(0.75 0.2 320);
  --bg-color: oklch(0.12 0.02 260);
  --card-bg: oklch(0.18 0.02 260);
  --text-color: oklch(0.95 0.01 260);
  --border-color: oklch(0.25 0.02 260);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --header-bg: rgba(18, 18, 18, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', -apple-system, system-ui, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

/* Header & Nav */
.main-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 0;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.theme-toggle-inline {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Main Layout */
.section {
  padding: 5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.content-wrapper {
  max-width: 1000px;
  width: 100%;
}

h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 2rem; text-align: center; }
.subtitle { font-size: 1.1rem; opacity: 0.7; margin-bottom: 3rem; }

/* Lotto Generator */
.numbers-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  min-height: 4rem;
}

.lotto-ball {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.primary-btn {
  padding: 1.2rem 2.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 3rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.primary-btn:hover { transform: translateY(-3px); }

/* Info Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.info-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px var(--shadow-color);
}

.info-card h3 { color: var(--primary-color); margin-bottom: 1rem; font-size: 1.5rem; }

/* Text Content Section */
.text-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  text-align: left;
}

.text-content ul { margin: 1.5rem 0 1.5rem 1.5rem; }
.text-content li { margin-bottom: 1rem; }

/* Form Styling */
form {
  text-align: left;
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
}

.input-group { margin-bottom: 1.5rem; }
.input-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.input-group input, .input-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  border-radius: 0.5rem;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
}

/* Footer */
.main-footer {
  padding: 4rem 2rem;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-links a { color: var(--text-color); opacity: 0.6; text-decoration: none; font-size: 0.9rem; }

/* Animations */
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  h1 { font-size: 2rem; }
  .section { padding: 3rem 1.5rem; }
}
