:root {
    --bg-color: #f4f4f4;
    --container-bg-color: #fff;
    --text-color: #333;
    --input-border-color: #ddd;
    --button-bg-color: #007bff;
    --button-hover-bg-color: #0056b3;
    --lotto-ball-bg-color: #28a745;
    --error-color: red;
    --form-button-bg-color: #007bff;
    --form-button-hover-bg-color: #0056b3;
}

body.dark-mode {
    --bg-color: #333;
    --container-bg-color: #444;
    --text-color: #f4f4f4;
    --input-border-color: #555;
    --button-bg-color: #0056b3;
    --button-hover-bg-color: #007bff;
    --lotto-ball-bg-color: #1a6f2c;
    --error-color: #ff6666;
    --form-button-bg-color: #0056b3;
    --form-button-hover-bg-color: #007bff;
}

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

#theme-toggle {
    position: absolute; /* Position absolutely within the container */
    top: 15px;
    right: 15px;
    background-color: transparent; /* Make background transparent for a cleaner look */
    color: var(--text-color); /* Use theme text color */
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    border: 1px solid var(--input-border-color); /* Subtle border */
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#theme-toggle:hover {
    background-color: var(--input-border-color); /* Slight background on hover */
    color: var(--text-color);
}

.main-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    max-width: 800px; /* Max width for readability */
    margin: 20px auto; /* Center the wrapper and add vertical margin */
    padding: 20px;
    background-color: var(--container-bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.container {
    padding: 30px;
    width: 100%; /* Take full width of main-content-wrapper */
    text-align: center;
    box-shadow: none; /* Remove redundant shadow */
    border-radius: 0; /* Remove redundant border-radius */
    background-color: transparent; /* Make background transparent as wrapper handles it */
    position: relative; /* Establish positioning context for absolute button */
}

/* Disqus Section Styling */
.disqus-section {
    width: 100%;
    max-width: 700px; /* Adjust as needed */
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--input-border-color);
    text-align: left; /* Align Disqus content to the left within its section */
}

h1 {
    color: var(--text-color);
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 20px;
}

.controls label {
    margin-right: 10px;
    font-weight: bold;
}

.controls input[type="number"] {
    width: 60px;
    padding: 8px;
    margin-right: 15px;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    text-align: center;
    background-color: var(--container-bg-color);
    color: var(--text-color);
}

button {
    background-color: var(--button-bg-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--button-hover-bg-color);
}

#lotto-numbers ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

#lotto-numbers li {
    background-color: var(--lotto-ball-bg-color);
    color: white;
    font-size: 24px;
    font-weight: bold;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.error {
    color: var(--error-color);
    font-weight: bold;
    margin-top: 10px;
}

/* Contact Form Styles */
.contact-form-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--input-border-color);
}

.contact-form-section h1 {
    margin-bottom: 20px;
}

.contact-form-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch; /* Stretch form elements to fill container */
}

.contact-form-section label {
    font-weight: bold;
    text-align: left;
    margin-bottom: 5px;
    color: var(--text-color); /* Use theme variable */
}

.contact-form-section input[type="text"],
.contact-form-section input[type="email"],
.contact-form-section textarea {
    width: 100%; /* Adjust width to fit container with padding */
    padding: 10px;
    border: 1px solid var(--input-border-color); /* Use theme variable */
    border-radius: 4px;
    font-size: 16px;
    background-color: var(--container-bg-color); /* Use theme variable */
    color: var(--text-color); /* Use theme variable */
}

.contact-form-section textarea {
    resize: vertical;
}

.contact-form-section button[type="submit"] {
    background-color: var(--form-button-bg-color); /* Use theme variable */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.contact-form-section button[type="submit"]:hover {
    background-color: var(--form-button-hover-bg-color); /* Use theme variable */
}

.contact-form-section #formStatus {
    margin-top: 20px;
    font-weight: bold;
}

.contact-form-section .success {
    color: green; /* Consider making this a theme variable if needed */
}

.contact-form-section .error {
    color: var(--error-color); /* Use theme variable */
}