body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

html[data-theme='light'] {
  --background-color: #f0f0f0;
  --text-color: #333;
  --lotto-number-bg: #fff;
  --lotto-number-border: #333;
  --button-bg: #4CAF50;
  --button-hover-bg: #45a049;
}

html[data-theme='dark'] {
  --background-color: #333;
  --text-color: #f0f0f0;
  --lotto-number-bg: #555;
  --lotto-number-border: #f0f0f0;
  --button-bg: #666;
  --button-hover-bg: #777;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
  color: var(--text-color);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80%; /* Adjust as needed */
  margin-bottom: 20px;
  padding: 20px 0; /* Add some padding */
}

.header nav {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between link and toggle button */
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--button-hover-bg); /* Use a hover color */
}

.lotto-container {
  margin-bottom: 20px;
}

.lotto-numbers {
  display: flex;
  flex-wrap: wrap; /* Allow numbers to wrap to the next line */
  gap: 10px;
  justify-content: center; /* Center numbers when wrapped */
  max-width: 600px; /* Give it more space */
  margin: 0 auto; /* Center the container */
}

.lotto-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--lotto-number-bg);
  border: 2px solid var(--lotto-number-border);
  font-size: 24px;
  font-weight: bold;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: var(--button-bg);
  color: white;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

/* Existing styles */

.contact-form-section {
  margin-top: 40px;
  padding: 20px;
  background-color: var(--lotto-number-bg);
  border: 1px solid var(--lotto-number-border);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-section h2 {
  color: var(--text-color);
  margin-bottom: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.contact-form label {
  margin-bottom: 5px;
  color: var(--text-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid var(--lotto-number-border);
  border-radius: 4px;
  font-size: 16px;
  background-color: var(--background-color); /* Inherit background for inputs */
  color: var(--text-color);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  border-color: var(--button-bg);
  outline: none;
}

.contact-form button[type="submit"] {
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  background-color: var(--button-bg);
  color: white;
  border: none;
  border-radius: 5px;
  margin-top: 10px;
  transition: background-color 0.3s ease;
}

.contact-form button[type="submit"]:hover {
  background-color: var(--button-hover-bg);
}

.comments-section {
  margin-top: 40px;
  padding: 20px;
  background-color: var(--lotto-number-bg);
  border: 1px solid var(--lotto-number-border);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 80%; /* Ensure it takes up enough width */
  max-width: 800px; /* Max width to prevent it from being too wide on large screens */
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.comments-section h2 {
  color: var(--text-color);
  margin-bottom: 20px;
}

.pet-face-test-section {
  margin-top: 40px;
  padding: 20px;
  background-color: var(--lotto-number-bg);
  border: 1px solid var(--lotto-number-border);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.pet-face-test-section h2 {
  color: var(--text-color);
  margin-bottom: 20px;
}

.pet-face-test-section input[type="file"] {
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid var(--lotto-number-border);
  border-radius: 4px;
  background-color: var(--background-color);
  color: var(--text-color);
}

.image-preview-container {
  width: 100%;
  max-width: 400px;
  height: 300px;
  border: 1px dashed var(--lotto-number-border);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  overflow: hidden;
  background-color: var(--background-color);
}

#image-preview {
  max-width: 100%;
  max-height: 100%;
  display: none; /* Hidden until image is loaded */
}

.pet-face-test-section button {
  margin-bottom: 20px;
}

.result-display {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  min-height: 24px; /* To prevent layout shift */
}

.content-section {
  margin-top: 40px;
  padding: 20px;
  background-color: var(--lotto-number-bg);
  border: 1px solid var(--lotto-number-border);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.content-section h2 {
  color: var(--text-color);
  margin-bottom: 20px;
}

.content-section p {
  color: var(--text-color);
  line-height: 1.6;
  max-width: 600px;
}
