
:root {
    --bg-color: #f0f0f0;
    --text-color: #333;
    --container-bg: white;
    --button-bg: #4f46e5;
    --button-hover-bg: #4338ca;
    --history-item-bg: #eee;
    --history-item-text: #333;
    --h1-color: #333;
    --h2-color: #333;
}

body.dark-theme {
    --bg-color: #1a202c; /* Darker background */
    --text-color: #e2e8f0; /* Light text */
    --container-bg: #2d3748; /* Darker container */
    --button-bg: #667eea; /* Lighter button */
    --button-hover-bg: #5a67d8; /* Even lighter button hover */
    --history-item-bg: #4a5568; /* Darker history item */
    --history-item-text: #e2e8f0; /* Light history item text */
    --h1-color: #e2e8f0;
    --h2-color: #e2e8f0;
}

body {
    font-family: sans-serif;
    background-color: var(--bg-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;
}

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

h1 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--h1-color);
    transition: color 0.3s ease;
}

.generator-container {
    margin-bottom: 2rem;
}

.numbers-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

lotto-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#generate-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    color: white;
    background-color: var(--button-bg);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0.5rem;
}

#theme-toggle-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.8rem 1.5rem; /* Adjust padding for better look */
    font-size: 1rem; /* Adjust font size */
    color: white;
    background-color: var(--button-bg);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensure it's above other content */
}

#generate-btn:hover, #theme-toggle-btn:hover {
    background-color: var(--button-hover-bg);
}

.history-container {
    margin-top: 2rem;
    text-align: left;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--h2-color);
    transition: color 0.3s ease;
}

#history-list {
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

#history-list li {
    background-color: var(--history-item-bg);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--history-item-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}
