:root {
  --bg-color: #0f172a;
  --bg-gradient: linear-gradient(135deg, #0f172a, #1e1b4b);
  --text-color: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.12);
  --heading-color: #c7d2fe;
  --accent-color: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1, #818cf8);
  --shadow-color: rgba(99, 102, 241, 0.25);
  --hero-overlay: rgba(15, 23, 42, 0.65);
}

[data-theme="light"] {
  --bg-color: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f8fafc, #e2e8f0);
  --text-color: #1e293b;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0, 0, 0, 0.1);
  --heading-color: #4338ca;
  --accent-color: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #4f46e5, #6366f1);
  --shadow-color: rgba(79, 70, 229, 0.15);
  --hero-overlay: rgba(255, 255, 255, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Noto Sans KR", sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-color);
  overflow-x: hidden;
  min-height: 100vh;
}

/* 🌌 배경 효과 */
body::before {
  content: "";
  position: fixed;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 40%);
  animation: glowMove 20s linear infinite;
  z-index: -1;
}

@keyframes glowMove {
  from { transform: translate(-10%, -10%); }
  to { transform: translate(-30%, -30%); }
}

header {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: url('https://images.unsplash.com/photo-1502139214982-d0ad755818d8?q=80&w=2000') center/cover;
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  transition: background 0.3s;
}

.hero {
  position: relative;
  z-index: 1;
  animation: fadeUp 1.5s ease;
}

.hero h1 {
  font-size: 52px;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #a5b4fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 20px;
  opacity: 0.9;
}

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

section {
  max-width: 1100px;
  margin: auto;
  padding: 80px 20px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 35px;
  margin-bottom: 30px;
  border: 1px solid var(--card-border);
  transition: 0.4s;
  animation: fadeIn 1s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px var(--shadow-color);
}

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

h2 {
  font-size: 26px;
  margin-bottom: 15px;
  color: var(--heading-color);
}

p {
  line-height: 1.7;
  opacity: 0.9;
}

button {
  padding: 14px 26px;
  border: none;
  border-radius: 14px;
  background: var(--accent-gradient);
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px var(--shadow-color);
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  backdrop-filter: blur(10px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.review {
  background: rgba(99, 102, 241, 0.12);
  padding: 18px;
  border-radius: 14px;
  font-size: 14px;
}

.lotto-result {
  margin-top: 20px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  color: var(--heading-color);
  animation: pop 0.4s ease;
}

@keyframes pop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

footer {
  text-align: center;
  padding: 40px;
  font-size: 14px;
  opacity: 0.5;
}

/* 📱 반응형 */
@media (max-width: 768px) {
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 16px; }
  h2 { font-size: 22px; }
}
