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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.header-nav {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.header-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 6px;
    transition: background 0.3s;
}

.header-nav a:hover {
    background: rgba(255,255,255,0.1);
}

.header-nav a.active {
    background: rgba(255,255,255,0.2);
}

.search-filter {
    padding: 30px 40px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.tag:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.tag.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.papers-grid {
    padding: 40px;
    display: grid;
    gap: 25px;
}

.paper-card {
    display: block;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
    background: white;
    text-decoration: none;
    color: inherit;
}

.paper-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-3px);
}

.paper-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.paper-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.paper-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.paper-link.primary {
    background: #667eea;
    color: white;
}

.paper-link.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

.paper-link.primary:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.4);
    outline-offset: 3px;
}

.paper-link.secondary {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
}

.paper-link.secondary:hover {
    box-shadow: none;
    background: rgba(102, 126, 234, 0.1);
}

.paper-link.secondary:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.4);
    outline-offset: 3px;
}

.paper-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.paper-date {
    color: #718096;
    font-size: 14px;
}

.paper-category {
    display: inline-block;
    padding: 4px 12px;
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid rgba(30, 64, 175, 0.25);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.paper-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2d3748;
}

.paper-authors {
    color: #718096;
    font-size: 14px;
    margin-bottom: 12px;
    font-style: italic;
}

.paper-summary {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 15px;
}

.paper-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
}

.paper-tag {
    padding: 4px 10px;
    background: #f7fafc;
    color: #667eea;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.no-results h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.pagination {
    padding: 30px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
}

.pagination button {
    padding: 10px 18px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.pagination button:hover:not(:disabled) {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination .page-number {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.pagination .page-number:hover {
    border-color: #667eea;
}

.pagination .page-number.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .page-info {
    color: #718096;
    font-size: 14px;
    margin: 0 10px;
}

.about-content {
    padding: 40px;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.about-section p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-section ul {
    color: #4a5568;
    line-height: 1.8;
    margin-left: 25px;
}

.about-section ul li {
    margin-bottom: 10px;
}

.note-header {
    padding: 40px;
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
}

.note-title {
    font-size: 2em;
    color: #2d3748;
    margin-bottom: 15px;
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #718096;
    font-size: 14px;
}

.note-content {
    padding: 40px;
}

.note-section {
    margin-bottom: 40px;
}

.note-section h2 {
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.note-section h3 {
    color: #4a5568;
    margin-top: 25px;
    margin-bottom: 15px;
}

.note-section p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 15px;
}

.note-section ul {
    color: #4a5568;
    line-height: 1.8;
    margin-left: 25px;
    margin-bottom: 15px;
}

.back-link {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 20px;
    transition: background 0.3s;
}

.back-link:hover {
    background: #5568d3;
}

footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    .search-filter {
        padding: 20px;
    }
    .papers-grid {
        padding: 20px;
    }
    .about-content {
        padding: 20px;
    }
    .note-header, .note-content {
        padding: 20px;
    }
}
