:root {
  --bg-color: #f0f2f5;
  --text-color: #333;
  --card-bg: #ffffff;
  --primary-color: #1a73e8;
  --primary-hover: #155ab6;
  --shadow: rgba(0, 0, 0, 0.1);
  --ball-shadow: rgba(0, 0, 0, 0.2);
  --history-bg: #f0f2f5;
}

body.dark-mode {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --card-bg: #1e1e1e;
  --primary-color: #8ab4f8;
  --primary-hover: #aecbfa;
  --shadow: rgba(0, 0, 0, 0.5);
  --ball-shadow: rgba(0, 0, 0, 0.4);
  --history-bg: #2d2d2d;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  text-align: center;
  margin: 0;
  padding: 2rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin: 0;
}

.theme-toggle-btn {
  background: none;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--primary-color);
  color: var(--bg-color);
}

.lotto-machine {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 20px var(--shadow);
  margin-bottom: 2rem;
}

.lotto-balls-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  min-height: 100px;
  margin-bottom: 2rem;
}

.lotto-ball {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  margin: 0.5rem;
  box-shadow: 0 4px 8px var(--ball-shadow);
  transition: transform 0.3s ease, opacity 0.5s ease;
  transform: scale(0);
  opacity: 0;
}

.generate-btn {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.generate-btn:hover {
  background-color: var(--primary-hover);
}

.history-section {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 20px var(--shadow);
}

.history-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

#history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-section li {
  background-color: var(--history-bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  display: flex;
  justify-content: center;
}

.contact-section {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 20px var(--shadow);
  margin-top: 2rem;
  text-align: left;
}

.info-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.content-card {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 20px var(--shadow);
  text-align: left;
}

.content-card h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.content-card p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.content-card ul {
  padding-left: 1.2rem;
  line-height: 1.8;
}

footer {
  margin-top: 4rem;
  padding: 3rem 1rem;
  background-color: var(--card-bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 20px var(--shadow);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-nav {
  margin: 1.5rem 0;
}

.footer-nav a {
  color: var(--primary-color);
  text-decoration: none;
  margin: 0 1rem;
  font-weight: bold;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.disclaimer {
  font-size: 0.9rem;
  color: #888;
  margin-top: 1rem;
}

.comments-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.contact-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 5px var(--primary-color);
}

.submit-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 1rem;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: var(--primary-hover);
}
