:root {
    --primary-color: #ff9d76; /* Warm cat-like orange */
    --secondary-color: #ffeadb;
    --accent-color: #4CAF50;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #2d3436;
    --text-muted: #636e72;
    --border-color: #f1f2f6;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --gradient: linear-gradient(135deg, #ff9d76 0%, #ff7e5f 100%);
}

body.light-mode {
    --bg-color: #fdfbfb;
    --card-bg: #ffffff;
    --text-color: #2d3436;
    --border-color: #f1f2f6;
}

/* Dark Mode Overhaul */
body:not(.light-mode) {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow: 0 10px 40px rgba(0,0,0,0.3);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navbar Enhancement */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(var(--bg-color), 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.3s;
    opacity: 0.8;
}

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

/* Main Container */
.container {
    max-width: 800px;
    margin: 100px auto 0;
    padding: 40px 24px;
}

.main-header {
    text-align: center;
    margin-bottom: 4rem;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Theme Toggle Button */
#theme-toggle {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 157, 118, 0.3);
    transition: 0.3s;
    margin-bottom: 2rem;
}

#theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 157, 118, 0.4);
}

/* Cards & Sections */
section, main {
    background-color: var(--card-bg);
    border-radius: 30px;
    padding: 3rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--primary-color);
    background-color: rgba(255, 157, 118, 0.03);
    border-radius: 24px;
    padding: 4rem 2rem;
    cursor: pointer;
    transition: 0.4s ease;
}

.upload-area:hover {
    background-color: rgba(255, 157, 118, 0.08);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

/* Prediction Bars */
.result-bar-wrapper {
    margin-bottom: 1.5rem;
}

.result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.progress-bar {
    height: 16px;
    background-color: var(--border-color);
    border-radius: 50px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* FAQ & Info */
h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2::before {
    content: '';
    width: 6px;
    height: 24px;
    background: var(--gradient);
    border-radius: 10px;
}

/* Footer & Legal */
.footer {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.legal-section {
    background-color: var(--card-bg);
    padding: 4rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

/* Spinner */
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--border-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Buttons */
button#retry-btn, button#submit-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
}

button#retry-btn:hover, button#submit-btn:hover {
    box-shadow: 0 10px 25px rgba(255, 126, 95, 0.4);
    transform: translateY(-3px);
}

@media (max-width: 600px) {
    h1 { font-size: 2.2rem; }
    .nav-menu { display: none; }
    section, main { padding: 2rem 1.5rem; }
}
