:root {
    --bg-color: #f0f0f0;
    --text-color: #333;
    --container-bg: #fff;
    --ball-bg: #fff;
    --ball-border: #ccc;
    --btn-bg: #e0e0e0;
    --btn-text: #333;
    --history-bg: #f9f9f9;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --container-bg: #1e1e1e;
    --ball-bg: #2c2c2c;
    --ball-border: #444;
    --btn-bg: #333;
    --btn-text: #e0e0e0;
    --history-bg: #1e1e1e;
}

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

.container {
    text-align: center;
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
}

.theme-toggle {
    text-align: right;
    margin-bottom: 1rem;
}

#theme-btn {
    background: none;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
}

h1 {
    margin-bottom: 2rem;
}

.lotto-display {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 60px;
}

.lotto-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--ball-bg);
    border: 2px solid var(--ball-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Lotto Ball Colors */
.ball-yellow { background-color: #fbc400; border-color: #e5b300; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.2); }
.ball-blue { background-color: #69c8f2; border-color: #5bbadd; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.2); }
.ball-red { background-color: #ff7272; border-color: #e66666; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.2); }
.ball-gray { background-color: #aaaaaa; border-color: #999999; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.2); }
.ball-green { background-color: #b0d840; border-color: #9ec239; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.2); }

#generator-btn {
    padding: 12px 24px;
    font-size: 18px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    transition: transform 0.1s, background-color 0.2s;
    margin-bottom: 1rem;
}

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

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

.history {
    margin-top: 2rem;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--history-bg);
    padding: 1rem;
    border-radius: 8px;
}

#history-list {
    list-style: none;
    padding: 0;
}

#history-list li {
    padding: 8px;
    border-bottom: 1px solid var(--ball-border);
}

#history-list li:last-child {
    border-bottom: none;
}