:root {
    --bg-color: #f0f2f5;
    --text-color: #333;
    --container-bg: #ffffff;
    --primary-color: #1a73e8;
    --secondary-color: #5f6368;
    --history-item-bg: #f8f9fa;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --btn-bg-color: #34a853;
    --btn-hover-bg-color: #2c8f44;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --container-bg: #2c2c2c;
    --primary-color: #66b3ff;
    --secondary-color: #a0a0a0;
    --history-item-bg: #3a3a3a;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --btn-bg-color: #4caf50;
    --btn-hover-bg-color: #45a049;
}

body {
    font-family: 'Helvetica Neue', 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: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    width: 90%;
    max-width: 600px;
    transition: transform 0.3s ease, background-color 0.3s;
    position: relative;
}

#theme-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s, transform 0.2s;
}

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

.container:hover {
    transform: translateY(-5px);
}

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

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

.lotto-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.lotto-number:hover {
    transform: scale(1.1);
}

#generate-btn {
    background-color: var(--btn-bg-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px var(--shadow-color);
}

#generate-btn:hover {
    background-color: var(--btn-hover-bg-color);
    transform: translateY(-2px);
}

.history {
    margin-top: 40px;
    text-align: left;
}

h2 {
    color: var(--secondary-color);
    border-bottom: 2px solid #e8eaed;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.8em;
}

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

#history-list li {
    background-color: var(--history-item-bg);
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px var(--shadow-color);
}

@media (max-width: 600px) {
    .container {
        padding: 30px;
    }

    h1 {
        font-size: 2em;
    }

    .lotto-display {
        gap: 10px;
    }

    .lotto-number {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }

    #generate-btn {
        padding: 12px 25px;
        font-size: 1.1em;
    }

    h2 {
        font-size: 1.5em;
    }

    #history-list li {
        font-size: 1em;
    }
}
