:root {
    --bg-color: #f0f2f5;
    --container-bg: #fff;
    --text-color: #1e293b;
    --desc-color: #64748b;
    --card-bg: #f8fafc;
    --card-border: #e2e8f0;
    --button-bg: #0f172a;
    --button-hover-bg: #334155;
    --toggle-button-bg: #e2e8f0;
    --toggle-button-color: #1e293b;
}

[data-theme="dark"] {
    --bg-color: #1a202c;
    --container-bg: #2d3748;
    --text-color: #e2e8f0;
    --desc-color: #a0aec0;
    --card-bg: #4a5568;
    --card-border: #2d3748;
    --button-bg: #4299e1;
    --button-hover-bg: #63b3ed;
    --toggle-button-bg: #4a5568;
    --toggle-button-color: #e2e8f0;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    padding: 20px;
    margin: 0;
    transition: background-color 0.3s ease;
}
.container {
    width: 100%;
    max-width: 450px;
    background: var(--container-bg);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
h2 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 5px;
    letter-spacing: -1px;
    transition: color 0.3s ease;
}
.desc {
    text-align: center;
    color: var(--desc-color);
    font-size: 0.85rem;
    margin-bottom: 20px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.lotto-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.row-idx {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--desc-color);
    width: 35px;
    transition: color 0.3s ease;
}
.ball-group {
    display: flex;
    gap: 6px;
}

.ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.c1 { background: #eab308; } .c11 { background: #3b82f6; }
.c21 { background: #ef4444; } .c31 { background: #94a3b8; }
.c41 { background: #22c55e; }

.generate-btn {
    width: 100%;
    padding: 16px;
    background: var(--button-bg);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}
.generate-btn:hover {
    background: var(--button-hover-bg);
}

.theme-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: var(--toggle-button-bg);
    color: var(--toggle-button-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle-btn:hover {
    filter: brightness(1.1);
}