:root {
    --body-bg: #f0f2f5;
    --body-pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/svg%3E");
    --container-bg: #ffffff;
    --text-color: #333;
    --shadow-color: rgba(0,0,0,0.1);
    --button-shadow-color: rgba(0,0,0,0.1);
    --button-hover-shadow-color: rgba(0,0,0,0.15);
}

[data-theme="dark"] {
    --body-bg: #282c36;
    --body-pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%235A5A6A' fill-opacity='0.1'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/svg%3E");
    --container-bg: #3a404d;
    --text-color: #e0e0e0;
    --shadow-color: rgba(0,0,0,0.3);
    --button-shadow-color: rgba(0,0,0,0.3);
    --button-hover-shadow-color: rgba(0,0,0,0.4);
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--body-bg);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed to align-items: flex-start */
    min-height: 100vh; /* Changed from height to min-height */
    margin: 0;
    padding: 20px 0; /* Add some vertical padding for overall content */
    background-image: var(--body-pattern);
    transition: background-color 0.3s ease;
}

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

h1 {
    color: var(--text-color);
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.number-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation: pop-in 0.5s ease-out forwards;
}

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

#generate-btn {
    background-color: #4CAF50;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px var(--button-shadow-color);
}

#generate-btn:hover {
    background-color: #45a049;
    box-shadow: 0 6px 8px var(--button-hover-shadow-color);
}

/* Theme Toggle Button Styles */
#theme-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    transition: transform 0.3s ease;
}

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