/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #4f46e5;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 400;
    text-align: center;
}

/* Auth Section */
.auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-login, .btn-signup {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-login {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-signup {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-avatar i {
    font-size: 1.8rem;
    color: #4f46e5;
}

.user-name {
    color: white;
    font-weight: 500;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    color: white;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.nav-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-tab i {
    font-size: 1.1rem;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Input Section */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.input-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
}

.tab-btn.active {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
}

.analyze-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.analyze-btn:active {
    transform: translateY(0);
}

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.results-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
}

.analysis-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.analysis-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
}

.analysis-time i {
    color: #4f46e5;
}

.btn-save {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

/* Confidence Score Card */
.confidence-card {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.confidence-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.confidence-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0.9;
}

.confidence-meter {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.meter-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #ef4444 0deg 60deg,
        #f97316 60deg 120deg,
        #eab308 120deg 180deg,
        #84cc16 180deg 240deg,
        #22c55e 240deg 360deg
    );
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meter-fill {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.confidence-score {
    font-size: 3rem;
    font-weight: 700;
    z-index: 2;
}

.score-percent {
    font-size: 1.5rem;
    opacity: 0.8;
}

.confidence-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Analysis Details */
.analysis-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-card {
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.detail-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.card-header i {
    color: #4f46e5;
    font-size: 1.2rem;
}

.card-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.card-content {
    padding: 20px;
}

.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-style: italic;
}

.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: #4f46e5;
    border: 2px solid #4f46e5;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-2px);
}

/* History Section */
.history-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.history-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
}

.history-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #64748b;
    font-size: 0.9rem;
}

.search-box input {
    padding: 10px 12px 10px 36px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    width: 250px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-clear {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.history-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 12px;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
}

.filter-btn.active {
    background: #4f46e5;
    color: white;
}

.history-list {
    min-height: 300px;
}

.no-history {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-history i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.no-history h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #374151;
}

.no-history p {
    margin-bottom: 25px;
    font-size: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

.history-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-item:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.history-type {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}

.history-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.history-content {
    margin-bottom: 15px;
}

.history-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 1rem;
}

.history-preview {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.confidence-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.confidence-badge.high {
    background: #dcfce7;
    color: #166534;
}

.confidence-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.confidence-badge.low {
    background: #fee2e2;
    color: #991b1b;
}

.history-actions-btn {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 6px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: #4f46e5;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.modal-close {
    padding: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #374151;
}

.modal-body {
    padding: 30px;
}

.modal-body .input-group {
    margin-bottom: 20px;
}

.modal-body .input-group:last-of-type {
    margin-bottom: 25px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.forgot-password {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-modal-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

.modal-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    margin-top: 20px;
    color: #64748b;
    font-size: 0.9rem;
}

.modal-footer a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.loading-content p {
    color: #64748b;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ========================================
   🆕 NEW: API INTEGRATION STYLES
   ======================================== */

/* Evidence display styles */
.evidence-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.evidence-section h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #4f46e5;
    font-size: 0.95rem;
    font-weight: 600;
}

.evidence-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #4f46e5;
    margin-bottom: 10px;
}

.evidence-source {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.evidence-rating {
    color: #64748b;
    font-size: 0.8rem;
    font-style: italic;
}

.evidence-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.evidence-link:hover {
    color: #3730a3;
    text-decoration: underline;
}

/* API Status indicators */
.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.api-status.success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.api-status.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.api-status i {
    font-size: 1rem;
}

/* Enhanced source stats with better visual hierarchy */
.source-stats, .fact-stats, .issues-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item, .fact-item, .issue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #f1f5f9;
    border-left-color: #4f46e5;
    transform: translateX(2px);
}

.stat-value.reliable, .fact-item.verified i {
    color: #22c55e;
    font-weight: 600;
}

.stat-value.questionable, .fact-item.conflicting i {
    color: #f97316;
    font-weight: 600;
}

.stat-value.total, .fact-item.unverified i {
    color: #4f46e5;
    font-weight: 600;
}

.source-note {
    margin-top: 15px;
    padding: 12px;
    background: #eff6ff;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
}

.issue-item i {
    color: #64748b;
    font-size: 0.8rem;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel.active {
    animation: fadeIn 0.3s ease;
}

.results-section {
    animation: fadeIn 0.5s ease;
}

.history-item {
    animation: fadeIn 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .logo h1 {
        font-size: 2.2rem;
    }

    .nav-tabs {
        flex-direction: column;
    }

    .input-tabs {
        flex-direction: column;
    }

    .tab-btn {
        justify-content: flex-start;
    }

    .results-header,
    .history-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .analysis-actions,
    .history-actions {
        flex-direction: column;
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .confidence-meter {
        width: 150px;
        height: 150px;
    }

    .confidence-score {
        font-size: 2.5rem;
    }

    .analysis-details {
        grid-template-columns: 1fr;
    }

    .action-buttons,
    .history-filters {
        flex-direction: column;
    }

    .modal-content {
        margin: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    /* Responsive design for new API elements */
    .evidence-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        text-align: left;
    }

    .evidence-link {
        align-self: flex-end;
    }

    .api-status {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .input-section,
    .results-section,
    .history-container {
        padding: 20px;
        border-radius: 15px;
    }

    .header {
        padding: 20px;
        border-radius: 15px;
    }

    .logo {
        flex-direction: column;
        gap: 10px;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }

    .confidence-meter {
        width: 120px;
        height: 120px;
    }

    .confidence-score {
        font-size: 2rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #3730a3, #6b21a8);
}