body {
    margin: 0;
    height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #1e1e2f, #2b2b45, #1e1e2f);
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 40px 45px;
    width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

h1 {
    text-align: center;
    margin-bottom: 25px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

input[type="number"] {
    width: 60px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    text-align: center;
}

button {
    display: block;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #5f9cff, #7b61ff);
    border: none;
    border-radius: 12px;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.set {
    margin-bottom: 18px;
}

.set-title {
    margin-bottom: 8px;
    font-weight: 600;
}

.balls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ball {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    box-shadow: inset -2px -2px 6px rgba(0,0,0,0.3);
    animation: flip 0.5s ease-out;
}

.bonus-label {
    margin: 0 6px;
    font-size: 14px;
    opacity: 0.8;
}

/* 로또 실제 색상 구간 */
.yellow { background: #fbc400; }
.blue   { background: #69c8f2; }
.red    { background: #ff7272; }
.gray   { background: #aaaaaa; }
.green  { background: #b0d840; }

@keyframes flip {
    from {
        transform: rotateX(90deg);
        opacity: 0;
    }
    to {
        transform: rotateX(0deg);
        opacity: 1;
    }
}