:root {
    /* Tech/AI Theme (Dark & Neon) */
    --primary-color: #00ADB5; /* Cyan */
    --secondary-color: #393E46; /* Dark Grey */
    --background-color: #222831; /* Almost Black */
    --card-bg: #393E46;
    --text-color: #EEEEEE;
    --accent-color: #00FFF5;
    --shadow-color: rgba(0, 255, 245, 0.2);
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

html[data-theme='light'] {
    /* Clean Light Theme */
    --primary-color: #222831;
    --secondary-color: #EEEEEE;
    --background-color: #F9F9F9;
    --card-bg: #FFFFFF;
    --text-color: #222831;
    --accent-color: #00ADB5;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column; /* Changed for Navbar/Footer layout */
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    padding-top: 60px; /* Space for fixed navbar */
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 10%, var(--shadow-color), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(57, 62, 70, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    border-bottom: 1px solid var(--secondary-color);
}

.nav-brand {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

.container {
    background-color: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    width: 90%;
    max-width: 600px; /* Increased width for content */
    border: 1px solid rgba(0, 173, 181, 0.3);
    position: relative;
    transition: background-color 0.5s ease, border-color 0.5s ease;
    margin: 2rem 0;
}

.header-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

header {
    margin-bottom: 2.5rem;
}

.subtitle {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

h1 {
    font-family: var(--font-serif);
    color: var(--text-color);
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
}

/* Model Input Section */
.model-input-section {
    margin-bottom: 2rem;
}

.instruction-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.input-group {
    margin-bottom: 1rem;
}

#model-url {
    width: 100%;
    padding: 0.8rem;
    background-color: rgba(0,0,0,0.1);
    border: 1px solid var(--secondary-color);
    color: var(--text-color);
    border-radius: 4px;
    font-family: monospace;
}

#start-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

#start-btn:hover {
    opacity: 0.9;
}

/* Webcam & Label */
#webcam-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

#webcam-container canvas {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    max-width: 100%;
}

#label-container {
    text-align: left;
}

.label-row {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label-name {
    font-weight: bold;
    margin-right: 1rem;
    min-width: 80px;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 10px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 0.1s linear;
}

/* Content Section (AdSense Quality) */
.content-section {
    margin-top: 3rem;
    text-align: left;
}

.info-block {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.info-block h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.info-block p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.faq-list {
    list-style: none;
    padding: 0;
}

.faq-list li {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Partnership Section */
.partnership-section {
    margin-top: 3rem;
    text-align: left;
}

.partnership-section h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-desc {
    font-size: 0.85rem;
    opacity: 0.7;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

#partnership-form input, 
#partnership-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: transparent;
    border: 1px solid rgba(0, 173, 181, 0.3);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    border-radius: 2px;
    transition: all 0.3s ease;
}

#partnership-form input:focus, 
#partnership-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 173, 181, 0.2);
}

#partnership-form textarea {
    min-height: 100px;
    resize: vertical;
}

#submit-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.8rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

#submit-btn:hover {
    background: var(--primary-color);
    color: var(--card-bg);
}

/* Comments */
.comments-section {
    margin-top: 3rem;
    text-align: left;
}

.comments-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.divider {
    height: 1px;
    background-color: var(--secondary-color);
    margin-bottom: 2rem;
    opacity: 0.3;
}

/* Footer */
.site-footer {
    width: 100%;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--secondary-color);
    margin-top: auto; /* Push to bottom */
    font-size: 0.8rem;
    opacity: 0.7;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 0.5rem;
}

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


/* Theme Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    position: relative;
    display: inline-block;
    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;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}
