/* ============================================
   ELEVENLABS-INSPIRED UI REDESIGN
   High-Speed Legal Intelligence Theme
   ============================================ */

/* ===== CSS RESET & BASE STYLES ===== */
/* Comprehensive CSS Reset for Cross-Browser Compatibility */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure consistent font rendering */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove default button styling */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* Remove default button styling */
button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Remove list styling */
ul, ol {
    list-style: none;
}

/* Remove default table spacing */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove default link styling */
a {
    text-decoration: none;
    color: inherit;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Remove default fieldset styling */
fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/* Remove default details styling */
details {
    display: block;
}

summary {
    display: list-item;
    cursor: pointer;
}

:root {
    /* ===== NEW COLOR PALETTE ===== */
    --obsidian-dark: #050505;
    --obsidian-light: #0A0A0A;
    --obsidian-card: #111111;
    --electric-indigo: #6366F1;
    --electric-indigo-glow: rgba(99, 102, 241, 0.3);
    --emerald-green: #10B981;
    --emerald-green-glow: rgba(16, 185, 129, 0.3);
    --warning-orange: #F59E0B;
    --warning-orange-glow: rgba(245, 158, 11, 0.3);
    --error-red: #EF4444;
    --error-red-glow: rgba(239, 68, 68, 0.3);
    
    /* ===== TYPOGRAPHY ===== */
    --text-white: #FFFFFF;
    --text-gray-light: #F3F4F6;
    --text-gray: #A1A1AA;
    --text-gray-dark: #6B7280;
    
    /* ===== GLASSMORPHISM ===== */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    
    /* ===== SPACING ===== */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* ===== BORDERS ===== */
    --border-thin: 1px;
    --border-thick: 2px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-pill: 9999px;
}

/* ===== GOOGLE FONTS IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--obsidian-dark);
    color: var(--text-gray);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: none;
    margin: 0 auto;
    padding: 2rem 2rem;
}

/* ===== MAIN GRID LAYOUT ===== */
.main-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: grid;
    -ms-grid-columns: 55% 45%;
    grid-template-columns: 55% 45%;
    gap: 2rem;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: start;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .main-grid {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ===== HEADER & BRANDING ===== */
header {
    text-align: center;
    padding: var(--spacing-xl) 0;
    position: relative;
    margin-bottom: 3rem;
}

/* Logo/Branding Container */
.brand-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

/* New Abstract Logo - Digital Node/Spark */
.logo-spark {
    width: 48px;
    height: 48px;
    position: relative;
}

.logo-spark::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--electric-indigo);
    border-radius: 50%;
    box-shadow: 0 0 40px var(--electric-indigo-glow);
}

.logo-spark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border: var(--border-thin) solid var(--electric-indigo);
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.2;
    }
}

/* Header Text */
h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-white) 0%, var(--text-gray-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ===== GLASSMORPHISM UTILITIES ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--border-thin) solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glow-border {
    border: var(--border-thin) solid var(--electric-indigo-glow);
    box-shadow: 0 0 30px var(--electric-indigo-glow);
}

/* ===== LEFT SIDE - MAIN APPLICATION ===== */
.app-section {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Form Styles */
form {
    composes: glass-card;
    padding: 2rem;
    transition: all 0.3s ease;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-gray-light);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

textarea, select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(10, 10, 10, 0.8);
    border: var(--border-thin) solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text-white);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

textarea:focus, select:focus {
    outline: none;
    border-color: var(--electric-indigo);
    box-shadow: 0 0 0 3px var(--electric-indigo-glow);
    background: rgba(15, 15, 15, 0.9);
}

textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236366F1' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--electric-indigo) 0%, #818CF8 100%);
    color: var(--text-white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #4a4a6a;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn:disabled::before {
    display: none;
}

/* Response Section */
.response-section {
    composes: glass-card;
    padding: 2rem;
    min-height: 200px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.placeholder {
    color: var(--text-gray-dark);
    font-style: italic;
    text-align: center;
    font-size: 1.1rem;
}

.response-content {
    color: var(--text-gray-light);
    font-size: 1rem;
    line-height: 1.7;
    width: 100%;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    border-top-color: var(--electric-indigo);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RIGHT SIDE - INTERACTIVE "WHY US" SECTION ===== */
.comparison-section {
    composes: glass-card;
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.comparison-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--electric-indigo), transparent);
}

/* Interactive Toggle Component */
.interactive-toggle-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.toggle-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.toggle-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.3px;
}

.toggle-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
    margin: 0;
}

/* Pill-shaped Toggle Switch */
.toggle-switch {
    display: flex;
    background: rgba(10, 10, 10, 0.8);
    border: var(--border-thin) solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-pill);
    padding: 4px;
    margin: 0 auto;
    width: 320px;
    max-width: 100%;
    position: relative;
}

