body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background-color: #f4f4f4;
  transition: background-color 0.3s ease;
}

.container {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative; /* For theme toggle button positioning */
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

h1 {
  color: #333;
  margin-bottom: 20px; /* Adjusted margin for category nav */
  transition: color 0.3s ease;
}

h2 {
  color: #333;
  margin-top: 30px;
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

p {
    color: #666;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

#lottery-numbers {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px; /* Added margin-top to separate from category nav */
  margin-bottom: 30px;
}

.number-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #6a0572; /* Purple */
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  border: 2px solid #56045d;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

#generate-button {
  background-color: #007bff; /* Blue */
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#generate-button:hover {
  background-color: #0056b3;
}

/* Theme Toggle Button */
.theme-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #ffffff; /* White background for light mode */
  border: 1px solid #ccc;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  color: #333;
}

.theme-toggle:hover {
  background-color: #e0e0e0;
}

/* Category Navigation */
#category-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    gap: 10px;
    transition: border-color 0.3s ease;
}

.category-button {
    background-color: transparent;
    border: none;
    padding: 10px 15px;
    font-size: 1.1em;
    cursor: pointer;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.category-button:hover {
    color: #007bff;
}

.category-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: bold;
}

/* Contact Form Styles */
.contact-form {
  margin-top: 20px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  text-align: left;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

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

.contact-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
  transition: color 0.3s ease;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: calc(100% - 20px);
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  border-color: #007bff;
  outline: none;
}

.contact-form .submit-button {
  width: 100%;
  background-color: #28a745;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  transition: background-color 0.3s ease;
}

.contact-form .submit-button:hover {
  background-color: #218838;
}

/* Section Separator (HR) Styles */
.section-separator {
  border: none;
  border-top: 1px solid #eee;
  margin: 40px 0;
  transition: border-color 0.3s ease;
}

/* Animal Face Test Section Styles */
#animal-face-test-section {
    padding: 20px;
    margin-top: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#animal-face-test-section p {
    font-size: 1.1em;
}

#image-upload {
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#image-upload:hover {
    background-color: #e9e9e9;
}

#image-preview {
    border: 1px solid #ddd;
    border-radius: 8px;
    object-fit: contain;
    background-color: #fff;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#animal-face-test-section #predict-button {
    background-color: #6f42c1;
    margin-top: 20px;
    width: 100%;
}

#animal-face-test-section #predict-button:hover {
    background-color: #5936a0;
}

#prediction-results {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

#prediction-results .result-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

#prediction-results .result-item:last-child {
    margin-bottom: 0;
}

#prediction-results .label {
    text-align: left;
}

#prediction-results .confidence {
    text-align: right;
    color: #007bff;
}


/* Dark Mode Styles */
body.dark-mode {
  background-color: #2c2c2c;
}

body.dark-mode .container {
  background-color: #3e3e3e;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode h1 {
  color: #f1f1f1;
}

body.dark-mode h2 {
  color: #f1f1f1;
}

body.dark-mode p {
    color: #ccc;
}

body.dark-mode #lottery-numbers {
  margin-top: 30px; /* Ensure dark mode also has this margin */
}

body.dark-mode .number-circle {
  background-color: #555;
  border-color: #666;
  color: #eee;
}

body.dark-mode #generate-button {
  background-color: #0099ff;
}

body.dark-mode #generate-button:hover {
  background-color: #007bbd;
}

body.dark-mode .theme-toggle {
  background-color: #333333;
  color: #f1f1f1;
  border-color: #555;
}

body.dark-mode .theme-toggle:hover {
  background-color: #444444;
}

body.dark-mode #category-nav {
    border-bottom-color: #555;
}

body.dark-mode .category-button {
    color: #bbb;
}

body.dark-mode .category-button:hover {
    color: #99ccff;
}

body.dark-mode .category-button.active {
    color: #99ccff;
    border-bottom-color: #99ccff;
}

body.dark-mode .contact-form {
  background-color: #333;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.1);
}

body.dark-mode .contact-form label {
  color: #bbb;
}

body.dark-mode .contact-form input[type="text"],
body.dark-mode .contact-form input[type="email"],
body.dark-mode .contact-form textarea {
  background-color: #444;
  color: #f1f1f1;
  border-color: #666;
}

body.dark-mode .contact-form input[type="text"]:focus,
body.dark-mode .contact-form input[type="email"]:focus,
body.dark-mode .contact-form textarea:focus {
  border-color: #0099ff;
}

body.dark-mode .contact-form .submit-button {
  background-color: #2fb14a;
}

body.dark-mode .contact-form .submit-button:hover {
  background-color: #279e40;
}

body.dark-mode .section-separator {
  border-top: 1px solid #555;
}

body.dark-mode #animal-face-test-section {
    background-color: #333;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.1);
}

body.dark-mode #image-upload {
    background-color: #444;
    border-color: #666;
    color: #f1f1f1;
}

body.dark-mode #image-upload:hover {
    background-color: #555;
}

body.dark-mode #image-preview {
    border-color: #666;
    background-color: #444;
}

body.dark-mode #animal-face-test-section #predict-button {
    background-color: #8c60da;
}

body.dark-mode #animal-face-test-section #predict-button:hover {
    background-color: #7a4ed1;
}

body.dark-mode #prediction-results {
    border-color: #666;
    background-color: #444;
    color: #f1f1f1;
}

body.dark-mode #prediction-results .confidence {
    color: #99ccff;
}
