body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.header-container {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#refresh-btn.loading .bi-arrow-clockwise {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.category-tabs-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.category-tabs-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
}

#category-tabs {
    flex-wrap: nowrap;
    border-bottom: none;
}

#category-tabs .nav-link {
    white-space: nowrap;
    color: #65676b;
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.8rem 1rem;
}

#category-tabs .nav-link.active {
    color: #1877f2;
    border-bottom: 3px solid #1877f2;
    background-color: transparent;
}

.article-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 1s ease, opacity 0.5s ease;
}

.article-card.is-new {
    background-color: #fff3cd; /* Light yellow for new articles */
}

.article-card.is-read {
    opacity: 0.6;
}

.article-card.is-read:hover {
    opacity: 1;
}

.article-card .row {
    align-items: center; /* Vertically center content */
}

.article-card .card-img-container {
    height: 100px; /* Reduced height for image container */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.article-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card .card-body {
    padding: 1rem;
}

.article-card .card-title {
    font-size: 0.9rem; /* Reduced font size */
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.article-card .card-meta {
    font-size: 0.8rem;
    color: #65676b;
}

/* Modal Styles */
#articleModal .modal-dialog {
    position: relative;
}

#articleModal .modal-content {
    border: none;
    border-radius: 0;
}

#articleModal .modal-header {
    border-bottom: 1px solid #e9ecef;
}

#articleModalBody {
    transition: opacity 0.3s ease-in-out;
}

#articleModalBody.loading {
    opacity: 0.5;
}

#articleModalBody .modal-article-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

#articleModalBody .modal-article-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#articleModalBody .modal-article-meta {
    font-size: 0.9rem;
    color: #65676b;
    margin-bottom: 1.5rem;
}

#articleModalBody .modal-article-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1060; /* Above modal content */
}

.modal-nav-btn.prev {
    left: 15px;
}

.modal-nav-btn.next {
    right: 15px;
}

.modal-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Settings Modal Styles */
#settingsModalBody .form-check-input:checked {
    background-color: #1877f2;
    border-color: #1877f2;
}

#settingsModalBody .accordion-button:not(.collapsed) {
    color: #000;
    background-color: #f0f2f5;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: #1877f2;
}