.toggle-option {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: var(--border-radius-pill);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.toggle-option.active {
    color: var(--text-white);
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, var(--electric-indigo) 0%, #818CF8 100%);
    border-radius: var(--border-radius-pill);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.toggle-switch.generic-active .toggle-slider {
    transform: translateX(0);
}

.toggle-switch.prawosfera-active .toggle-slider {
    transform: translateX(100%);
}

/* Chat Interface Card */
.chat-interface {
    composes: glass-card;
    padding: var(--spacing-lg);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.chat-interface.generic-active {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.1);
    filter: brightness(0.9) contrast(0.95);
}

.chat-interface.prawosfera-active {
    border-color: var(--electric-indigo-glow);
    box-shadow: 0 8px 32px var(--electric-indigo-glow);
    filter: brightness(1.1) contrast(1.05);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.chat-message {
    display: flex;
    gap: var(--spacing-sm);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.avatar.generic {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    color: #000;
}

.avatar.prawosfera {
    background: linear-gradient(135deg, var(--electric-indigo) 0%, #818CF8 100%);
    color: var(--text-white);
}

.message-content {
    flex: 1;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-md);
    background: rgba(10, 10, 10, 0.6);
    border: var(--border-thin) solid rgba(255, 255, 255, 0.05);
}

.message-content p {
    margin: 0;
    color: var(--text-gray-light);
    line-height: 1.6;
}

/* Citation Highlighting */
.citation {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0.25rem;
    position: relative;
    cursor: help;
}

.citation.generic {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
    border: var(--border-thin) solid rgba(245, 158, 11, 0.4);
}

.citation.prawosfera {
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald-green);
    border: var(--border-thin) solid rgba(16, 185, 129, 0.4);
}

/* Tooltips */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.9);
    border: var(--border-thin) solid;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    margin-bottom: 8px;
}

.tooltip.generic {
    border-color: rgba(245, 158, 11, 0.4);
    color: #F59E0B;
}

.tooltip.prawosfera {
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--emerald-green);
}

.citation:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
    border: var(--border-thin) solid rgba(245, 158, 11, 0.4);
}

.badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald-green);
    border: var(--border-thin) solid rgba(16, 185, 129, 0.4);
}

