:root {
  --bg-color: #f0f2f5;
  --text-color: #1c1e21;
  --container-bg: #ffffff;
  --primary-btn: #1877f2;
  --secondary-btn: #e4e6eb;
  --secondary-text: #050505;
  --ball-bg: #ffffff;
  --ball-text: #333333;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --bg-color: #18191a;
  --text-color: #e4e6eb;
  --container-bg: #242526;
  --primary-btn: #2d88ff;
  --secondary-btn: #3a3b3c;
  --secondary-text: #e4e6eb;
  --ball-bg: #3a3b3c;
  --ball-text: #ffffff;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 0;
}

.container {
  background-color: var(--container-bg);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  width: 90%;
  max-width: 550px;
}

h1 { margin: 0 0 0.5rem 0; font-size: 2rem; }
p { margin: 0 0 2.5rem 0; opacity: 0.6; }

.lotto-balls {
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 60px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.placeholder { opacity: 0.4; font-style: italic; }

.ball {
  width: 50px;
  height: 50px;
  background-color: var(--ball-bg);
  color: var(--ball-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

.controls { display: flex; gap: 12px; justify-content: center; }

button {
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
}

button:active { transform: scale(0.96); }

.btn-primary { background-color: var(--primary-btn); color: white; flex: 2; }
.btn-secondary { background-color: var(--secondary-btn); color: var(--secondary-text); flex: 1; }

.ball.range-1 { border: 4px solid #fbc400; }
.ball.range-11 { border: 4px solid #69c8f2; }
.ball.range-21 { border: 4px solid #ff7285; }
.ball.range-31 { border: 4px solid #aaaaaa; }
.ball.range-41 { border: 4px solid #b0d840; }

.contact-section, #comments-section {
  margin-top: 2.5rem;
  text-align: left;
}

.contact-section hr, #comments-section hr {
  border: 0;
  border-top: 1px solid var(--secondary-btn);
  margin-bottom: 1.5rem;
}

.contact-section h3, #comments-section h3 {
  margin-bottom: 1.2rem;
  font-size: 1.3rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--secondary-btn);
  border-radius: 8px;
  background-color: var(--ball-bg);
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: all 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-btn);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
}

textarea {
  height: 100px;
  resize: vertical;
}

.btn-submit {
  width: 100%;
  background-color: var(--primary-btn);
  color: white;
  margin-top: 0.5rem;
  font-size: 1rem;
}

.btn-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
