/* ============================================
   ML/AI Portfolio - Dark Tech Theme
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #15151f;
    
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --border-color: #27272a;
    --border-glow: rgba(0, 212, 255, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.2);
    --shadow-glow-strong: 0 0 30px rgba(0, 212, 255, 0.4);
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing */
    --section-padding: 100px 0;
    --card-padding: 1.5rem;
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Mouse Follow Glow Effect */
.mouse-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, rgba(124, 58, 237, 0.08) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    filter: blur(40px);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

.text-accent {
    color: var(--accent-primary);
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

code, .font-mono {
    font-family: var(--font-mono);
}

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.brand-icon {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.brand-text {
    color: var(--text-primary);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary) !important;
    background: rgba(0, 212, 255, 0.1);
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.profile-image-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 2rem;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: var(--shadow-glow-strong);
    transition: var(--transition-base);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
}

.profile-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px dashed var(--accent-secondary);
    animation: spin 20s linear infinite;
}

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

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.hero-tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn-primary-custom {
    background: var(--accent-gradient);
    border: none;
    color: var(--bg-primary);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: var(--transition-base);
    box-shadow: var(--shadow-glow);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-strong);
    color: var(--bg-primary);
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: var(--transition-base);
}

.btn-outline-custom:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* ---------- Section Styles ---------- */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 1rem auto 0;
}

/* ---------- About Section ---------- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 991px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.highlight-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.highlight-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 10px;
    color: var(--bg-primary);
    font-size: 1.25rem;
}

/* ---------- Skills Section ---------- */
.skills-section {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--card-padding);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.skill-category:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.skill-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category-title i {
    color: var(--accent-primary);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.skill-badge:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
}

.skill-badge i {
    font-size: 1rem;
}

/* ---------- Projects Section ---------- */
.projects-preview {
    position: relative;
}

.projects-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1rem 0;
}

