:root {
    --bg-color: #0f172a;
    --card-bg: rgba(255,255,255,0.05);
    --text-color: white;
    --accent: #facc15;
    --header-bg: linear-gradient(135deg, #1e3a8a, #2563eb);
}

body.light-mode {
    --bg-color: #f3f4f6;
    --card-bg: white;
    --text-color: #111827;
    --accent: #2563eb;
    --header-bg: linear-gradient(135deg, #60a5fa, #93c5fd);
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    transition: 0.5s;
    overflow-x: hidden;
    position: relative;
}

header {
    padding: 70px 20px;
    background: var(--header-bg);
    transition: 0.5s;
}
header h1 { margin:0; font-size:42px; letter-spacing:2px; }

section { padding:50px 15px; max-width:900px; margin:auto; }

.card {
    background: var(--card-bg);
    padding: 35px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: 0.5s;
}

/* Lotto balls */
.lotto-set {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 15px 0;
    align-items: center;
}

.ball {
    width: 50px;
    height: 50px;
    margin: 5px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
    animation: pop 0.5s ease forwards;
    opacity: 0;
}

.bonus { background: #f87171 !important; }

/* + 표시 */
.plus {
    font-size: 24px;
    margin: 0 8px;
    font-weight: bold;
    animation: pop 0.5s ease forwards;
    opacity: 0;
}

/* 튀어나오는 애니메이션 */
@keyframes pop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Buttons */
button {
    margin-top: 25px;
    padding: 12px 25px;
    font-size: 15px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    background: var(--accent);
    color: #111;
    font-weight: bold;
    min-width: 140px;
    transition: 0.3s;
}
button:hover { transform: scale(1.05); }

.theme-btn { position: fixed; top:15px; right:15px; z-index:100; }

footer { margin-top:50px; padding:15px; font-size:13px; opacity:0.6; }

/* Background stars / sun */
body::before {
    content: "";
    position: fixed;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(white 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    animation: moveBg 60s linear infinite;
}

body.light-mode::before {
    background: radial-gradient(circle, rgba(255,255,255,0.2) 1px, transparent 1px);
    background-size: 25px 25px;
    opacity: 0.3;
}

/* Background animation */
@keyframes moveBg {
    0% { transform: translate(0,0); }
    100% { transform: translate(50px, 50px); }
}

/* 반응형 */
@media screen and (max-width: 768px) {
    header h1 { font-size: 32px; }
    .card { padding: 25px 15px; }
    .ball { width: 40px; height: 40px; font-size: 16px; }
}
@media screen and (max-width: 480px) {
    header { padding: 40px 15px; }
    header h1 { font-size: 28px; }
    .ball { width: 35px; height: 35px; font-size: 14px; }
    button { width: 80%; max-width: 200px; }
}
