:root {
    --bg-color: #f0f0f0;
    --container-bg: #ffffff;
    --text-color: #333333;
    --primary-color: #3498db;
    --secondary-color: #e74c3c;
    --accent-color: #2ecc71;
    --accent-hover: #27ae60;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #f0f0f0;
    --primary-color: #5dade2;
    --secondary-color: #ec7063;
    --accent-color: #58d68d;
    --accent-hover: #2ecc71;
    --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 {
    position: relative;
    text-align: center;
    background-color: var(--container-bg);
    padding: 3rem 2rem 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px var(--shadow-color);
    transition: background-color 0.3s, box-shadow 0.3s;
}

#theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

#theme-toggle:hover {
    background-color: var(--bg-color);
}

h1 {
    margin-bottom: 2rem;
}

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

.lotto-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    background-color: var(--primary-color);
    animation: number-fade-in 0.5s ease-in-out;
    transition: background-color 0.3s;
}

.lotto-number.special {
    background-color: var(--secondary-color);
}

#generate-btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    background-color: var(--accent-color);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

#generate-btn:hover {
    background-color: var(--accent-hover);
}

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

@keyframes number-fade-in {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.history-container {
    margin-top: 2rem;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: 50px;
    background-color: var(--container-bg);
    box-shadow: 0 4px 10px var(--shadow-color);
    animation: history-entry 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.history-item.removing {
    animation: history-exit 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes history-entry {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 0.7;
        transform: translateY(0) scale(1);
    }
}

@keyframes history-exit {
    0% {
        opacity: 0.7;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}
