/* Basic Reset & Font */
:root {
    --background-color: #1a1a1d;
    --main-color: #c5c6c7;
    --highlight-color: #61dafb;
    --button-bg: #4b2a8d;
    --button-hover-bg: #613aaf;
    --shadow-color: rgba(97, 218, 251, 0.5);
    --machine-bg: #2d2d34;
    --machine-window-bg: rgba(0, 0, 0, 0.2);
    
    font-family: 'Nanum Pen Script', cursive;
}

body.light-mode {
    --background-color: #f0f0f0;
    --main-color: #333333;
    --highlight-color: #007bff;
    --button-bg: #007bff;
    --button-hover-bg: #0056b3;
    --shadow-color: rgba(0, 123, 255, 0.3);
    --machine-bg: #ffffff;
    --machine-window-bg: rgba(0, 0, 0, 0.05);
}

body {
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--main-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 400px;
}

/* Theme Toggle */
.theme-switch-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.theme-toggle {
    background: var(--machine-bg);
    border: 2px solid var(--highlight-color);
    color: var(--main-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 0 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

/* Header */
.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--highlight-color);
    text-shadow: 0 0 10px var(--shadow-color), 0 0 20px var(--shadow-color);
    margin: 0;
}

.header p {
    font-size: 1.5rem;
    margin: 10px 0 30px;
}

/* Machine */
.machine {
    background: var(--machine-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 0 15px rgba(0,0,0,0.5);
    margin-bottom: 30px;
    transition: background-color 0.3s ease;
}

.machine-window {
    background: var(--machine-window-bg);
    border: 2px solid var(--highlight-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 0 15px var(--shadow-color);
    transition: background-color 0.3s ease;
}

.ball-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    min-height: 100px;
    transition: all 0.3s ease;
}

.lotto-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3), inset 0 -3px 5px rgba(0,0,0,0.4);
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    transform: scale(0);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

@keyframes popIn {
    to { transform: scale(1); }
}

/* Button */
.generate-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    background: var(--button-bg);
    color: var(--main-color);
    border: 2px solid var(--highlight-color);
    border-radius: 10px;
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--shadow-color), 0 0 20px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    background: var(--button-hover-bg);
    box-shadow: 0 0 15px var(--shadow-color), 0 0 30px var(--shadow-color);
    transform: translateY(-2px);
}

.generate-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Ball Colors */
.color-1 { background: #fbc400; } /* 1-10 */
.color-2 { background: #69c8f2; } /* 11-20 */
.color-3 { background: #ff7272; } /* 21-30 */
.color-4 { background: #aaa; }    /* 31-40 */
.color-5 { background: #b0d840; } /* 41-45 */