:root {
    --bg-color: #e9ecef;
    --container-bg: #ffffff;
    --text-color: #212529;
    --button-bg: #495057;
    --button-hover: #343a40;
    --shadow: rgba(0, 0, 0, 0.15);
    --machine-silver: linear-gradient(145deg, #dee2e6, #adb5bd);
    --machine-dark: #495057;
    --glass-shine: rgba(255, 255, 255, 0.4);
}

[data-theme='dark'] {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #f8f9fa;
    --button-bg: #adb5bd;
    --button-hover: #ced4da;
    --shadow: rgba(0, 0, 0, 0.6);
    --machine-silver: linear-gradient(145deg, #495057, #212529);
    --machine-dark: #000000;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, 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: all 0.3s ease;
}

.container {
    text-align: center;
    background: var(--container-bg);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 20px 50px var(--shadow);
    width: 95%;
    max-width: 700px;
    position: relative;
}

#theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1.5px solid var(--text-color);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 100;
}

/* Lotto Machine Construction */
.machine-stage {
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

/* Exit Tube */
.exit-tube {
    width: 60px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(2px);
}

.glass-drum {
    width: 300px;
    height: 250px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 150px / 125px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(3px);
    box-shadow: inset 0 0 40px rgba(255,255,255,0.1), 0 10px 30px rgba(0,0,0,0.1);
    z-index: 2;
}

.machine-base {
    width: 340px;
    height: 60px;
    background: var(--machine-silver);
    border-radius: 10px 10px 40px 40px;
    margin-top: -10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 5px solid var(--machine-dark);
}

.mixing-ball {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    opacity: 0.9;
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.2);
}

/* Rail for results */
#lotto-numbers-container {
    background: rgba(0,0,0,0.05);
    border-radius: 50px;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 12px;
    min-height: 85px;
    margin: 20px 0;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
    border: 2px solid rgba(0,0,0,0.05);
}

#generate-button {
    background: var(--machine-dark);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

#generate-button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0,0,0,0.3);
    background: #000;
}

#generate-button:active {
    transform: translateY(1px);
}

#generate-button:disabled {
    background-color: #adb5bd;
    cursor: wait;
    transform: none;
    box-shadow: none;
}
