:root {
    --primary-color: #4a90e2;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333;
    --sub-text: #666;
    --border-color: #eee;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    
    /* 로또 공 색상 */
    --lotto-yellow: #fbc02d;
    --lotto-blue: #1976d2;
    --lotto-red: #e53935;
    --lotto-gray: #757575;
    --lotto-green: #43a047;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --sub-text: #aaa;
    --border-color: #333;
    --shadow: 0 4px 15px rgba(0,0,0,0.5);
}

* {
    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);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    position: relative;
}

.theme-switch-wrapper {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: all 0.2s;
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header h1 span {
    color: var(--primary-color);
}

header p {
    color: var(--sub-text);
    margin-bottom: 2rem;
}

.ball-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 80px;
    margin-bottom: 2rem;
    align-items: center;
}

.lotto-set {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

.lotto-set:last-child {
    border-bottom: none;
}

.set-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--sub-text);
    margin-right: 10px;
    min-width: 45px;
    text-align: left;
}

.placeholder {
    color: var(--sub-text);
    font-style: italic;
    padding: 2rem 0;
}

.ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.2), 2px 2px 5px rgba(0,0,0,0.1);
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

@keyframes pop {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* 번호 구간별 색상 */
.ball.num-1-10 { background-color: var(--lotto-yellow); }
.ball.num-11-20 { background-color: var(--lotto-blue); }
.ball.num-21-30 { background-color: var(--lotto-red); }
.ball.num-31-40 { background-color: var(--lotto-gray); }
.ball.num-41-45 { background-color: var(--lotto-green); }

.generate-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.generate-btn:hover {
    background-color: #357abd;
    transform: translateY(-2px);
}

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

footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #999;
}
