:root {
    --bg-color: #f0f2f5;
    --card-bg: white;
    --text-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --button-gradient: linear-gradient(145deg, #6a11cb, #2575fc);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #f0f2f5;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --button-gradient: linear-gradient(145deg, #8e2de2, #4a00e0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

#theme-button {
    background: var(--card-bg);
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lottery-machine {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color), 0 6px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 320px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

h1 {
    color: var(--text-color);
    margin-top: 0;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: -1px;
}

.numbers-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
    min-height: 60px;
}

.number-ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: 600;
    color: white;
    box-shadow: inset 0 -3px 4px rgba(0,0,0,0.2), 0 2px 5px rgba(0,0,0,0.2);
    animation: draw-animation 0.5s ease-out;
}

#draw-button {
    background: var(--button-gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#draw-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#draw-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes draw-animation {
    0% {
        transform: scale(0) translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}
