:root {
    --primary-color: #f1c40f;
    --ball-size: 50px;
    --transition-speed: 0.3s;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #1a1a1a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-color: #ffffff;
    --sub-text: #bdc3c7;
    --bg-gradient: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    --shadow: 0 20px 50px rgba(0,0,0,0.5);
    --btn-text: #000;
}

/* Light Mode Variables */
body.light-mode {
    --bg-color: #f5f6fa;
    --card-bg: #ffffff;
    --text-color: #2f3640;
    --sub-text: #7f8c8d;
    --bg-gradient: linear-gradient(135deg, #f5f6fa 0%, #dcdde1 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --btn-text: #000;
}

body {
    margin: 0;
    padding: 20px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    transition: background var(--transition-speed), color var(--transition-speed);
}

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

#theme-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--sub-text);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.container {
    text-align: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    max-width: 800px;
    width: 95%;
}

.results-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 2rem 0;
    min-height: 200px;
    justify-content: center;
}

.lotto-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    animation: slideIn 0.5s ease-out forwards;
}

.row-label {
    font-weight: bold;
    margin-right: 10px;
    min-width: 30px;
    color: var(--sub-text);
}

.ball {
    width: var(--ball-size);
    height: var(--ball-size);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    box-shadow: inset -3px -3px 10px rgba(0,0,0,0.2);
}

/* 로또 번호대별 색상 (동일하게 유지) */
.ball.color-1 { background: #fbc400; }
.ball.color-2 { background: #69c8f2; }
.ball.color-3 { background: #ff7272; }
.ball.color-4 { background: #aaaaaa; }
.ball.color-5 { background: #b0d840; }

#generate-btn {
    background: var(--primary-color);
    color: var(--btn-text);
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(241, 196, 15, 0.3);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-state {
    color: var(--sub-text);
    font-style: italic;
}
