:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --background-color: #f0f2f5;
    --text-color: #333;
    --white: #fff;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes footer to bottom */
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-image: linear-gradient(to right top, #d16ba5, #c777b9, #ba83ca, #aa8fd8, #9a9ae1, #8aa7ec, #7ab3f4, #69bff8, #52cffe, #41dfff, #46eefa, #5ffbf1);
}

main {
    flex: 1; /* Allows main content to grow */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.container {
    text-align: center;
    padding: 40px;
    border-radius: 15px;
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
}

h1, h2, h3, h4 {
    color: var(--primary-color);
}

.lotto-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

#generate-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}

lotto-ball {
    --ball-color: var(--secondary-color);
}

/* Theme Switch Styles */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align to the right */
    width: 100%;
    margin-bottom: 20px;
}

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

.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;
    -webkit-transition: .4s;
    transition: .4s;
}

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

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

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

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

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

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

/* Dark Mode Styles */
body.dark-mode {
    --background-color: #2c2c2c;
    --text-color: #f5f5f5;
    --white: #3a3a3a; /* Darker white for container background */
    --primary-color: #6a9ee8; /* Adjusted primary for dark mode */
    --secondary-color: #7fffd4; /* Adjusted secondary for dark mode */
    background-image: linear-gradient(to right top, #2f2f2f, #3a3a3a, #454545, #505050, #5b5b5b);
}

body.dark-mode .container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode #generate-btn {
    box-shadow: 0 4px 15px rgba(106, 158, 232, 0.4);
}

body.dark-mode #generate-btn:hover {
    box-shadow: 0 6px 20px rgba(106, 158, 232, 0.6);
}

/* Contact Form Styles */
.contact-form-section {
    width: 100%;
    max-width: 600px;
    margin: 50px auto; /* Center the form and add some space */
    padding: 30px;
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.dark-mode .contact-form-section {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.contact-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2em;
}

.contact-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

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

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

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 120px;
}

.contact-form .submit-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.contact-form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}

body.dark-mode .contact-form input[type="email"],
body.dark-mode .contact-form input[type="text"],
body.dark-mode .contact-form textarea {
    border: 1px solid #555;
    background-color: #444;
    color: var(--text-color);
}

/* Disqus Section Styles */
.disqus-section {
    width: 100%;
    max-width: 800px; /* Adjust as needed */
    margin: 50px auto;
    padding: 20px;
    background-color: var(--white); /* Match container/form background */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.dark-mode .disqus-section {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* AdSense Ad Container Styles */
.adsense-ad-container {
    width: 100%;
    max-width: 728px; /* Common ad unit width, adjust as needed */
    margin: 50px auto; /* Top/bottom margin, and center horizontally */
    text-align: center; /* Center the ad itself if it's smaller */
}
/* Header and Footer Styles */
.site-header, .site-footer {
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 10px 5%;
    box-sizing: border-box;
}

body.dark-mode .site-header, body.dark-mode .site-footer {
    background-color: #1e1e1e;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header h1 {
    margin: 0;
    font-size: 1.8em;
}

.site-header h1 a {
    text-decoration: none;
    color: var(--primary-color);
}

.site-footer {
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding-bottom: 20px;
    gap: 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h4 {
    margin-bottom: 15px;
}

.footer-section p, .footer-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.6;
}

.footer-section ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 20px;
}

body.dark-mode .footer-bottom {
    border-top-color: #555;
}

/* Additional Content Styles */
.site-description {
    line-height: 1.7;
    font-size: 1.1em;
    max-width: 90%;
    margin: 20px auto 30px;
}

.privacy-policy {
    text-align: left;
    max-width: 800px;
}

.privacy-policy h3 {
    margin-top: 30px;
}