:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #38bdf8;
    --accent: #818cf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    z-index: -1;
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

header h1 span {
    color: var(--primary);
}

header p {
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 3rem;
}

.ball-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.ball-placeholder, .ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ball-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
}

.ball {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.4);
    color: white;
    transform: scale(0);
    animation: popIn 0.5s forwards;
}

@keyframes popIn {
    to { transform: scale(1); }
}

.controls button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 3rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    outline: none;
}

.controls button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.5);
}

.controls button:active {
    transform: translateY(-1px);
}

/* Ball colors based on number ranges */
.ball-1 { background: linear-gradient(135deg, #facc15, #eab308); box-shadow: 0 10px 15px -3px rgba(250, 204, 21, 0.4); }
.ball-11 { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 10px 15px -3px rgba(96, 165, 250, 0.4); }
.ball-21 { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 10px 15px -3px rgba(248, 113, 113, 0.4); }
.ball-31 { background: linear-gradient(135deg, #94a3b8, #475569); box-shadow: 0 10px 15px -3px rgba(148, 163, 184, 0.4); }
.ball-41 { background: linear-gradient(135deg, #4ade80, #16a34a); box-shadow: 0 10px 15px -3px rgba(74, 222, 128, 0.4); }
