@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
    --background-color: #F0F2F5;
    --primary-color: #1877F2;
    --text-color: #1C1E21;
    --container-background: #FFFFFF;
    --lotto-ball-text-color: #1C1E21;
    --footer-text-color: #65676B;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --grid-line-color: rgba(0, 0, 0, 0.05);

    --lotto-ball-color-1: #FF5733;
    --lotto-ball-color-2: #33FF57;
    --lotto-ball-color-3: #3357FF;
    --lotto-ball-color-4: #FF33A1;
    --lotto-ball-color-5: #F3FF33;
    --lotto-ball-color-6: #33FFF3;
}

body.dark-mode {
    --background-color: #121212;
    --primary-color: #1DB954;
    --text-color: #FFFFFF;
    --container-background: #1E1E1E;
    --lotto-ball-text-color: #FFFFFF;
    --footer-text-color: #AAA;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --grid-line-color: rgba(255, 255, 255, 0.02);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-image: linear-gradient(var(--grid-line-color) 1px, transparent 1px), 
                      linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

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

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.lotto-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.lotto-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--lotto-ball-text-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lotto-ball:nth-child(1) { background: linear-gradient(135deg, var(--lotto-ball-color-1), #C70039); }
.lotto-ball:nth-child(2) { background: linear-gradient(135deg, var(--lotto-ball-color-2), #1E8449); }
.lotto-ball:nth-child(3) { background: linear-gradient(135deg, var(--lotto-ball-color-3), #2E86C1); }
.lotto-ball:nth-child(4) { background: linear-gradient(135deg, var(--lotto-ball-color-4), #9B59B6); }
.lotto-ball:nth-child(5) { background: linear-gradient(135deg, var(--lotto-ball-color-5), #F1C40F); }
.lotto-ball:nth-child(6) { background: linear-gradient(135deg, var(--lotto-ball-color-6), #16A085); }

#theme-toggle {
    margin-bottom: 20px;
    background-color: var(--primary-color);
    color: #fff; /* Text color is white for both themes for this button */
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.generate-btn {
    background-color: var(--primary-color);
    color: #fff; /* Text color is white for both themes for this button */
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.generate-btn:hover, #theme-toggle:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.generate-btn:active, #theme-toggle:active {
    transform: translateY(1px);
    filter: brightness(0.9);
}

footer {
    position: absolute;
    bottom: 20px;
    font-size: 0.9rem;
    color: var(--footer-text-color);
}
