:root {
    --bg-color: #f8f9fa;
    --container-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --button-bg: #007bff;
    --button-hover: #0056b3;
    --number-bg: #28a745;
    --number-text: #ffffff;
    --nav-bg: #ffffff;
    --accent-color: #e83e8c;
}

body.dark-mode {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #f8f9fa;
    --text-muted: #adb5bd;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --button-bg: #375a7f;
    --button-hover: #2b4764;
    --number-bg: #218838;
    --nav-bg: #1e1e1e;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding-top: 70px; /* Space for fixed nav */
    transition: background-color 0.3s, color 0.3s;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 1000;
    padding: 10px 0;
}

.nav-content {
    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: 800;
    color: var(--button-bg);
    text-decoration: none;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Layout Containers */
main {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.section {
    background-color: var(--container-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--shadow-color);
    margin-bottom: 40px;
    transition: transform 0.2s ease;
}

.section:hover {
    transform: translateY(-5px);
}

h1, h2 {
    margin-top: 0;
    font-weight: 700;
}

.description {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Components */
#theme-toggle {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--button-bg);
    background: transparent;
    color: var(--button-bg);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

#theme-toggle:hover {
    background-color: var(--button-bg);
    color: white;
}

/* AI Classifier Specific */
#upload-container {
    border: 2px dashed var(--text-muted);
    padding: 40px;
    border-radius: 12px;
    margin: 20px 0;
    cursor: pointer;
}

#upload-button {
    background-color: var(--button-bg);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

#image-preview {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* Lotto Specific */
.lotto-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.lotto-number {
    width: 50px;
    height: 50px;
    background-color: var(--number-bg);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#draw-button {
    width: 100%;
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--shadow-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--shadow-color);
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-muted);
    margin: 0 10px;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 600px) {
    .section {
        padding: 25px;
    }
    .lotto-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
