:root {
    --bg-gradient-light: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --bg-gradient-dark: linear-gradient(135deg, #1d2671, #c33764);
    --container-bg-light: rgba(255, 255, 255, 0.9);
    --container-bg-dark: rgba(0, 0, 0, 0.35);
    --text-color-light: #333;
    --text-color-dark: #fff;
    --ball-text: #fff;
    --shadow-light: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-dark: 0 10px 30px rgba(0,0,0,0.4);
}

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

body.dark-mode {
    background: var(--bg-gradient-dark);
    color: var(--text-color-dark);
}

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

body.dark-mode .container {
    background-color: var(--container-bg-dark);
    box-shadow: var(--shadow-dark);
}

h1 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

button {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.1s, background-color 0.3s;
}

button:active {
    transform: scale(0.98);
}

#generate-btn {
    background-color: #ffcc00;
    color: #333;
}

#generate-btn:hover {
    background-color: #ffdb4d;
}

#theme-toggle {
    background-color: #ddd;
    color: #333;
}

body.dark-mode #theme-toggle {
    background-color: #444;
    color: #fff;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lotto-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    flex-wrap: wrap;
}

body.dark-mode .lotto-row {
    background-color: rgba(0, 0, 0, 0.2);
}

.ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ccc;
    color: var(--ball-text);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Korean Lotto Colors */
.ball.yellow { background-color: #fbc400; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.ball.blue { background-color: #69c8f2; }
.ball.red { background-color: #ff7272; }
.ball.gray { background-color: #aaaaaa; }
.ball.green { background-color: #b0d840; }

.plus {
    font-weight: bold;
    font-size: 1.2rem;
    color: inherit;
    opacity: 0.7;
}

.label-text {
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 5px;
    display: none; /* simple version */
}
