@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@700;800&display=swap');

:root {
    --bg-color: #f0f2f5;
    --content-bg-color: #ffffff;
    --text-color: #333;
    --btn-bg-color: #5a67d8;
    --btn-hover-bg-color: #434190;
}

[data-theme='dark'] {
    --bg-color: #1a1a1a;
    --content-bg-color: #2b2b2b;
    --text-color: #e0e0e0;
    --btn-bg-color: #706fd3;
    --btn-hover-bg-color: #5a58a6;
}

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

.lotto-machine {
    background: var(--content-bg-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
    transition: background-color 0.3s;
}

h1 {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 800;
}

.numbers-display {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 80px;
    margin-bottom: 2rem;
}

.lotto-ball {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: inset -3px -3px 5px rgba(0,0,0,0.2);
}

/* Color ranges for lotto balls */
.ball-color-1 { background-color: #fbc400; } /* 1-10 */
.ball-color-2 { background-color: #69c8f2; } /* 11-20 */
.ball-color-3 { background-color: #ff7272; } /* 21-30 */
.ball-color-4 { background-color: #aaa; }    /* 31-40 */
.ball-color-5 { background-color: #b0d840; } /* 41-45 */

.generate-btn {
    background-color: var(--btn-bg-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-family: 'Nanum Gothic', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.generate-btn:hover {
    background-color: var(--btn-hover-bg-color);
}

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

/* Theme Switcher Styles */
.theme-switch-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--btn-bg-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--btn-bg-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}