:root {
    /* Light Mode Variables */
    --primary-color: #4a90e2;
    --button-hover: #357abd;
    --bg-color: #f4f7f6;
    --container-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #888888;
    --ball-placeholder: #cccccc;
    
    /* Lotto Ball Colors */
    --ball-yellow: #fbc400;
    --ball-blue: #69c8f2;
    --ball-red: #ff7272;
    --ball-grey: #aaa;
    --ball-green: #b0d840;

    --toggle-bg: #e0e0e0;
    --toggle-icon: #ffa500;
}

/* Dark Mode Overrides */
[data-theme='dark'] {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-primary: #f0f0f0;
    --text-secondary: #aaaaaa;
    --ball-placeholder: #555555;
    --toggle-bg: #444444;
    --toggle-icon: #f1c40f;
}

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

.container {
    background: var(--container-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--toggle-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 2rem;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.placeholder {
    color: var(--ball-placeholder);
    font-style: italic;
}

.draw-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.draw-button:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.draw-button:active {
    transform: translateY(0);
}

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

/* Ball colors by range */
.range-10 { background-color: var(--ball-yellow); }
.range-20 { background-color: var(--ball-blue); }
.range-30 { background-color: var(--ball-red); }
.range-40 { background-color: var(--ball-grey); }
.range-max { background-color: var(--ball-green); }
