/* Result Card Component */
.result-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s;
}

.result-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.result-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.result-card__source {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.result-card__source--arxiv { background: #b31b1b; }
.result-card__source--pubmed { background: #2563eb; }
.result-card__source--crossref { background: #10b981; }
.result-card__source--core { background: #f59e0b; }
.result-card__source--semanticscholar { background: #8b5cf6; }
.result-card__source--doaj { background: #ec4899; }
.result-card__source--europepmc { background: #06b6d4; }
.result-card__source--base { background: #84cc16; }
.result-card__source--hal { background: #6366f1; }
.result-card__source--openaire { background: #14b8a6; }
.result-card__source--scopus { background: #f97316; }
.result-card__source--webofscience { background: #ef4444; }
.result-card__source--ieee { background: #0284c7; }
.result-card__source--springer { background: #facc15; color: var(--text-primary); }
.result-card__source--nature { background: #dc2626; }
.result-card__source--sciencedirect { background: #0ea5e9; }
.result-card__source--lens { background: #059669; }
.result-card__source--unpaywall { background: #10b981; }

.result-card__date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.result-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.result-card__title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.result-card__title a:hover {
    color: var(--primary-color);
}

.result-card__authors {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.result-card__abstract {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-card__metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.result-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-card__meta-icon {
    font-size: 1rem;
}

.result-card__footer {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.result-card__link:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.result-card__link--secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.result-card__link--secondary:hover {
    background: var(--secondary-color);
    color: white;
}

/* Badge Component */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.badge--success {
    background: #d1fae5;
    color: #065f46;
}

.badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.badge--info {
    background: #dbeafe;
    color: #1e40af;
}

.badge--error {
    background: #fee2e2;
    color: #991b1b;
}

/* Alert Component */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert--info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #2563eb;
}

.alert--success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert--warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert--error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert__icon {
    font-size: 1.5rem;
}

/* Empty State Component */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state__icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state__title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state__description {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Stats Component */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card__label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tooltip Component */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip__text {
    visibility: hidden;
    width: 200px;
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
}

.tooltip:hover .tooltip__text {
    visibility: visible;
    opacity: 1;
}

/* Progress Bar Component */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}
