:root {
    --bg-color: #f0f0f0;
    --container-bg: #fff;
    --text-color: #333;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --toggle-bg: #ccc;
    --toggle-knob: #fff;
}

body.dark {
    --bg-color: #1a1a2e;
    --container-bg: #16213e;
    --text-color: #e0e0e0;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    --toggle-bg: #008CBA;
    --toggle-knob: #fff;
}

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

.container {
    text-align: center;
}

h1 {
    color: var(--text-color);
    transition: color 0.3s;
}

.lotto-machine {
    background-color: var(--container-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.games-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.game-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-label {
    width: 60px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-color);
    text-align: right;
    flex-shrink: 0;
    transition: color 0.3s;
}

.number-container {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
}

.game-row:nth-child(1) .number { background-color: #e74c3c; }
.game-row:nth-child(2) .number { background-color: #e67e22; }
.game-row:nth-child(3) .number { background-color: #2ecc71; }
.game-row:nth-child(4) .number { background-color: #3498db; }
.game-row:nth-child(5) .number { background-color: #9b59b6; }

#draw-button {
    background-color: #008CBA;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#draw-button:hover {
    background-color: #005f7a;
}

.theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.theme-toggle span {
    font-size: 14px;
    color: var(--text-color);
    transition: color 0.3s;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background-color: var(--toggle-bg);
    border-radius: 26px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background-color: var(--toggle-knob);
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}