:root {
  --background-color: #ffffff;
  --text-color: #333333;
  --card-background: #f9f9f9;
  --primary-color: #4CAF50;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --button-text: #ffffff;
  --number-bg: #e0e0e0;
  --number-text: #333333;
}

[data-theme="dark"] {
  --background-color: #121212;
  --text-color: #e0e0e0;
  --card-background: #1e1e1e;
  --primary-color: #bb86fc;
  --shadow-color: rgba(0, 0, 0, 0.7);
  --button-text: #000000;
  --number-bg: #333333;
  --number-text: #e0e0e0;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* Add a subtle texture to the background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="6" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>');
    background-size: cover;
    opacity: 0.02;
    z-index: -1;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: transparent;
    background: linear-gradient(45deg, #f3ec78, #af4261);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

/* Make the lotto-generator component itself responsive */
lotto-generator {
    width: 90%;
}

@media (min-width: 600px) {
    lotto-generator {
        width: 100%; /* The component itself has max-width */
    }
}

/* Theme Switch Styles */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  position: absolute;
  top: 20px;
  right: 20px;
}

.theme-switch-wrapper em {
  margin-left: 10px;
  font-size: 1rem;
}

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

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 26px;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

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

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Contact Form Styles */
.contact-section {
    width: 90%;
    max-width: 600px;
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding: 2rem;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: background-color 0.3s;
}

.contact-section h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-form {
    text-align: left;
}

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

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

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

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

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--button-text);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.submit-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.submit-btn:active {
    transform: scale(0.98);
}
