* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to bottom right, #eff6ff, #ffffff, #fff7ed);
    min-height: 100vh;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-container {
    width: 2rem;
    height: 2rem;
    color: #2563eb;
}

.header-icon {
    width: 100%;
    height: 100%;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e293b;
}

.header-subtitle {
    font-size: 0.75rem;
    color: #64748b;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.award-icon {
    width: 1rem;
    height: 1rem;
    color: #f97316;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Banner */
.banner {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.banner-title {
    font-size: 1.875rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.banner-description {
    color: #bfdbfe;
    margin-bottom: 0.25rem;
}

.banner-funding {
    font-size: 0.75rem;
    color: #93c5fd;
    margin-bottom: 1rem;
}

.banner-features {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    width: 1rem;
    height: 1rem;
}

.banner-icon {
    width: 5rem;
    height: 5rem;
    opacity: 0.2;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Query Card */
.query-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.query-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}

.query-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.query-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #1e293b;
}

.query-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.query-input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.submit-btn {
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #1d4ed8;
}

.submit-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.query-examples {
    font-size: 0.75rem;
    color: #64748b;
}

/* Error Card */
.error-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.error-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #dc2626;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.error-title {
    font-weight: 600;
    color: #7f1d1d;
}

.error-message {
    color: #b91c1c;
    font-size: 0.875rem;
}

/* Results Card */
.results-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.results-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1e293b;
}

.confidence-badge {
    font-size: 0.75rem;
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

.synthesis-plan {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.code-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
}

.code-block pre {
    white-space: pre-wrap;
    font-size: 0.875rem;
    color: #334155;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

.steps-container {
    margin-top: 1.5rem;
}

#stepsList {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-item {
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    padding: 0.75rem 1rem;
    border-radius: 0 0.25rem 0.25rem 0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.step-number {
    font-weight: bold;
    color: #1e40af;
}

.step-badge {
    font-size: 0.75rem;
    background: #bfdbfe;
    color: #1e40af;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.step-text {
    color: #334155;
    font-size: 0.875rem;
}

.results-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #64748b;
}

/* Empty State */
.empty-state {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    text-align: center;
    color: #64748b;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.2;
}

.empty-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    font-size: 0.875rem;
}

/* Info Cards */
.info-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.card-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #2563eb;
}

.card-title {
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-weight: 600;
    color: #334155;
}

/* Metrics */
.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    color: #64748b;
}

.metric-value {
    font-weight: 600;
    color: #1e293b;
}

.progress-bar {
    width: 100%;
    background: #e2e8f0;
    border-radius: 9999px;
    height: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s;
}

.progress-fill.green {
    background: #22c55e;
}

.progress-fill.blue {
    background: #3b82f6;
}

.progress-fill.purple {
    background: #a855f7;
}

.metrics-footer {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Citation Card */
.citation-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.card-title-sm {
    font-weight: bold;
    color: #1e293b;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.citation-text {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}

.citation-source {
    font-style: italic;
}

/* Team */
.team-list {
    font-size: 0.75rem;
    color: #334155;
}

.team-member {
    margin-bottom: 0.5rem;
}

.member-name {
    font-weight: 600;
}

.member-role {
    color: #64748b;
}

.member-focus {
    color: #64748b;
}

.team-section {
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.team-section-title {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.team-members-list {
    padding-left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.team-member-sm {
    margin-bottom: 0.25rem;
}

.member-name-sm {
    font-weight: 500;
}

.member-focus-sm {
    color: #64748b;
}

.team-footer {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.footer-main {
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    font-size: 0.75rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-features {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .query-input-group {
        flex-direction: column;
    }
}