:root {
            --bg-color: #f0f2f5;
            --container-bg: #ffffff;
            --text-main: #1d1d1f;
            --text-sub: #86868b;
            --card-bg: #f5f5f7;
            --accent: #0071e3;
            --shadow: rgba(0, 0, 0, 0.1);
        }

        [data-theme='dark'] {
            --bg-color: #000000;
            --container-bg: #1c1c1e;
            --text-main: #f5f5f7;
            --text-sub: #a1a1a6;
            --card-bg: #2c2c2e;
            --accent: #0a84ff;
            --shadow: rgba(255, 255, 255, 0.05);
        }

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

        .container {
            width: 90%;
            max-width: 500px;
            background: var(--container-bg);
            padding: 2rem;
            border-radius: 24px;
            box-shadow: 0 20px 40px var(--shadow);
            position: relative;
        }

        /* 테마 전환 버튼 */
        .theme-toggle {
            position: absolute;
            top: 20px;
            right: 20px;
            background: var(--card-bg);
            border: none;
            padding: 10px;
            border-radius: 12px;
            cursor: pointer;
            color: var(--text-main);
            font-size: 1.2rem;
            transition: 0.2s;
        }

        h1 { font-weight: 900; font-size: 1.8rem; margin-bottom: 2rem; }
        h1 span { color: var(--accent); }

        .game-row {
            background: var(--card-bg);
            margin-bottom: 12px;
            padding: 15px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            transition: transform 0.2s;
        }

        .game-row:hover { transform: translateY(-2px); }

        .game-label {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-sub);
            width: 45px;
        }

        .balls { display: flex; gap: 8px; }

        /* 로또 공 디자인 업그레이드 */
        .ball {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            color: #fff;
            font-size: 0.95rem;
            box-shadow: inset -3px -3px 6px rgba(0,0,0,0.2), 2px 4px 8px rgba(0,0,0,0.1);
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
            animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            opacity: 0;
        }

        @keyframes bounceIn {
            from { transform: scale(0); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        /* 실제 로또 색상 (명확한 대비) */
        .n1 { background: linear-gradient(135deg, #ffcc00, #f39c12); } /* 1-10 */
        .n11 { background: linear-gradient(135deg, #3498db, #2980b9); } /* 11-20 */
        .n21 { background: linear-gradient(135deg, #e74c3c, #c0392b); } /* 21-30 */
        .n31 { background: linear-gradient(135deg, #95a5a6, #7f8c8d); } /* 31-40 */
        .n41 { background: linear-gradient(135deg, #2ecc71, #27ae60); } /* 41-45 */

        .generate-btn {
            width: 100%;
            padding: 18px;
            margin-top: 1.5rem;
            border: none;
            border-radius: 16px;
            background: var(--accent);
            color: white;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            transition: opacity 0.2s;
        }

        .generate-btn:active { transform: scale(0.98); }

#language-select {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--card-bg);
    border: 1px solid var(--text-sub);
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: 0.2s;
    appearance: none; /* Remove default browser styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13%205.1L146.2%20202.7%2018.6%2074.5a17.6%2017.6%200%200%200-25.3%2023.2l130.8%20130.8c6.7%206.7%2017.7%206.7%2024.4%200l130.8-130.8c6.9-6.9%206.9-18%200-24.9z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px; /* Make space for the arrow */
}

[data-theme='dark'] #language-select {
    border-color: var(--text-sub);
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13%205.1L146.2%20202.7%2018.6%2074.5a17.6%2017.6%200%200%200-25.3%2023.2l130.8%20130.8c6.7%206.7%2017.7%206.7%2024.4%200l130.8-130.8c6.9-6.9%206.9-18%200-24.9z%22%2F%3E%3C%2Fsvg%3E'); /* White arrow for dark theme */
}

#language-select option {
    background-color: var(--container-bg);
    color: var(--text-main);
}

.footer-links {
    text-align: center;
    margin-top: 1.5rem;
}
.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}
.footer-links a:hover {
    text-decoration: underline;
}