:root {
  --ball-y: #facc15;
  --ball-b: #3b82f6;
  --ball-r: #ef4444;
  --ball-g: #a1a1aa;
  --ball-v: #10b981;
}

body.dark-mode {
  --bg-color: #0f172a;
  --text-color: #f8fafc;
  --primary-color: #38bdf8;
  --secondary-color: #818cf8;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --ball-shadow: rgba(0, 0, 0, 0.4);
  --input-bg: rgba(255, 255, 255, 0.03);
}

body.light-mode {
  --bg-color: #f1f5f9;
  --text-color: #1e293b;
  --primary-color: #0ea5e9;
  --secondary-color: #6366f1;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(148, 163, 184, 0.2);
  --ball-shadow: rgba(148, 163, 184, 0.4);
  --input-bg: rgba(0, 0, 0, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Change from center to allow scrolling from top */
  overflow-y: auto; /* Allow vertical scrolling */
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  z-index: 1;
}

.main-wrapper {
  width: 90%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 60px 0;
  z-index: 2;
}

/* Navigation & Theme Toggle */
.top-nav {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.theme-toggle-btn {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  background: var(--glass-border);
}

.sun-icon, .moon-icon {
  position: absolute;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

body.dark-mode .sun-icon { opacity: 1; transform: rotate(0); }
body.dark-mode .moon-icon { opacity: 0; transform: rotate(90deg); }
body.light-mode .sun-icon { opacity: 0; transform: rotate(-90deg); }
body.light-mode .moon-icon { opacity: 1; transform: rotate(0); }

/* Containers */
.container {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  text-align: center;
  transition: all 0.4s ease;
}

.hero h1, .hero h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.highlight {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-bottom: 30px;
}

/* Lotto Elements */
.ball-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  min-height: 100px;
  align-items: center;
  margin-bottom: 30px;
}

.placeholder-text {
  font-size: 1rem;
  opacity: 0.4;
  font-style: italic;
}

.ball {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 8px 12px -3px var(--ball-shadow), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  position: relative;
}

.ball::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 8px;
  width: 12px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: rotate(-20deg);
}

.ball.bonus::before {
  content: '+';
  position: absolute;
  left: -15px;
  font-size: 1.2rem;
  color: var(--text-color);
  opacity: 0.6;
}

.ball-range-1 { background-color: var(--ball-y); color: #000; }
.ball-range-2 { background-color: var(--ball-b); }
.ball-range-3 { background-color: var(--ball-r); }
.ball-range-4 { background-color: var(--ball-g); color: #000; }
.ball-range-5 { background-color: var(--ball-v); }

@keyframes popIn {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

/* Form Styling */
.inquiry-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.8;
  margin-left: 4px;
}

.input-group input, .input-group textarea {
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.input-group input:focus, .input-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--glass-bg);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

/* Buttons */
.controls {
  margin-top: 10px;
}

.btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  border: none;
  padding: 16px 40px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px -5px rgba(56, 189, 248, 0.4);
  width: 100%;
}

.secondary-btn {
  background: var(--text-color);
  color: var(--bg-color);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(1px);
}

/* Disqus */
.disqus-section {
  text-align: left;
}

#disqus_thread {
  margin-top: 20px;
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.4;
  margin-top: 10px;
}

@media (max-width: 480px) {
  .hero h1, .hero h2 { font-size: 2rem; }
  .container { padding: 30px 20px; }
  .ball { width: 44px; height: 44px; font-size: 1.1rem; }
}
