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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --accent: #10b981;
    --bg-primary: #0a0a0f;
    --bg-secondary: #151520;
    --bg-tertiary: #1e1e2e;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --glass-bg: rgba(30, 30, 46, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.neural-network {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

#neural-canvas {
    width: 100%;
    height: 100%;
}

.gradient-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    filter: blur(60px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 80%;
    animation-delay: 0s;
}

.orb-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 10%;
    animation-delay: -3s;
    background: linear-gradient(45deg, var(--secondary), var(--accent));
}

.orb-3 {
    width: 250px;
    height: 250px;
    top: 80%;
    right: 70%;
    animation-delay: -6s;
    background: linear-gradient(45deg, var(--accent), var(--primary));
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}


.animated-logo {
    width: 100%;
    height: 100%;
    max-width: 60px;
    max-height: 60px;
}

.logo-icon {
    width: 60px;   
    height: 60px;  
}

.logo-icon:hover .animated-logo {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-weight: 400;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: slideUp 1s ease-out;
}

.upload-card, .query-card, .response-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 50px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-card::before, .query-card::before, .response-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.upload-card:hover::before, .query-card:hover::before, .response-card:hover::before {
    left: 100%;
}

.upload-card:hover, .query-card:hover, .response-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px var(--shadow);
    border-color: var(--primary);
}

.upload-section {
    animation: slideInLeft 0.8s ease-out;
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent);
    border-radius: 12px;
    animation: slideInUp 0.5s ease-out;
}

.file-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--accent);
    font-weight: 500;
}

.remove-file {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* Query Section */
.query-section {
    animation: slideInRight 0.8s ease-out;
}

.query-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.query-header h3 {
    margin: 0;
    flex: 1;
}
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.query-input-container {
    position: relative;
    margin-bottom: 1.5rem;
}

#questionInput {
    width: 100%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1rem 4rem 1rem 1rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    min-height: 80px;
}

#questionInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.send-btn {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 0.75rem;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.send-btn:not(:disabled) {
    opacity: 1;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.send-btn:disabled {
    cursor: not-allowed;
}

.suggested-questions h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.question-pill {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.question-pill:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.response-section {
    animation: slideInUp 0.8s ease-out;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.copy-btn, .clear-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.clear-btn:hover {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.response-content {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 100px;
    position: relative;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; transform: scale(1); }
    30% { opacity: 1; transform: scale(1.2); }
}

.answer-text {
    display: none;
    line-height: 1.7;
    color: var(--text-primary);
}

.answer-text.show {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    animation: pulse 0.8s ease-in-out;
}

.lightning-loader {
    margin-bottom: 2rem;
}

.lightning-bolt {
    font-size: 4rem;
    color: var(--primary);
    animation: lightning 1.5s ease-in-out infinite;
}

@keyframes lightning {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: brightness(1) drop-shadow(0 0 10px var(--primary));
    }
    50% { 
        transform: scale(1.2) rotate(-5deg);
        filter: brightness(1.5) drop-shadow(0 0 20px var(--primary));
    }
}

.loading-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.loading-content p {
    color: var(--text-secondary);
}

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    min-width: 300px;
    color: var(--text-primary);
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transition: all 0.1s ease;
    transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .main-content {
        gap: 1.5rem;
    }
    
    .upload-card, .query-card, .response-card {
        padding: 1.5rem;
    }
    .upload-card.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
    }

    .upload-card .upload-text {
    margin-bottom: 1rem;
    }

    .upload-card .drag-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    }
    
    .question-pills {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .question-pill {
        width: 100%;
        text-align: left;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
        width: calc(100vw - 2rem);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

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

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

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

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

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

.processing {
    opacity: 0.7;
    pointer-events: none;
}

.processing .upload-btn,
.processing .send-btn {
    background: var(--text-muted);
    cursor: not-allowed;
}

button, .question-pill {
    position: relative;
    overflow: hidden;
}

button::before, .question-pill::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

button:hover::before, .question-pill:hover::before {
    width: 300px;
    height: 300px;
}

.glow-text {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-uploaded .upload-card {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
}

.ready-to-query .send-btn {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.error-state {
    border-color: var(--error) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

@keyframes processing-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); }
}

.processing-animation {
    animation: processing-glow 2s ease-in-out infinite;
}
