:root {
    --bg-gradient: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    --text-color: #FFFFFF;
    --container-bg: rgba(255, 255, 255, 0.05);
    --container-border: rgba(255, 255, 255, 0.1);
    --h1-shadow: 0 0 10px rgba(139, 43, 226, 0.8), 0 0 20px rgba(139, 43, 226, 0.6);
    --btn-gradient: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%);
    --btn-shadow: 0 0 15px rgba(37, 117, 252, 0.5), 0 0 25px rgba(106, 17, 203, 0.5);
    --btn-hover-shadow: 0 0 25px rgba(37, 117, 252, 0.8), 0 0 35px rgba(106, 17, 203, 0.8);
    --toggle-btn-bg: rgba(255, 255, 255, 0.1);
}

body.light-mode {
    --bg-gradient: radial-gradient(ellipse at bottom, #e0eafc 0%, #cfdef3 100%);
    --text-color: #333333;
    --container-bg: rgba(255, 255, 255, 0.7);
    --container-border: rgba(0, 0, 0, 0.1);
    --h1-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    --btn-gradient: linear-gradient(45deg, #2575fc 0%, #6a11cb 100%);
    --btn-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --btn-hover-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    --toggle-btn-bg: rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    background: var(--container-bg);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--container-border);
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: background 0.3s ease, border 0.3s ease;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: var(--h1-shadow);
    transition: text-shadow 0.3s ease;
}

.numbers-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.number-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.number-ball.rolling {
    animation: drumroll 0.15s infinite alternate;
    background: radial-gradient(circle at 30% 30%, #555, #222) !important;
    color: transparent;
}

.number-ball.reveal {
    animation: reveal 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes drumroll {
    from { transform: translateY(-3px) rotate(-3deg); }
    to { transform: translateY(3px) rotate(3deg); }
}

@keyframes reveal {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.generate-btn {
    background: var(--btn-gradient);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: var(--btn-shadow);
    outline: none;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--btn-hover-shadow);
}

.generate-btn:active {
    transform: translateY(1px);
    box-shadow: var(--btn-shadow);
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--toggle-btn-bg);
    border: 1px solid var(--container-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}
