@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Noto+Sans+KR:wght@400;700&display=swap');

:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --app-bg-color: #fff;
    --app-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --heading-color: #222;
    --button-bg-color: #fbc400;
    --button-text-color: #333;
    --button-hover-bg-color: #ffda79;
    --lotto-ball-border-color: #eee;
    --lotto-ball-bg-color: #fff;
    --lotto-ball-text-color: #000;
    --header-bg: #fff;
    --footer-bg: #fff;
    --accent-color: #2196F3;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --app-bg-color: #1e1e1e;
    --app-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --heading-color: #fbc400;
    --button-bg-color: #fbc400;
    --button-text-color: #121212;
    --button-hover-bg-color: #ffda79;
    --lotto-ball-border-color: #333;
    --lotto-ball-bg-color: #2c2c2c;
    --lotto-ball-text-color: #fff;
    --header-bg: #1e1e1e;
    --footer-bg: #1e1e1e;
}


body {
    font-family: 'Poppins', 'Noto+Sans+KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* Header Styles */
#header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--button-bg-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--button-bg-color);
}

#app {
    text-align: center;
    background: var(--app-bg-color);
    padding: 60px 40px;
    border-radius: 15px;
    box-shadow: var(--app-shadow);
    transition: background-color 0.3s, box-shadow 0.3s;
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
}

h1 {
    margin-bottom: 10px;
    font-size: 2.5em;
    color: var(--heading-color);
}

.subtitle {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 40px;
}

#lotto-numbers {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
}

.lotto-game {
    display: flex;
    justify-content: center;
    gap: 15px;
}

lotto-ball {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    border: 1px solid var(--lotto-ball-border-color);
    animation: appear 0.5s ease-in-out;
    background-color: var(--lotto-ball-bg-color);
    color: var(--lotto-ball-text-color);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* Color classes for lotto balls */
.ball-yellow { background-color: #fbc400; color: #000; }
.ball-blue { background-color: #4A90E2; color: #fff; }
.ball-red { background-color: #D0021B; color: #fff; }
.ball-gray { background-color: #9B9B9B; color: #000; }
.ball-green { background-color: #7ED321; color: #000; }


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

#generate-btn {
    padding: 18px 40px;
    font-size: 1.2em;
    cursor: pointer;
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(251, 196, 0, 0.3);
}

#generate-btn:hover:not(:disabled) {
    background-color: var(--button-hover-bg-color);
    transform: translateY(-3px);
}

/* Info Section Styles */
#info-section {
    margin-top: 60px;
    text-align: left;
}

.content-box {
    line-height: 1.8;
    color: var(--text-color);
}

.content-box h3 {
    margin-top: 30px;
    color: var(--heading-color);
}

.content-box ul {
    padding-left: 20px;
}

.content-box li {
    margin-bottom: 10px;
}

/* Contact Section Styles */
#contact-section, #comments-section {
    margin-top: 60px;
}

hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin-bottom: 40px;
}

body.dark-mode hr { background: #333; }

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--lotto-ball-border-color);
    border-radius: 10px;
    background-color: var(--lotto-ball-bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 15px;
}

#submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    cursor: pointer;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
}

/* Footer Styles */
#footer {
    background-color: var(--footer-bg);
    padding: 40px 0;
    margin-top: auto;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.footer-links a {
    text-decoration: none;
    color: #888;
    font-size: 0.85rem;
}

/* Theme Switcher */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { position: relative; width: 50px; height: 26px; }
.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; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(24px); }

@media (max-width: 600px) {
    #app { padding: 40px 20px; }
    h1 { font-size: 2em; }
    .header-container { flex-direction: column; gap: 15px; }
    nav ul { gap: 10px; }
}