/* Source Verification Card */
.source-verification {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(10, 10, 10, 0.8);
    border-radius: var(--border-radius-sm);
    border: var(--border-thin) solid rgba(16, 185, 129, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.source-verification-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.source-verification-header svg {
    color: var(--emerald-green);
}

.source-verification-title {
    font-weight: 600;
    color: var(--emerald-green);
    font-size: 0.875rem;
}

.source-verification-content {
    font-size: 0.75rem;
    color: var(--text-gray);
    line-height: 1.4;
}

/* ===== DOCUMENT UPLOAD STYLES ===== */
.document-upload-container {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.file-input-wrapper {
    flex: 1;
    min-width: 120px;
}

.file-input {
    display: none;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(10, 10, 10, 0.8);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text-gray);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
}

.file-input-label:hover {
    border-color: var(--electric-indigo);
    background: rgba(15, 15, 15, 0.9);
    color: var(--text-gray-light);
}

.file-input-label svg {
    flex-shrink: 0;
}

.file-info {
    margin-bottom: var(--spacing-sm);
}

.file-info small {
    color: var(--text-gray-dark);
    font-size: 0.8rem;
}

.file-previews {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(10, 10, 10, 0.8);
    border: var(--border-thin) solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
}

.file-preview-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.file-preview-name {
    color: var(--text-gray-light);
    font-weight: 500;
}

.file-preview-size {
    color: var(--text-gray-dark);
    font-size: 0.8rem;
}

.file-preview-remove {
    background: none;
    border: none;
    color: var(--error-red);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.file-preview-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.file-preview-remove svg {
    width: 16px;
    height: 16px;
}

/* Security Notice */
.security-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: var(--spacing-sm);
    background: rgba(245, 158, 11, 0.1);
    border: var(--border-thin) solid rgba(245, 158, 11, 0.3);
    border-radius: var(--border-radius-sm);
    margin-top: var(--spacing-sm);
}

.security-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.security-text {
    color: #F59E0B;
    font-size: 0.9rem;
    line-height: 1.4;
}

.security-text strong {
    color: #D97706;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .main-grid {
        margin-top: var(--spacing-md);
    }
    
    form, .response-section, .comparison-section {
        padding: var(--spacing-md);
    }
    
    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .toggle-switch {
        width: 280px;
    }
    
    .toggle-option {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .document-upload-container {
        flex-direction: column;
    }
    
    .file-input-wrapper {
        min-width: auto;
    }
    
    .security-notice {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .security-icon {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    form, .response-section, .comparison-section {
        padding: var(--spacing-sm);
    }
    
    .toggle-switch {
        width: 100%;
    }
    
    .toggle-header h2 {
        font-size: 1.5rem;
    }
    
    .chat-interface {
        min-height: 350px;
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* ===== DEEPSEEK CHATBOT STYLES ===== */
.chatbot-container {
    composes: glass-card;
    margin-top: var(--spacing-md);
    display: flex;
    flex-direction: column;
    min-height: 400px;
    max-height: 800px;
    height: 70vh;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
    resize: vertical;
    overflow: hidden;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: var(--border-thin) solid var(--glass-border);
    background: rgba(10, 10, 10, 0.8);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

.chatbot-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--electric-indigo) 0%, #818CF8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
}

.chatbot-title h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
    line-height: 1.3;
}

.chatbot-subtitle {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0.25rem 0 0 0;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    min-height: 200px;
    max-height: none;
}

.chatbot-welcome {
    margin-bottom: var(--spacing-md);
}

.welcome-message {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(99, 102, 241, 0.1);
    border: var(--border-thin) solid var(--electric-indigo-glow);
    border-radius: var(--border-radius-md);
    animation: fadeIn 0.5s ease;
}

.welcome-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.welcome-content p {
    margin: 0 0 0.5rem 0;
    color: var(--text-gray-light);
    line-height: 1.5;
}

.welcome-content p:last-child {
    margin-bottom: 0;
}

.welcome-content strong {
    color: var(--text-white);
}

.chatbot-message {
    display: flex;
    gap: var(--spacing-sm);
    animation: fadeIn 0.3s ease;
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.chatbot-avatar.user {
    background: linear-gradient(135deg, var(--emerald-green) 0%, #34D399 100%);
    color: var(--text-white);
}

.chatbot-avatar.assistant {
    background: linear-gradient(135deg, var(--electric-indigo) 0%, #818CF8 100%);
    color: var(--text-white);
}

.chatbot-message-content {
    max-width: 90%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    line-height: 1.6;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.chatbot-message.user .chatbot-message-content {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.2) 100%);
    border: var(--border-thin) solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-green);
    border-bottom-right-radius: 4px;
}

.chatbot-message.assistant .chatbot-message-content {
    background: rgba(10, 10, 10, 0.6);
    border: var(--border-thin) solid rgba(255, 255, 255, 0.05);
    color: var(--text-gray-light);
    border-bottom-left-radius: 4px;
}

.chatbot-message-content p {
    margin: 0;
}

.chatbot-message-time {
    font-size: 0.7rem;
    color: var(--text-gray-dark);
    margin-top: 0.25rem;
    text-align: right;
}

.chatbot-input-container {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: var(--border-thin) solid var(--glass-border);
    background: rgba(10, 10, 10, 0.8);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.chatbot-input-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(15, 15, 15, 0.9);
    border: var(--border-thin) solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 44px;
    max-height: 200px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--electric-indigo);
    box-shadow: 0 0 0 3px var(--electric-indigo-glow);
    background: rgba(20, 20, 20, 0.9);
}

.chatbot-input::placeholder {
    color: var(--text-gray-dark);
}

.chatbot-send-btn {
    background: linear-gradient(135deg, var(--electric-indigo) 0%, #818CF8 100%);
    color: var(--text-white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chatbot-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.chatbot-send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.chatbot-send-btn:disabled {
    background: #4a4a6a;
    cursor: not-allowed;
    opacity: 0.6;
}

.chatbot-input-info {
    margin-top: 0.5rem;
    text-align: center;
}

.chatbot-input-info small {
    color: var(--text-gray-dark);
    font-size: 0.75rem;
}

.chatbot-footer {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-top: var(--border-thin) solid var(--glass-border);
    background: rgba(10, 10, 10, 0.9);
}

.chatbot-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.chatbot-disclaimer svg {
    flex-shrink: 0;
    color: var(--warning-orange);
}

/* Loading indicator for chatbot */
.chatbot-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--spacing-sm);
    color: var(--text-gray);
    font-size: 0.9rem;
}

.chatbot-loading-dots {
    display: flex;
    gap: 0.25rem;
}

.chatbot-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--electric-indigo);
    animation: bounce 1.4s infinite ease-in-out both;
}

.chatbot-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.chatbot-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scrollbar styling for chatbot messages */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--electric-indigo);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #818CF8;
}

/* Responsive design for chatbot */
@media (max-width: 768px) {
    .chatbot-container {
        max-height: 600px;
        height: 60vh;
        min-height: 350px;
    }
    
    .chatbot-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .chatbot-title h3 {
        font-size: 1.1rem;
    }
    
    .chatbot-subtitle {
        font-size: 0.8rem;
    }
    
    .chatbot-messages {
        padding: var(--spacing-md);
        min-height: 150px;
    }
    
    .chatbot-input-container {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .chatbot-message-content {
        max-width: 90%;
    }
    
    .chatbot-input {
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        max-height: 500px;
        height: 50vh;
        min-height: 300px;
        resize: none;
    }
    
    .chatbot-header-content {
        gap: 0.5rem;
    }
    
    .chatbot-logo {
        width: 32px;
        height: 32px;
    }
    
    .chatbot-title h3 {
        font-size: 1rem;
    }
    
    .chatbot-subtitle {
        font-size: 0.75rem;
    }
    
    .chatbot-messages {
        padding: var(--spacing-sm);
        min-height: 120px;
    }
    
    .chatbot-message-content {
        max-width: 95%;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .chatbot-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .chatbot-input {
        max-height: 120px;
    }
}
