/* General Body Styles */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');

body {
  font-family: 'Nunito', sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

/* Dark Mode */
body.dark-mode {
  background-color: #1a1a1a;
  color: #f8f9fa;
}

/* Header */
header {
    background-color: #fff;
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 30px;
}

body.dark-mode header {
    background-color: #2c2c2c;
    border-bottom-color: #444;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    color: #007bff;
}

body.dark-mode header h1 {
    color: #58a6ff;
}


/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body.dark-mode .container {
  background-color: #2c2c2c;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Headings */
h1, h2 {
  color: #343a40;
  margin-bottom: 20px;
}

body.dark-mode h1, body.dark-mode h2 {
  color: #e9ecef;
}

/* Lotto Numbers */
#lotto-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 40px 0;
}

.lotto-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  background: linear-gradient(45deg, #007bff, #0056b3);
  transition: transform 0.2s;
}

.lotto-number:hover {
    transform: scale(1.1);
}

body.dark-mode .lotto-number {
  background: linear-gradient(45deg, #58a6ff, #007bff);
}

/* Buttons */
button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  margin: 10px 5px;
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

button:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

#mode-toggle {
  background-color: #6c757d;
}

#mode-toggle:hover {
  background-color: #5a6268;
}

/* Form Container */
.form-container {
  margin-top: 40px;
  padding: 25px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: #f8f9fa;
}

body.dark-mode .form-container {
  border-color: #444;
  background-color: #333;
}

.form-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-container input,
.form-container textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  box-sizing: border-box;
  margin-bottom: 15px;
}

body.dark-mode .form-container input,
body.dark-mode .form-container textarea {
  background-color: #444;
  color: white;
  border-color: #666;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 40px;
  padding: 30px 20px;
  border-top: 1px solid #dee2e6;
  background-color: #fff;
}

body.dark-mode footer {
  border-top-color: #444;
  background-color: #2c2c2c;
}

footer a {
  color: #007bff;
  text-decoration: none;
  margin: 0 15px;
  transition: color 0.2s;
}

footer a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Table styles for history.html */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

body.dark-mode th, body.dark-mode td {
    border-bottom: 1px solid #444;
}

thead th {
    background-color: #f8f9fa;
    font-weight: bold;
}

body.dark-mode thead th {
    background-color: #333;
}

tbody tr:hover {
    background-color: #f1f3f5;
}

body.dark-mode tbody tr:hover {
    background-color: #444;
}
