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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    border: none;
}

/* Remove underlines from u tags in document content */
u {
    text-decoration: none;
}

/* Section headings */
h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

nav {
    margin-top: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

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

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Wider container for desktop screens */
@media (min-width: 1400px) {
    main {
        max-width: 1000px;
    }
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    background: #f0f0f0;
    border-radius: 8px;
}

#searchBox {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#categoryFilter {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#clearFilters {
    padding: 0.5rem 1rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#clearFilters:hover {
    background-color: #c0392b;
}

.question-item {
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    background-color: #fafafa;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.question-number {
    font-weight: bold;
    color: #2c3e50;
    margin-right: 1rem;
}

.question-link {
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px dotted #2c3e50;
}

.question-link:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

.question-ref {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px dotted #3498db;
    font-weight: 500;
}

.question-ref:hover {
    color: #2980b9;
    border-bottom-style: solid;
}

/* Highlight effect for when jumping to a specific question */
.question-item.highlight {
    animation: highlightFade 3s ease-out;
}

@keyframes highlightFade {
    0% {
        background-color: rgba(52, 152, 219, 0.2);
        transform: scale(1.01);
    }

    100% {
        background-color: #fafafa;
        transform: scale(1);
    }
}

.question-category {
    color: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Category-specific colors */
.question-category[data-category="manufacturing"] {
    background-color: rgba(52, 152, 219, 0.5);
    /* Blue */
}

.question-category[data-category="dna"] {
    background-color: rgba(231, 76, 60, 0.4);
    /* Red */
}

.question-category[data-category="safety"] {
    background-color: rgba(46, 204, 113, 0.5);
    /* Green */
}

.question-category[data-category="regulatory"] {
    background-color: rgba(155, 89, 182, 0.4);
    /* Purple */
}

.question-category[data-category="genotoxicity"] {
    background-color: rgba(230, 126, 34, 0.4);
    /* Orange */
}

.question-category[data-category="biodistribution"] {
    background-color: rgba(52, 73, 94, 0.4);
    /* Dark blue-gray */
}

.question-category[data-category="frameshift"] {
    background-color: rgba(149, 165, 166, 0.6);
    /* Gray */
}

.question-text {
    margin: 1rem 0;
    line-height: 1.5;
}

.question-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.download-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #229954;
}

footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.disclaimer {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Navigation active state */
nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination-btn,
.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background-color: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled),
.page-btn:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.active {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
    font-weight: bold;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-dots {
    padding: 0 0.5rem;
    color: #666;
}

/* Per page filter */
#perPageFilter {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Category cards on About page */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.category-card {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Download page styles */
.download-card {
    padding: 2rem;
    background-color: #f8f9fa;
    border: 2px solid #27ae60;
    border-radius: 8px;
    margin: 2rem 0;
}

.paper-title {
    font-size: 1.1rem;
    font-style: italic;
    color: #2c3e50;
    margin: 1rem 0;
}

.authors {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.document-info {
    margin: 1.5rem 0;
}

.document-info ul {
    list-style-position: inside;
    margin-top: 0.5rem;
}

.download-btn.primary {
    background-color: #27ae60;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.download-btn.primary:hover {
    background-color: #229954;
}

/* Citation box */
.citation-box {
    background-color: #f0f0f0;
    padding: 1.5rem;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Resources grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.resource-card {
    padding: 1.5rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.resource-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.resource-card a {
    color: #3498db;
    text-decoration: none;
}

.resource-card a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .filters {
        flex-direction: column;
    }

    #searchBox,
    #perPageFilter {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }

    .category-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
}