:root {
    --bg-color: #f4f7f6;
    --container-bg: #ffffff;
    --text-main: #2c3e50;
    --text-sub: #7f8c8d;
    --btn-bg: #3498db;
    --btn-hover: #2980b9;
    --shadow: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-main: #f5f6fa;
    --text-sub: #a4b0be;
    --btn-bg: #1e90ff;
    --btn-hover: #3742fa;
    --shadow: rgba(0,0,0,0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: var(--text-main);
}

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

#theme-btn {
    background: var(--container-bg);
    border: 1px solid var(--text-sub);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow);
}

.container {
    text-align: center;
    background: var(--container-bg);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
    width: 90%;
    max-width: 600px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-sub);
    margin-bottom: 2rem;
}

.lotto-balls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2.5rem;
    min-height: 80px;
    align-items: center;
    flex-wrap: wrap;
}

.placeholder {
    font-size: 1.2rem;
    color: var(--text-sub);
    font-weight: 500;
}

.ball {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.6rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.2), 3px 5px 10px var(--shadow);
    animation: bounceIn 0.5s ease;
}

.ball-yellow { background: radial-gradient(circle at 30% 30%, #fbc531, #e1b12c); }
.ball-blue { background: radial-gradient(circle at 30% 30%, #487eb0, #40739e); }
.ball-red { background: radial-gradient(circle at 30% 30%, #e84118, #c23616); }
.ball-grey { background: radial-gradient(circle at 30% 30%, #7f8c8d, #718093); }
.ball-green { background: radial-gradient(circle at 30% 30%, #4cd137, #44bd32); }

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.main-btn {
    padding: 1.2rem 3rem;
    font-size: 1.3rem;
    font-weight: bold;
    background-color: var(--btn-bg);
    color: white;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow);
}

.main-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .ball { width: 50px; height: 50px; font-size: 1.2rem; }
    .container { padding: 2rem 1rem; }
}
