
:root {
    --background-color: #f0f0f0;
    --text-color: #333;
    --button-bg-color: #4CAF50;
    --button-text-color: white;
    --ball-text-color: white;
    --ball-colors: #ff7f50, #87ceeb, #32cd32, #ff69b4, #ffd700, #9370db;
}

body.dark-mode {
    --background-color: #333;
    --text-color: #f0f0f0;
    --button-bg-color: #555;
    --button-text-color: #f0f0f0;
    --ball-text-color: #333;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)),
                      radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

#generatorBtn {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#generatorBtn:hover {
    background-color: #45a049;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

#lotto-balls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

lotto-ball {
    width: 80px;
    height: 80px;
}

#theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none;
    padding: 10px 30px; /* Increased padding for longer text */
    border-radius: 20px; /* Keep it oval */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: auto; /* Auto width for text */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#theme-toggle .icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(100%);
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap; /* Prevent text wrapping */
}

body:not(.dark-mode) #theme-toggle .light-icon {
    opacity: 1;
    transform: translateY(0);
    animation: bounceIn 0.5s forwards;
}

body.dark-mode #theme-toggle .dark-icon {
    opacity: 1;
    transform: translateY(0);
    animation: bounceIn 0.5s forwards;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

