:root {
    --primary-color: #4a90e2;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333;
    --history-title: #888;
    --border-color: #eee;
    --ball-empty: #eee;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #f0f0f0;
    --history-title: #aaa;
    --border-color: #444;
    --ball-empty: #444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transition: background-color 0.3s;
}

.theme-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none !important;
    box-shadow: none !important;
    padding: 10px !important;
    font-size: 1.5rem !important;
    border-radius: 50% !important;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    margin-bottom: 2rem;
    font-weight: 700;
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    min-height: 60px;
}

.number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--ball-empty);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

button:hover {
    background-color: #357abd;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.history {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

h2 {
    font-size: 1.2rem;
    color: var(--history-title);
    margin-bottom: 1rem;
}

#history-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: center;
    gap: 5px;
    animation: fadeIn 0.5s ease-out;
}

.small-ball {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
