:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --white: #ffffff;
    --border-radius: 1rem;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --nav-bg: #ffffff;
    --footer-bg: #1e293b;
    --footer-text: #f8fafc;
}

[data-theme='dark'] {
    --background-color: #0f172a;
    --text-color: #f1f5f9;
    --nav-bg: #1e293b;
    --white: #1e293b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header.site-header {
    background-color: var(--nav-bg);
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Main Container */
main {
    flex: 1;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    background-color: var(--white);
    max-width: 800px;
    width: 100%;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Content Sections */
.content-section {
    text-align: left;
    margin-top: 2rem;
}

.content-section h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content-section p {
    margin-bottom: 1rem;
}

/* Footer */
footer.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Existing Components Adjustments */
#generate-btn, .retry-btn, button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.nav-btn {
    display: inline-block;
    background-color: #ff6b6b;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
}

/* Prediction Bars */
.prediction-bar { margin-bottom: 1rem; }
.label-text { display: flex; justify-content: space-between; margin-bottom: 0.25rem; font-weight: 500; }
.bar-bg { background-color: #e2e8f0; height: 1rem; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background-color: var(--primary-color); transition: width 0.5s ease; }

/* Responsive */
@media (max-width: 600px) {
    .nav-menu { display: none; } /* Could add a mobile menu later */
    .container { padding: 1.5rem; }
}

#theme-toggle {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
}
