:root {
    --bg-color: #f0f2f5;
    --container-bg: #ffffff;
    --text-color: #333333;
    --primary-color: #4CAF50;
    --bonus-color: #ffc107;
    --button-bg: #007bff;
    --button-hover: #0056b3;
    --shadow: rgba(0, 0, 0, 0.1);
    --input-bg: #ffffff;
    --input-border: #cccccc;
}

body.dark-mode {
    --bg-color: #18191a;
    --container-bg: #242526;
    --text-color: #e4e6eb;
    --primary-color: #2ecc71;
    --bonus-color: #f1c40f;
    --button-bg: #3a3b3c;
    --button-hover: #4e4f50;
    --shadow: rgba(0, 0, 0, 0.5);
    --input-bg: #3a3b3c;
    --input-border: #4e4f50;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column; /* Changed to accommodate top ad */
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    text-align: center;
    background-color: var(--container-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 20px var(--shadow);
    transition: background-color 0.3s, box-shadow 0.3s;
    width: 95%;
    max-width: 650px;
    margin: 20px;
}

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

.lotto-machine {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#numbers-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.numbers-set {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 10px;
    transition: background-color 0.3s;
}

.number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    margin: 0 5px;
    animation: bounce 0.5s ease-in-out;
}

.number.bonus {
    background-color: var(--bonus-color);
    color: #333;
}

.plus-sign {
    font-size: 20px;
    font-weight: bold;
    margin: 0 10px;
    color: var(--text-color);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#generate {
    padding: 15px 30px;
    font-size: 18px;
    color: white;
    background-color: var(--button-bg);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

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

.divider {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid var(--input-border);
    opacity: 0.5;
}

.contact-section {
    text-align: left;
    margin-bottom: 30px;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input, .form-group textarea {
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--button-bg);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-btn {
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.submit-btn:hover {
    opacity: 0.9;
}

/* AdSense Styles */
.ad-container {
    width: 100%;
    max-width: 650px;
    margin: 20px auto;
    background: transparent;
    overflow: hidden;
}

.top-ad {
    margin-top: 40px;
}

.bottom-ad {
    margin-top: 40px;
}

#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px;
    font-size: 24px;
    background: var(--container-bg);
    border: 1px solid var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px var(--shadow);
    z-index: 1000;
    transition: all 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    .number {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin: 0 3px;
    }
}
