:root {
    --bg-color: #f7f9fc;
    --text-color: #333;
    --container-bg: white;
    --button-bg: #4A90E2;
    --button-hover-bg: #357ABD;
    --ball-text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

body.dark-mode {
    --bg-color: #2c3e50;
    --text-color: #ecf0f1;
    --container-bg: #34495e;
    --button-bg: #5dade2;
    --button-hover-bg: #85c1e9;
    --ball-text-shadow: none;
}


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

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
}

h1 { color: var(--text-color); }
.container {
    background: var(--container-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: background-color 0.3s;
}
#ball-container {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    min-height: 60px;
}
.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: var(--ball-text-shadow);
    animation: bounce 0.5s ease-in;
}
button {
    padding: 10px 25px;
    font-size: 1rem;
    background-color: var(--button-bg);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}
button:hover { background-color: var(--button-hover-bg); }

/* 공 색상 정의 */
.color-1 { background-color: #fbc400; } /* 1-10 */
.color-2 { background-color: #69c8f2; } /* 11-20 */
.color-3 { background-color: #ff7272; } /* 21-30 */
.color-4 { background-color: #aaa; }    /* 31-40 */
.color-5 { background-color: #b0d840; } /* 41-45 */

@keyframes bounce {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
