:root {
    --bg-color: #f0f0f0;
    --container-bg: white;
    --text-color: #333;
    --history-item-bg: #eee;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #f0f0f0;
    --history-item-bg: #3d3d3d;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

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, color 0.3s;
}

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem var(--shadow-color);
    text-align: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 1rem;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

h1 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.lotto-display {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

#generate-btn {
    background-color: #4CAF50;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    max-width: 300px;
}

#generate-btn:hover {
    background-color: #45a049;
}

#generate-btn:active {
    transform: scale(0.98);
}

#generate-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.history {
    margin-top: 2rem;
    display: none;
}

#history-list {
    list-style: none;
    padding: 0;
    max-height: 12rem;
    overflow-y: auto;
}

#history-list li {
    margin-bottom: 0.5rem;
    background-color: var(--history-item-bg);
    padding: 0.7rem;
    border-radius: 0.3rem;
    transition: background-color 0.3s;
    font-size: 0.9rem;
}

/* Media Queries for Mobile */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .lotto-display {
        gap: 0.5rem;
    }

    .theme-toggle {
        font-size: 1.2rem;
    }
}