:root {
    /* Dark Mode (Default) */
    --bg-color: #000000;
    --container-bg: rgba(30, 30, 30, 0.8);
    --text-color: #ffffff;
    --accent-color: #ff4757;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --border-color: rgba(255, 255, 255, 0.2);
    --btn-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

[data-theme="light"] {
    /* White Mode */
    --bg-color: #ffffff;
    --container-bg: rgba(245, 245, 245, 0.9);
    --text-color: #1a1a1a;
    --accent-color: #e84118;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --border-color: rgba(0, 0, 0, 0.1);
    --btn-shadow: 0 4px 15px rgba(232, 65, 24, 0.2);
}

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

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAANElEQVR42u3BAQEAAACCIP+vbkhAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8G4IAAAE2A9kRAAAAAElFTkSuQmCC');
    opacity: 0.03;
    pointer-events: none;
}

.container {
    background-color: var(--container-bg);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    min-width: 350px;
    transition: all 0.4s ease;
}

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

#theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#theme-btn:hover {
    background-color: var(--border-color);
    transform: scale(1.1);
}

h1 {
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 800;
    letter-spacing: -1px;
    transition: color 0.4s ease;
}

#generate-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 15px 35px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--btn-shadow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#generate-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5);
}

#generate-btn:hover {
    transform: translateY(-3px);
    background-color: #ff6b81;
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

#numbers-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.number-set {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.number-set span {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
    color: #fff;
    font-size: 1.2em;
    animation: number-appear 0.5s ease-out forwards;
    opacity: 0;
    transform: scale(0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Color ranges for lottery balls */
.ball-1-10 { background: radial-gradient(circle at 30% 30%, #fbc531, #e1b12c) !important; color: #000 !important; box-shadow: 0 0 20px rgba(251, 197, 49, 0.6) !important; }
.ball-11-20 { background: radial-gradient(circle at 30% 30%, #487eb0, #40739e) !important; box-shadow: 0 0 20px rgba(72, 126, 176, 0.6) !important; }
.ball-21-30 { background: radial-gradient(circle at 30% 30%, #e84118, #c23616) !important; box-shadow: 0 0 20px rgba(232, 65, 24, 0.6) !important; }
.ball-31-40 { background: radial-gradient(circle at 30% 30%, #7f8c8d, #2f3640) !important; box-shadow: 0 0 20px rgba(127, 140, 141, 0.6) !important; }
.ball-41-45 { background: radial-gradient(circle at 30% 30%, #4cd137, #44bd32) !important; box-shadow: 0 0 20px rgba(76, 209, 55, 0.6) !important; }

@keyframes number-appear {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
