:root {
  --background-color: #f4f7f6;
  --text-color: #333;
  --header-bg: #fff;
  --card-bg: #fff;
  --button-bg: #6a11cb;
  --button-text: #fff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --lotto-number-bg: #f0f0f0;
  --lotto-number-text: #333;
}

.dark-mode {
  --background-color: #1a1a1a;
  --text-color: #f4f7f6;
  --header-bg: #2c2c2c;
  --card-bg: #2c2c2c;
  --button-bg: #8e44ad;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --lotto-number-bg: #444;
  --lotto-number-text: #fff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow-color);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--shadow-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

header h1 {
  margin: 0;
  font-size: 1.8em;
  font-weight: 700;
}

main {
  text-align: center;
}

main p {
  font-size: 1.1em;
  margin-bottom: 25px;
}

button {
  background: linear-gradient(45deg, #6a11cb, #2575fc);
  color: var(--button-text);
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px var(--shadow-color);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--shadow-color);
}

/* Theme Switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2575fc;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Lottery Numbers */
#lotto-numbers-container {
  margin-top: 30px;
  padding: 20px;
  min-height: 80px;
}

#lotto-numbers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.lotto-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background-color: var(--lotto-number-bg);
  color: var(--lotto-number-text);
  border-radius: 50%;
  font-size: 1.5em;
  font-weight: bold;
  animation: pop-in 0.5s ease-out forwards;
}

@keyframes pop-in {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

footer {
  margin-top: 20px;
  text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  
  .container {
    padding: 15px;
  }

  header h1 {
    font-size: 1.5em;
  }

  button {
    padding: 12px 25px;
    font-size: 1em;
  }

  .lotto-number {
    width: 45px;
    height: 45px;
    font-size: 1.3em;
  }
}

/* Form Styles */
.form-section {
  margin-top: 40px;
  text-align: left;
  border-top: 1px solid var(--shadow-color);
  padding-top: 30px;
}

.form-section h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.6em;
  color: var(--text-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: calc(100% - 20px);
  padding: 12px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  background-color: var(--card-bg);
  color: var(--text-color);
  transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
  border-color: #2575fc;
  outline: none;
}

.form-section button[type="submit"] {
  width: 100%;
  padding: 15px;
  font-size: 1.2em;
  margin-top: 10px;
  background: linear-gradient(45deg, #2575fc, #6a11cb);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group textarea {
    width: calc(100% - 20px);
  }
  .form-section h2 {
    font-size: 1.4em;
  }
  .form-section button[type="submit"] {
    font-size: 1em;
    padding: 12px;
  }
}

/* Disqus Section Styles */
.disqus-section {
  margin-top: 40px;
  text-align: left;
  border-top: 1px solid var(--shadow-color);
  padding-top: 30px;
}

.disqus-section h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.6em;
  color: var(--text-color);
}

/* Animal Test Section Styles */
.animal-test-section {
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid var(--shadow-color);
  padding-top: 30px;
}

.animal-test-section h2 {
  margin-bottom: 25px;
  font-size: 1.6em;
  color: var(--text-color);
}

.animal-test-section p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

#webcam-container {
  margin: 20px auto;
  border: 2px solid var(--shadow-color);
  border-radius: 10px;
  overflow: hidden;
  width: 200px;
  height: 200px;
  background-color: #000; /* Black background for webcam area */
}

#webcam-container canvas {
  display: block; /* Remove extra space below canvas */
  width: 100%;
  height: 100%;
}

#label-container {
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#label-container div {
  margin-bottom: 5px;
  color: var(--text-color);
}

/* Ads Section Styles */
.ads-section {
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid var(--shadow-color);
  padding-top: 30px;
}

.ads-section h2 {
  margin-bottom: 25px;
  font-size: 1.6em;
  color: var(--text-color);
}

.ads-section ins {
    margin: 0 auto;
}

/* Intro, About, Privacy Policy Section Styles */
.intro-section,
.about-section,
.privacy-policy-section {
  margin-top: 40px;
  text-align: left;
  border-top: 1px solid var(--shadow-color);
  padding-top: 30px;
}

.intro-section h2,
.about-section h2,
.privacy-policy-section h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.6em;
  color: var(--text-color);
}

.intro-section p,
.about-section p,
.privacy-policy-section p {
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: 1em;
  color: var(--text-color);
}

/* Footer Navigation Styles */
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 20px; /* Added margin for spacing with the button */
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.footer-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.footer-nav a:hover {
  background-color: var(--shadow-color);
  color: var(--button-bg);
}

@media (max-width: 600px) {
  .footer-nav {
    flex-direction: column;
    gap: 10px;
  }
}

