:root {
    --bg-color: #f0f2f5;
    --container-bg: rgba(255, 255, 255, 0.9);
    --text-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --accent-gradient: linear-gradient(45deg, #3498db, #8e44ad);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --container-bg: rgba(0, 0, 0, 0.5);
    --text-color: #fff;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-image: var(--accent-gradient);
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: background-pan 20s linear infinite;
}

@keyframes background-pan {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 200px 0;
    }
}

.container {
    text-align: center;
    padding: 40px;
    background-color: var(--container-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    backdrop-filter: blur(10px);
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

#theme-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

#theme-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] #theme-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: color-cycle 5s linear infinite;
}

@keyframes color-cycle {
    0% { color: #3498db; }
    25% { color: #e74c3c; }
    50% { color: #f1c40f; }
    75% { color: #2ecc71; }
    100% { color: #3498db; }
}

#lotto-balls-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#generate-button {
    background-image: linear-gradient(45deg, #e74c3c, #f1c40f);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#generate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

#generate-button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    #lotto-balls-container {
        gap: 10px;
    }
}
