:root {
  --primary-color: #2c3e50;
  --accent-color: #1f7a64;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-main: #18212f;
  --text-muted: #52606f;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --radius: 18px;
}

body {
  font-family: 'Pretendard', Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(253, 217, 80, 0.15), transparent 34rem),
    linear-gradient(135deg, #f7fbff 0%, #eef4f8 48%, #fff7df 100%);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}

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

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

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

/* Hero Section */
.hero {
  text-align: center;
  padding: 5rem 2rem;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 58px);
  margin-bottom: 1rem;
  color: var(--primary-color);
  line-height: 1.1;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Layout */
.content-wrapper {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem;
}

.section {
  margin-bottom: 4rem;
}

.card {
  background: rgba(255, 255, 255, 0.88);
  padding: clamp(24px, 4vw, 46px);
  border-radius: var(--radius);
  box-shadow: 0 22px 70px rgba(32, 44, 64, 0.16);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(24, 33, 47, 0.1);
}

h2 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.8rem;
}

/* Lotto Panel */
.panel {
  display: grid;
  gap: 18px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: #f5f8fb;
  border: 1px solid #e2e8ef;
  border-radius: 12px;
}

.controls label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #263241;
}

.controls input,
.controls select {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #ccd7e1;
  padding: 0 12px;
  background: white;
  font-weight: 700;
}

.btn-draw, .btn-copy, .btn-secondary {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-draw {
  background: #1f7a64;
  color: white;
  box-shadow: 0 8px 18px rgba(31, 122, 100, 0.22);
}

.btn-draw:hover {
  background: #176855;
  transform: translateY(-1px);
}

.btn-copy {
  background: #243142;
  color: white;
  box-shadow: 0 8px 18px rgba(36, 49, 66, 0.16);
}

.btn-copy:hover {
  background: #172130;
  transform: translateY(-1px);
}

.input-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.toast {
  min-height: 22px;
  color: #1f7a64;
  font-weight: 800;
  text-align: center;
}

/* Results Display */
.results {
  display: grid;
  gap: 14px;
}

.game {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  background: white;
}

.game-title {
  min-width: 68px;
  font-weight: 800;
  color: #374151;
}

.balls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.16), 0 8px 16px rgba(31, 41, 55, 0.12);
}

.ball.yellow { background: #f4b400; }
.ball.blue { background: #2f80ed; }
.ball.red { background: #eb5757; }
.ball.gray { background: #6b7280; }
.ball.green { background: #27ae60; }

.ball.fixed {
  outline: 4px solid rgba(31, 122, 100, 0.28);
  outline-offset: 3px;
}

.plus {
  color: #7b8794;
  font-weight: 900;
  font-size: 20px;
}

.empty {
  padding: 28px 18px;
  border: 1px dashed #becad6;
  border-radius: 12px;
  color: #697586;
  text-align: center;
  background: rgba(255, 255, 255, 0.62);
}

/* Info Grid & Guides */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 1.5rem;
}

.info-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #1f7a64;
}

.info-item h3 { margin-top: 0; color: var(--primary-color); }

.guide-list { padding-left: 1.2rem; }
.guide-list li { margin-bottom: 0.8rem; }

.alt-card { background: #fff9db; border: 1px solid #ffec99; }

/* Form */
.form-row { display: flex; gap: 15px; }
.form-group { flex: 1; margin-bottom: 1rem; }
.pro-form input, .pro-form textarea {
  width: 100%; padding: 12px; border: 1px solid #dee2e6; border-radius: 6px;
}
.pro-form textarea { height: 100px; resize: none; }
.btn-secondary { background-color: var(--primary-color); color: white; width: 100%; }

/* Footer */
.footer { background: white; padding: 3rem 2rem; border-top: 1px solid #eee; text-align: center; }
.footer-nav { margin-top: 1rem; }
.footer-nav a { margin: 0 10px; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.copyright { margin-top: 2rem; font-size: 0.85rem; color: #999; }

@media (max-width: 620px) {
  .nav-links { display: none; }
  .controls { align-items: stretch; flex-direction: column; }
  .game { grid-template-columns: 1fr; }
  .ball { width: 42px; height: 42px; font-size: 16px; }
  .info-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
}
