:root {
    --bg-color: oklch(98% 0.01 260);
    --card-bg: oklch(100% 0 0 / 0.8);
    --primary: oklch(65% 0.2 260);
    --secondary: oklch(70% 0.15 320);
    --text-main: oklch(20% 0.02 260);
    --text-muted: oklch(50% 0.02 260);
    --ball-shadow: 0 10px 20px oklch(0% 0 0 / 0.1);
    --accent-glow: 0 0 20px oklch(65% 0.2 260 / 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 50%, oklch(95% 0.02 260) 0%, oklch(98% 0.01 260) 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px oklch(0% 0 0 / 0.15);
    width: 90%;
    max-width: 500px;
    text-align: center;
    border: 1px solid oklch(100% 0 0 / 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--primary);
    position: relative;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.ball-container {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.ball, .ball-placeholder {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--ball-shadow);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ball-placeholder {
    background: oklch(92% 0.01 260);
    color: oklch(70% 0.01 260);
    border: 2px dashed oklch(80% 0.01 260);
}

/* 로또 번호대별 색상 */
.ball.color-1 { background: linear-gradient(135deg, #fbc02d, #f9a825); color: white; } /* 1-10 */
.ball.color-2 { background: linear-gradient(135deg, #1976d2, #1565c0); color: white; } /* 11-20 */
.ball.color-3 { background: linear-gradient(135deg, #e53935, #c62828); color: white; } /* 21-30 */
.ball.color-4 { background: linear-gradient(135deg, #757575, #616161); color: white; } /* 31-40 */
.ball.color-5 { background: linear-gradient(135deg, #43a047, #2e7d32); color: white; } /* 41-45 */

.generate-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 1rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, background 0.3s;
    overflow: hidden;
}

.generate-button:hover {
    background: oklch(60% 0.2 260);
    transform: translateY(-2px);
    box-shadow: var(--accent-glow);
}

.generate-button:active {
    transform: translateY(0);
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.generate-button:hover .btn-glow {
    opacity: 1;
}

footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.ball-animate {
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
