body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 1em;
}

a {
    color: #00e;
}

a:visited {
    color: #551a8b;
}

hr {
    border: none;
    border-top: 1px solid #999;
    margin: 1.5em 0;
}

h1 {
    font-size: 1.5em;
    margin-bottom: 0.2em;
}

.subtitle {
    color: #555;
    font-size: 0.95em;
    margin-bottom: 1em;
}

/* Controls */
.controls {
    margin: 1em 0;
}

.search-box {
    margin-bottom: 0.5em;
}

.search-box input {
    width: 100%;
    padding: 4px;
    font-family: inherit;
    font-size: 1em;
    border: 1px solid #999;
}

.filters {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
    align-items: center;
}

.filters select {
    font-family: inherit;
    font-size: 0.95em;
    padding: 2px;
}

.export-btn {
    font-family: inherit;
    font-size: 0.95em;
    cursor: pointer;
    padding: 2px 8px;
}

/* Stats */
.stats {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 1em;
}

/* Papers */
.papers-list {
    margin-top: 1em;
}

.loading, .no-results {
    color: #555;
    padding: 1em 0;
}

/* Paper entry */
.paper-entry {
    margin-bottom: 0.5em;
}

.paper-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 0.2em;
}

.paper-title a {
    text-decoration: none;
}

.paper-title a:hover {
    text-decoration: underline;
}

.paper-meta {
    font-size: 0.85em;
    color: #555;
    margin-bottom: 0.3em;
}

.paper-authors {
    font-size: 0.9em;
    margin-bottom: 0.5em;
}

/* Language toggle */
.lang-toggle {
    font-size: 0.85em;
    margin-bottom: 0.3em;
}

.lang-toggle a {
    cursor: pointer;
    margin-right: 0.5em;
}

.lang-toggle a.active {
    font-weight: bold;
    text-decoration: none;
    color: #000;
}

/* Summary */
.paper-summary {
    margin: 0.5em 0;
    line-height: 1.6;
}

.paper-summary h1,
.paper-summary h2,
.paper-summary h3 {
    margin: 0.8em 0 0.3em 0;
}

.paper-summary h1 { font-size: 1.2em; }
.paper-summary h2 { font-size: 1.1em; }
.paper-summary h3 { font-size: 1em; }

.paper-summary p {
    margin: 0.4em 0;
}

.paper-summary ul, .paper-summary ol {
    margin: 0.4em 0;
    padding-left: 2em;
}

.paper-summary code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.paper-summary pre {
    background: #f4f4f4;
    padding: 0.5em;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.paper-summary blockquote {
    border-left: 2px solid #999;
    padding-left: 1em;
    margin: 0.5em 0;
    color: #555;
}

.paper-keywords {
    font-size: 0.85em;
    color: #555;
    margin: 0.3em 0;
}

.paper-actions {
    font-size: 0.9em;
    margin: 0.3em 0;
}

.paper-actions a {
    margin-right: 1em;
}

.paper-actions button {
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
    background: none;
    border: none;
    color: #00e;
    text-decoration: underline;
    padding: 0;
}

.paper-actions button:hover {
    color: #00a;
}

/* Footer */
footer {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #999;
    font-size: 0.85em;
    color: #555;
}

footer a {
    color: #00e;
}

/* Pagination */
#pagination {
    margin: 1.5em 0;
    text-align: center;
}

.pagination-controls {
    display: inline-flex;
    gap: 0.3em;
    align-items: center;
}

.pagination-controls button {
    font-family: inherit;
    font-size: 0.9em;
    padding: 4px 8px;
    cursor: pointer;
    border: 1px solid #999;
    background: #fff;
    color: #000;
}

.pagination-controls button:hover {
    background: #f0f0f0;
}

.pagination-controls button.active {
    font-weight: bold;
    background: #e0e0e0;
}

.pagination-controls span {
    padding: 0 0.3em;
    color: #555;
}
