
/* arXiv Health Monitor - Styles */

:root {
    --primary-color: #14b8a6;
    --secondary-color: #06b6d4;
    --accent-color: #10b981;
    --success-color: #059669;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}


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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

/* Navigation */
nav {
    margin-bottom: 2rem;
}

.search-box {
    margin-bottom: 1rem;
}

#search {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.3s;
}

#search:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filters label {
    font-weight: 600;
    color: var(--text-muted);
}

.filters select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.95rem;
}

/* Papers Grid */
.papers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.paper-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.paper-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.paper-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.paper-title a {
    color: var(--text-color);
    text-decoration: none;
}

.paper-title a:hover {
    color: var(--primary-color);
}

.paper-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.paper-authors {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.paper-summary {
    margin: 1rem 0;
    line-height: 1.6;
    color: var(--text-color);
}

.paper-domains {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.domain-tag {
    background: var(--bg-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.paper-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Paper Detail Page */
.paper-detail {
    max-width: 900px;
}

.breadcrumb {
    padding: 1rem 0;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.paper-detail h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.paper-metadata {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.meta-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.meta-row:last-child {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.paper-section {
    margin-bottom: 2rem;
}

.paper-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.summary-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.key-points {
    list-style: none;
    padding-left: 0;
}

.key-points li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.key-points li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.tag-keyword {
    background: var(--secondary-color);
}

.abstract {
    background: var(--bg-color);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.375rem;
    line-height: 1.8;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Weekly Hero Section */
.weekly-hero {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
}

.weekly-hero h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.hero-stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
}

.hottest-domains {
    text-align: center;
    font-size: 1.05rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

.btn-cta:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

/* Enhanced Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Bookmark Button */
.bookmark-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    z-index: 10;
}

.bookmark-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.bookmark-btn.bookmarked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Paper Card Enhancements */
.paper-card {
    position: relative;
}

.paper-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn,
.export-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.share-btn:hover,
.export-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Trending Section */
.trending-section {
    margin-bottom: 3rem;
}

.trending-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.trending-card {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.trending-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.trending-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.trending-card h3 {
    margin: 0.5rem 0 1rem 0;
    font-size: 1.1rem;
}

.trending-card h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.trending-card h3 a:hover {
    color: var(--primary-color);
}

.trending-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Advanced Filters */
.nav-tools {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 60px;
}

.filter-group input[type="text"] {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    background: var(--card-bg);
    color: var(--text-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Export Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text-color);
}

.export-options {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.export-format {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.export-format:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

#citation-output {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
}

/* Enhanced Footer */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--primary-color);
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.no-results p {
    color: var(--text-muted);
}

/* Citations Display */
.citations {
    color: var(--accent-color);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-number {
        font-size: 2rem;
    }

    .papers-grid {
        grid-template-columns: 1fr;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filters select {
        width: 100%;
    }
}
