:root {
  --bg: #ffffff;
  --text: #333333;
  --primary: #27ae60;
  --primary-hover: #2ecc71;
  --accent: #f1c40f;
  --border: #eeeeee;
  --input-bg: #fdfdfd;
  --nav-bg: #ffffff;
}

body.dark-mode {
  --bg: #000000;
  --text: #ffffff;
  --primary: #2ecc71;
  --primary-hover: #27ae60;
  --accent: #f39c12;
  --border: #333333;
  --input-bg: #111111;
  --nav-bg: #111111;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  padding-top: 60px; /* Header space */
  line-height: 1.6;
  transition: 0.3s ease;
}

/* Header & Nav */
.main-header {
  position: fixed;
  top: 0; width: 100%;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  z-index: 2000;
}
.nav-container {
  max-width: 1000px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}
.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); }
.nav-menu { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nav-menu a { text-decoration: none; color: var(--text); font-weight: 500; }

/* Theme Toggle */
#theme-toggle {
  position: fixed;
  top: 70px; right: 20px;
  z-index: 2100;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
}

/* Container */
.container {
  max-width: 800px;
  margin: auto;
  padding: 20px;
}

/* Hero Section */
.hero { padding: 40px 0; text-align: center; }
.hero h1 { font-size: 2.5rem; margin-bottom: 10px; color: var(--primary); }

/* Generator */
.generator-box {
  background: var(--input-bg);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}
.btn-primary {
  width: 100%; padding: 18px; font-size: 1.25rem; font-weight: bold;
  background: var(--primary); color: white; border: none; border-radius: 10px;
  cursor: pointer; transition: 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* Lotto Balls */
.result-area { margin-top: 25px; display: flex; flex-direction: column; gap: 10px; }
.lotto-row { display: flex; justify-content: center; gap: 12px; }
.ball {
  width: 45px; height: 45px;
  background: var(--accent); color: #000;
  border-radius: 50%; font-weight: bold;
  display: flex; justify-content: center; align-items: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* Content Sections */
.section { padding: 50px 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 600px) { .info-grid { grid-template-columns: 1fr; } }
.info-card { background: var(--input-bg); padding: 20px; border-radius: 10px; border: 1px solid var(--border); }
.faq-item { margin-bottom: 20px; }
.faq-item h3 { color: var(--primary); }

/* Adsense */
.adsense-container {
  margin: 30px 0; min-height: 100px;
  background: var(--input-bg); border: 1px dashed var(--border);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.ad-label { font-size: 10px; color: #999; }

/* Form */
.contact-form { background: var(--input-bg); padding: 25px; border-radius: 10px; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); border-radius: 6px; box-sizing: border-box;
}
.btn-submit { width: 100%; padding: 12px; background: var(--text); color: var(--bg); border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }

/* Footer */
.main-footer {
  margin-top: 50px; padding: 40px 20px;
  background: var(--input-bg); border-top: 1px solid var(--border);
  text-align: center;
}
.footer-links { list-style: none; display: flex; justify-content: center; gap: 20px; padding: 0; margin-top: 15px; }
.footer-links a { color: var(--text); text-decoration: none; font-size: 0.9rem; }