.projects-scroll-container::-webkit-scrollbar {
    display: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.projects-scroll-grid {
    display: flex;
    gap: 2rem;
    padding-bottom: 1rem;
}

.projects-scroll-grid .project-card {
    flex: 0 0 350px;
    scroll-snap-align: start;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.project-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.project-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 0.75rem;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.project-content {
    padding: var(--card-padding);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    font-size: 0.8rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.project-link:hover {
    gap: 0.75rem;
}

/* Projects Page */
.projects-page {
    padding-top: 120px;
    min-height: 100vh;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

/* ---------- Project Detail Page ---------- */
.project-detail-page {
    padding-top: 120px;
    min-height: 100vh;
}

.project-header {
    text-align: center;
    margin-bottom: 3rem;
}

.project-detail-thumbnail {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.project-detail-thumbnail img {
    width: 100%;
    height: auto;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--accent-primary);
}

/* Prediction Form */
.prediction-form-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-title i {
    color: var(--accent-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-range {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
}

.range-value {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 15px;
    font-size: 0.9rem;
    margin-left: 1rem;
    font-family: var(--font-mono);
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
}

.image-upload-area:hover,
.image-upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.05);
}

.image-upload-area i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.image-upload-area p {
    margin: 0;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    margin-top: 1rem;
    border-radius: var(--border-radius);
}

/* Checkbox and Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
}

.form-check-input:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check-label {
    cursor: pointer;
    color: var(--text-secondary);
}

/* Submit Button */
.predict-btn {
    background: var(--accent-gradient);
    border: none;
    color: var(--bg-primary);
    font-weight: 600;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.predict-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-strong);
}

.predict-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.predict-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--bg-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.predict-btn.loading .spinner {
    display: inline-block;
}

.predict-btn.loading .btn-text {
    display: none;
}

/* Results Section */
.results-section {
    margin-top: 2rem;
    display: none;
}

.results-section.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.result-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-title i {
    color: var(--accent-primary);
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    text-align: center;
    margin-bottom: 1rem;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-detail-item {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.result-detail-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.result-detail-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Chart Container */
.chart-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

/* Error Display */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

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

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
    padding-left: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

.footer-divider {
    border-color: var(--border-color);
    margin: 2rem 0;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-tech {
    margin-top: 0.5rem;
}

/* ---------- 404 Page ---------- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

/* ---------- Animations ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition-slow);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition-slow);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .hero {
        text-align: center;
        padding-top: 100px;
    }
    
    .profile-image-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .about-highlights {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-scroll-grid .project-card {
        flex: 0 0 300px;
    }
    
    .result-value {
        font-size: 2rem;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ---------- No Projects State ---------- */
.no-projects {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px dashed var(--border-color);
}

.no-projects i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.no-projects h3 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.no-projects p {
    color: var(--text-muted);
}

/* ============================================
   Project Type Specific Styles
   ============================================ */

/* ---------- RAG Chat Widget (Floating) ---------- */
.rag-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    font-family: var(--font-main);
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow-strong);
    transition: var(--transition-base);
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
}

.chat-toggle-btn i {
    font-size: 1.5rem;
    color: var(--bg-primary);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.rag-chat-widget.open .chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header-avatar i {
    color: var(--bg-primary);
    font-size: 1.1rem;
}

.chat-header-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.chat-header-status {
    font-size: 0.75rem;
    color: #22c55e;
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.chat-close-btn:hover {
    color: var(--text-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 85%;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-user {
    align-self: flex-end;
}

.chat-message-bot,
.chat-message-error {
    align-self: flex-start;
}

.chat-message-content {
    padding: 0.75rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message-user .chat-message-content {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    border-bottom-right-radius: 4px;
}

.chat-message-bot .chat-message-content {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-message-error .chat-message-content {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Typing indicator */
.typing-indicator .chat-message-content {
    display: flex;
    gap: 4px;
    padding: 1rem;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

.chat-sources {
    align-self: flex-start;
    max-width: 85%;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
}

.sources-label {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sources-list {
    margin: 0;
    padding-left: 1rem;
    color: var(--text-secondary);
}

.chat-input-area {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.chat-input-form {
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.chat-input:focus {
    border-color: var(--accent-primary);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn i {
    color: var(--bg-primary);
    font-size: 1rem;
}

/* ---------- Full Chat Interface (Chat Type Projects) ---------- */
.chat-interface-container {
    height: calc(100vh - 200px);
    min-height: 500px;
    max-height: 700px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-interface-header {
    padding: 1.25rem 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-interface-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-interface-avatar i {
    font-size: 1.5rem;
    color: var(--bg-primary);
}

.chat-interface-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.chat-interface-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.chat-messages-main {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-input-main-area {
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.chat-input-main-form {
    display: flex;
    gap: 1rem;
}

.chat-input-main {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    resize: none;
    min-height: 50px;
    max-height: 120px;
}

.chat-input-main:focus {
    border-color: var(--accent-primary);
}

/* ---------- DL Project Styles (Image-centric) ---------- */
.dl-upload-zone {
    border: 3px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.dl-upload-zone:hover,
.dl-upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.05);
}

.dl-upload-zone.has-image {
    padding: 1rem;
}

.dl-upload-icon {
    font-size: 4rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.dl-upload-text h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.dl-upload-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dl-preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--border-radius);
    margin: 0 auto;
    display: block;
}

.dl-result-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 991px) {
    .dl-result-container {
        grid-template-columns: 1fr;
    }
}

.dl-classification-result {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.dl-class-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 1rem;
}

.dl-confidence-bar {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.dl-confidence-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* ---------- NLP Project Styles (Text-focused) ---------- */
.nlp-text-area {
    min-height: 200px;
    font-size: 1.1rem;
    line-height: 1.8;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    resize: vertical;
    transition: var(--transition-fast);
}

.nlp-text-area:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.nlp-result-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.nlp-sentiment-display {
    text-align: center;
    padding: 2rem;
}

.nlp-sentiment-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.nlp-sentiment-icon.positive { color: #22c55e; }
.nlp-sentiment-icon.negative { color: #ef4444; }
.nlp-sentiment-icon.neutral { color: #f59e0b; }

.nlp-entity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.nlp-entity-tag {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.nlp-entity-tag.person { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.nlp-entity-tag.org { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.nlp-entity-tag.location { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.nlp-entity-tag.date { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

/* ---------- Agentic Project Styles ---------- */
.agent-steps-container {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.agent-step {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.agent-step:last-child {
    border-bottom: none;
}

.agent-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.agent-step.pending .agent-step-number {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.agent-step.active .agent-step-number {
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(0, 212, 255, 0); }
}

.agent-step-content {
    flex: 1;
}

.agent-step-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.agent-step-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.agent-step-result {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
}

/* ---------- Project Type Badges ---------- */
.type-badge-ml { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.type-badge-dl { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.type-badge-nlp { background: linear-gradient(135deg, #22c55e, #16a34a); }
.type-badge-rag { background: linear-gradient(135deg, #f59e0b, #d97706); }
.type-badge-chat { background: linear-gradient(135deg, #ec4899, #be185d); }
.type-badge-agentic { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* Mobile responsiveness for chat widget */
@media (max-width: 480px) {
    .rag-chat-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        right: -8px;
    }
}

/* ============================================
   Enhanced AI Chat System Styles
   ============================================ */

/* Chat Input Area */
.chat-input-main-area {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.chat-input-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.chat-action-btn:hover {
    border-color: #ec4899;
    color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
}

.chat-action-btn.recording {
    background: #ec4899;
    border-color: #ec4899;
    color: white;
    animation: recording-pulse 1s ease-in-out infinite;
}

@keyframes recording-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(236, 72, 153, 0); }
}

.chat-input-main-form {
    display: flex;
    flex: 1;
    gap: 0.5rem;
    align-items: center;
}

.chat-input-main {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.chat-input-main:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.chat-submit-area {
    display: flex;
    gap: 0.5rem;
}

.chat-send-btn {
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
}

.live-chat-start-btn {
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
}

/* Suggested Prompts */
.suggested-prompts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.suggested-prompt {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.suggested-prompt:hover {
    border-color: #ec4899;
    color: #ec4899;
}

/* Attachment Preview */
.attachment-preview {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attachment-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
}

.attachment-thumb {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.attachment-icon {
    color: var(--text-muted);
}

.attachment-name {
    color: var(--text-secondary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    transition: var(--transition-fast);
}

.attachment-remove:hover {
    color: #ef4444;
}

/* Live Chat Mode */
.live-chat-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.live-chat-visualization {
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.audio-visualizer {
    width: 100%;
    height: 80px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
}

.live-status-text {
    font-size: 1rem;
    color: #ec4899;
    font-weight: 500;
}

.live-transcript {
    width: 100%;
    max-width: 500px;
    min-height: 60px;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

.live-chat-controls {
    display: flex;
    gap: 1rem;
}

.live-chat-btn {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-chat-btn.respond-btn {
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white;
}

.live-chat-btn.respond-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.live-chat-btn.end-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.live-chat-btn.end-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.chat-mode-indicator {
    margin-left: auto;
}

.live-badge {
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    border-radius: 20px;
    color: #22c55e;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Streaming Cursor */
.streaming-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #ec4899;
    margin-left: 2px;
    animation: cursor-blink 0.8s infinite;
    vertical-align: text-bottom;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.chat-message-content.streaming {
    min-height: 1.5em;
}

/* Chat Features Info */
.chat-features-info {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-chip {
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border-radius: 25px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-chip span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   Global RAG Widget Styles
   ============================================ */

#global-rag-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.rag-widget-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: var(--transition-base);
    position: relative;
}

.rag-widget-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5);
}

.rag-widget-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    animation: widget-pulse 2s ease infinite;
}

@keyframes widget-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0; }
}

.rag-widget-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#global-rag-widget.open .rag-widget-toggle {
    display: none;
}

#global-rag-widget.open .rag-widget-window {
    display: flex;
}

.rag-widget-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.rag-widget-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.25rem;
}

.rag-widget-info {
    flex: 1;
}

.rag-widget-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.rag-widget-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.online-dot {
    color: #22c55e;
    font-size: 0.5rem;
    margin-right: 0.25rem;
}

.rag-widget-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.rag-widget-close:hover {
    color: var(--text-primary);
}

.rag-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: 320px;
}

.rag-widget-form {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.rag-widget-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.rag-widget-input:focus {
    border-color: var(--accent-primary);
}

.rag-widget-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.rag-widget-send:hover {
    transform: scale(1.05);
}

/* ============================================
   Computer Vision Template Styles
   ============================================ */

.type-badge-cv { 
    background: linear-gradient(135deg, #06b6d4, #0891b2); 
}

.cv-interface-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.cv-mode-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.cv-mode-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-mode-btn:hover {
    border-color: #06b6d4;
    color: #06b6d4;
}

.cv-mode-btn.active {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-color: transparent;
    color: white;
}

.cv-display-container {
    position: relative;
    background: var(--bg-primary);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.cv-video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.cv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cv-fps-counter,
.cv-detection-counter {
    position: absolute;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--border-radius);
    color: white;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.cv-fps-counter {
    top: 1rem;
    left: 1rem;
}

.cv-detection-counter {
    top: 1rem;
    right: 1rem;
}

.cv-upload-container {
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cv-upload-area {
    width: 100%;
    max-width: 500px;
    padding: 3rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.cv-upload-area:hover,
.cv-upload-area.dragover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
}

.cv-upload-area i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.cv-upload-area p {
    color: var(--text-secondary);
}

.cv-result-canvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--border-radius);
}

.cv-camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.cv-camera-placeholder i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.cv-camera-placeholder p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cv-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.cv-controls-left,
.cv-controls-right {
    display: flex;
    gap: 0.5rem;
}

.cv-control-group {
    display: flex;
    gap: 0.5rem;
}

.cv-control-btn {
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-control-btn:hover {
    border-color: #06b6d4;
    color: #06b6d4;
}

.cv-control-btn.active {
    background: rgba(6, 182, 212, 0.2);
    border-color: #06b6d4;
    color: #06b6d4;
}

.cv-control-btn.primary {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-color: transparent;
    color: white;
}

.cv-control-btn.primary:hover {
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.cv-control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cv-settings-panel {
    padding: 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.cv-settings-panel h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.cv-setting {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cv-setting label {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cv-setting input[type="range"] {
    width: 150px;
}

.cv-setting input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #06b6d4;
}

.cv-results-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
    padding: 1rem;
}

.cv-results-panel h4 {
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.cv-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent-primary);
}

.cv-result-label {
    font-weight: 500;
    color: var(--text-primary);
}

.cv-result-confidence {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.no-detections {
    text-align: center;
    color: var(--text-muted);
    padding: 1rem;
}

/* ============================================
   Mobile Responsiveness
   ============================================ */

@media (max-width: 768px) {
    .chat-input-main-area {
        flex-wrap: wrap;
    }
    
    .chat-input-actions {
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 0.5rem;
    }
    
    .chat-input-main-form {
        width: 100%;
    }
    
    .live-chat-mode {
        padding: 1.5rem;
    }
    
    .live-chat-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .live-chat-btn {
        width: 100%;
        justify-content: center;
    }
    
    #global-rag-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .rag-widget-toggle {
        width: 56px;
        height: 56px;
    }
    
    .rag-widget-window {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 150px);
        right: 0;
    }
    
    .cv-mode-toggle {
        flex-wrap: wrap;
    }
    
    .cv-mode-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
    }
    
    .cv-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cv-controls-left,
    .cv-controls-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cv-control-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
    }
}
