:root {
  /* Light Mode Variables (Default) */
  --primary-color: #6366f1;
  --secondary-color: #a855f7;
  --background-bg: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.8);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --row-bg: rgba(255, 255, 255, 0.5);
  --border-color: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
  /* Dark Mode Variables */
  --primary-color: #818cf8;
  --secondary-color: #c084fc;
  --background-bg: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.8);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --row-bg: rgba(15, 23, 42, 0.5);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--background-bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 600px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2.5rem;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  text-align: center;
  position: relative;
}

/* Theme Toggle Button */
.theme-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--row-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.05);
  background: var(--primary-color);
  color: white;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
}

p.subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

#generator-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  margin-bottom: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

#generator-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4);
}

#generator-btn:active {
  transform: translateY(-1px);
}

#lotto-numbers-container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.lotto-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.2rem;
  background: var(--row-bg);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

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

.lotto-number {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lotto-number:hover {
  transform: scale(1.15) rotate(5deg);
}

/* Lotto Color Palettes (Gradients) */
.n-1 { background: radial-gradient(circle at 30% 30%, #fde047, #eab308); color: #854d0e; }
.n-2 { background: radial-gradient(circle at 30% 30%, #60a5fa, #2563eb); }
.n-3 { background: radial-gradient(circle at 30% 30%, #f87171, #dc2626); }
.n-4 { background: radial-gradient(circle at 30% 30%, #94a3b8, #475569); }
.n-5 { background: radial-gradient(circle at 30% 30%, #4ade80, #16a34a); }

@media (max-width: 480px) {
  .container { padding: 2rem 1.5rem; }
  h1 { font-size: 2rem; }
  .lotto-number { width: 38px; height: 38px; font-size: 1rem; }
  .lotto-row { gap: 0.5rem; padding: 1rem; }
}
