* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f4f8;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

body.dark {
    background-color: #0f1117;
    color: #e0e0e0;
}

.container {
    text-align: center;
    padding: 36px 40px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    width: 360px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark .container {
    background-color: #1a1d2e;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

h1 {
    font-size: 1.5em;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 24px;
}

.theme-toggle button {
    padding: 6px 14px;
    cursor: pointer;
    border: 2px solid #ccc;
    background: transparent;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: #888;
    transition: all 0.2s;
}

.theme-toggle button.active {
    border-color: #007bff;
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.08);
}

body.dark .theme-toggle button {
    color: #888;
    border-color: #444;
}

body.dark .theme-toggle button.active {
    border-color: #4da3ff;
    color: #4da3ff;
    background-color: rgba(77, 163, 255, 0.1);
}

/* Lotto Numbers */
.numbers {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    animation: popIn 0.3s ease;
}

.number:hover {
    transform: scale(1.1);
}

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

/* Lotto ball colors by number range */
.number.range-1  { background: #f5c700; } /* 1~10: yellow */
.number.range-2  { background: #4488ff; } /* 11~20: blue */
.number.range-3  { background: #ff4444; } /* 21~30: red */
.number.range-4  { background: #888888; } /* 31~40: gray */
.number.range-5  { background: #44bb44; } /* 41~45: green */

/* Generate Button */
#generate {
    padding: 12px 32px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

#generate:hover {
    background-color: #0056b3;
}

#generate:active {
    transform: scale(0.97);
}

body.dark #generate {
    background-color: #2979ff;
}

body.dark #generate:hover {
    background-color: #1565c0;
}
