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

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    line-height: 1.6;
}

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

/* Header Styles */
.top-bar {
    background-color: #20558a;
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ncbi-logo {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

.divider {
    color: #6a9bc6;
}

.tagline {
    font-size: 12px;
}

.user-actions a {
    color: white;
    text-decoration: none;
    font-size: 13px;
}

.user-actions a:hover {
    text-decoration: underline;
}

.main-header {
    background-color: #f5f5f5;
    border-bottom: 3px solid #20558a;
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pubmed-logo {
    font-size: 32px;
    font-weight: bold;
    color: #20558a;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: #0071bc;
    text-decoration: none;
    font-size: 14px;
}

.main-nav a:hover {
    text-decoration: underline;
}

/* Search Section */
.search-section {
    margin: 40px 0;
    text-align: center;
}

.search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

#searchInput {
    width: 600px;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #20558a;
    border-radius: 4px;
}

#searchBtn {
    padding: 12px 30px;
    background-color: #20558a;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

#searchBtn:hover {
    background-color: #174a76;
}

.search-options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.search-options a {
    color: #0071bc;
    text-decoration: none;
    font-size: 14px;
}

.search-options a:hover {
    text-decoration: underline;
}

/* Info Section */
.info-section {
    background-color: #f9f9f9;
    padding: 30px;
    margin: 30px 0;
    border-left: 4px solid #20558a;
}

.info-section h2 {
    color: #20558a;
    margin-bottom: 10px;
    font-size: 22px;
}

.info-section p {
    color: #555;
    font-size: 15px;
}

/* Results Section - PubMed Style */
.results-section {
    margin: 30px 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d4d4d4;
}

.results-header h2 {
    color: #333;
    font-size: 20px;
    font-weight: normal;
}

.results-count {
    color: #666;
    font-size: 13px;
}

.results-container {
    display: flex;
    gap: 20px;
}

/* Filters Sidebar - PubMed Style */
.results-filters {
    width: 220px;
    flex-shrink: 0;
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    align-self: flex-start;
}

.results-filters h3 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d4d4d4;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section h4 {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.filter-section label {
    display: block;
    font-size: 12px;
    color: #333;
    margin: 6px 0;
    cursor: pointer;
    line-height: 1.4;
}

.filter-section input {
    margin-right: 6px;
    cursor: pointer;
}

/* Results Main Area */
.results-main {
    flex: 1;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Result Items - Compact PubMed Style */
.result-item {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    background-color: white;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: background-color 0.2s;
}

.result-item:hover {
    background-color: #f5f5f5;
}

.result-item h3 {
    color: #0071bc;
    font-size: 15px;
    font-weight: normal;
    margin-bottom: 6px;
    line-height: 1.4;
}

.result-item:hover h3 {
    text-decoration: underline;
}

.result-journal {
    color: #666;
    font-size: 12px;
    margin-bottom: 6px;
}

.result-abstract {
    color: #333;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Quick Links */
.quick-links {
    margin: 40px 0;
}

.quick-links h3 {
    color: #20558a;
    margin-bottom: 20px;
    font-size: 20px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.link-card {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.link-card:hover {
    border-color: #20558a;
    box-shadow: 0 2px 8px rgba(32, 85, 138, 0.1);
}

.link-card strong {
    display: block;
    color: #0071bc;
    font-size: 16px;
    margin-bottom: 5px;
}

.link-card p {
    color: #666;
    font-size: 14px;
}

/* New and Trending Articles Section */
.articles-section {
    margin: 50px 0;
    padding: 30px 0;
    background-color: #fafafa;
    border-top: 2px solid #e0e0e0;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.articles-column {
    background-color: white;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.section-title {
    color: #20558a;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #20558a;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 15px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.article-item:hover {
    background-color: #f5f5f5;
    border-left-color: #20558a;
}

.article-item h4 {
    color: #0071bc;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-item:hover h4 {
    text-decoration: underline;
}

.article-meta {
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.article-snippet {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    justify-content: center;
}

.footer-links a {
    color: #0071bc;
    text-decoration: none;
    font-size: 13px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-text {
    text-align: center;
    color: #666;
    font-size: 12px;
}

/* Article Page Styles - Classic Minimalist Black/White */
.article-navigation {
    margin: 15px 0;
    padding: 0 20px;
}

.back-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
}

.back-link:hover {
    text-decoration: underline;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
    line-height: 1.6;
}

.article-header {
    margin-bottom: 25px;
}

.article-title {
    color: #000000;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 12px;
    font-family: Arial, Helvetica, sans-serif;
}

.article-meta {
    color: #333333;
    font-size: 13px;
    margin-bottom: 8px;
}

.article-journal {
    font-weight: normal;
}

.article-date {
    font-style: normal;
}

.article-meta::after {
    content: "";
    display: block;
    margin-top: 12px;
    border-bottom: 1px solid #cccccc;
}

/* Article Body - Styles the raw DocG HTML */
.article-body {
    margin: 20px 0;
}

.article-body h2 {
    color: #000000;
    font-size: 14px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 8px;
    font-family: Arial, Helvetica, sans-serif;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body h3 {
    color: #000000;
    font-size: 13px;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 6px;
    font-family: Arial, Helvetica, sans-serif;
}

.article-body p {
    color: #000000;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.article-body p strong {
    font-weight: bold;
    background-color: #f5f5f5;
    padding: 2px 0;
    display: inline;
}

.article-body ul, .article-body ol {
    color: #000000;
    font-size: 13px;
    line-height: 1.6;
    margin-left: 30px;
    margin-bottom: 10px;
}

.article-body li {
    margin-bottom: 6px;
}

.article-body ul li {
    list-style-type: disc;
}

.article-body ol li {
    list-style-type: decimal;
}

/* Nested lists */
.article-body ul ul, .article-body ol ul {
    margin-top: 6px;
    margin-bottom: 6px;
}

.article-body ul ul li {
    list-style-type: circle;
}

.article-footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #cccccc;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.external-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 13px;
}

.external-link:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.error {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 20px;
    border-radius: 4px;
    margin: 30px 0;
}

.error a {
    color: #0071bc;
    text-decoration: underline;
}

.loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

.error-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #d8000c;
    background-color: #ffebee;
    border-radius: 4px;
    margin: 10px;
}

.result-item {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s;
}

.result-item:hover {
    border-color: #20558a;
    box-shadow: 0 2px 8px rgba(32, 85, 138, 0.1);
}

/* Subscribe Page Styles */
.subscribe-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 0;
}

.subscribe-header {
    text-align: center;
    margin-bottom: 50px;
}

.subscribe-header h1 {
    color: #20558a;
    font-size: 32px;
    margin-bottom: 15px;
}

.subscribe-header p {
    color: #666;
    font-size: 18px;
}

.signup-section {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 40px;
}

.signup-section h2 {
    color: #20558a;
    font-size: 24px;
    margin-bottom: 15px;
}

.section-description {
    color: #555;
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.residency-section {
    background-color: #f9f9f9;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #20558a;
    box-shadow: 0 0 0 2px rgba(32, 85, 138, 0.1);
}

.form-group small {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.submit-btn {
    padding: 15px 30px;
    background-color: #20558a;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #174a76;
}

.form-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 14px;
}

.form-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.benefits-section {
    margin-top: 60px;
    text-align: center;
}

.benefits-section h2 {
    color: #20558a;
    font-size: 28px;
    margin-bottom: 40px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.benefit-card {
    padding: 25px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

.benefit-card h3 {
    color: #20558a;
    font-size: 18px;
    margin-bottom: 10px;
}

.benefit-card p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* About Page Styles */
.about-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 0;
}

.about-header {
    text-align: center;
    margin-bottom: 50px;
}

.about-header h1 {
    color: #20558a;
    font-size: 32px;
    margin-bottom: 15px;
}

.about-content {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
}

.about-content h2 {
    color: #20558a;
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.about-content h2:first-child {
    margin-top: 0;
}

.about-content p {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-content ul {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    margin-left: 30px;
    margin-bottom: 20px;
}

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

.team-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

/* Unsubscribe Page Styles */
.unsubscribe-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 0;
}

.unsubscribe-content {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

.unsubscribe-content h1 {
    color: #20558a;
    font-size: 28px;
    margin-bottom: 20px;
}

.unsubscribe-content p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .top-bar {
        font-size: 12px;
    }

    .ncbi-logo {
        font-size: 14px;
    }

    .tagline {
        font-size: 11px;
    }

    .user-actions a {
        font-size: 12px;
    }

    .pubmed-logo {
        font-size: 24px;
    }

    .main-nav {
        gap: 15px;
    }

    .main-nav a {
        font-size: 13px;
    }

    #searchInput {
        width: 100%;
        font-size: 14px;
    }

    #searchBtn {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    .search-bar {
        flex-direction: column;
    }

    .info-section {
        padding: 20px;
    }

    .info-section h2 {
        font-size: 20px;
    }

    .info-section p {
        font-size: 14px;
    }

    .links-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .link-card {
        padding: 15px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 18px;
    }

    .article-item h4 {
        font-size: 14px;
    }

    .article-meta {
        font-size: 11px;
    }

    .article-snippet {
        font-size: 12px;
    }

    .result-item {
        padding: 15px;
    }

    .results-container {
        flex-direction: column;
    }

    .results-filters {
        width: 100%;
        margin-bottom: 20px;
    }

    .result-item h3 {
        font-size: 14px;
    }

    .article-title {
        font-size: 18px;
    }

    .article-meta {
        flex-direction: column;
        gap: 5px;
    }

    .clinical-bottom-line {
        padding: 20px;
    }

    .clinical-bottom-line h2 {
        font-size: 18px;
    }

    .clinical-bottom-line p {
        font-size: 15px;
    }

    .article-section h2 {
        font-size: 16px;
    }

    .article-section p {
        font-size: 14px;
    }

    .article-footer {
        flex-direction: column;
    }

    .signup-section {
        padding: 25px;
    }

    .subscribe-header h1 {
        font-size: 26px;
    }

    .subscribe-header p {
        font-size: 16px;
    }

    .signup-section h2 {
        font-size: 20px;
    }

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

    .about-content {
        padding: 25px;
    }

    .about-header h1 {
        font-size: 26px;
    }

    .about-content h2 {
        font-size: 20px;
    }

    .unsubscribe-content {
        padding: 25px;
    }

    .unsubscribe-content h1 {
        font-size: 24px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 15px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .footer-text {
        font-size: 11px;
    }
}
