
:root {
    --primary-color: #ff5722;
    --secondary-color: #ffc107;
    --background-color: #fdf6e3;
    --text-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --lotto-machine-bg: #fff;
    --primary-color-rgb: 255, 87, 34; /* Corresponding to #ff5722 */
}

body.dark-mode {
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --background-color: #121212;
    --text-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --lotto-machine-bg: #1e1e1e;
    --primary-color-rgb: 187, 134, 252; /* Corresponding to #bb86fc */
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%239C92AC' fill-opacity='0.1' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#lotto-machine {
    background: var(--lotto-machine-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    max-width: 90%;
    width: 600px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

#controls {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

#generate-btn, #theme-toggle-btn {
    background-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.4);
    transition: all 0.3s ease;
}

#generate-btn:hover, #theme-toggle-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.6);
}

#results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

lotto-ball {
    --ball-size: 80px;
    width: var(--ball-size);
    height: var(--ball-size);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: pop-in 0.5s ease-out forwards;
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    #lotto-machine {
        padding: 30px;
    }

    h1 {
        font-size: 2rem;
    }

    lotto-ball {
        --ball-size: 60px;
        font-size: 1.5rem;
    }
}

/* Formspree Form Styling */
#contact-form-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--shadow-color);
    color: var(--text-color);
}

#contact-form-section h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 15px;
}

#contact-form-section p {
    margin-bottom: 25px;
    line-height: 1.6;
}

#affiliate-inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

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

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--shadow-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--lotto-machine-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
    outline: none;
}

#affiliate-inquiry-form button[type="submit"] {
    background-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.4);
    transition: all 0.3s ease;
    align-self: center; /* Center the button within the form */
    margin-top: 20px;
}

#affiliate-inquiry-form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.6);
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-top: 30px;
    opacity: 0.7;
}

/* Adjustments for responsive design for form */
@media (max-width: 600px) {
    #affiliate-inquiry-form {
        max-width: 100%;
        padding: 0 10px;
    }

    #contact-form-section h2 {
        font-size: 1.7rem;
    }
}
