.newspaper-heading {
    /* width: 100vw; */
    text-align: center;
    padding: 1.5vh;
    font-weight: 600;
    font-size: 1.5rem;
    
    border-bottom: 0.1px solid #333;
    color: #eee;
    padding-top: 1rem;
    background: #111;
    font-size: 2vh;
}

body.light-mode .newspaper-heading {
    border-bottom: 0.1px solid #aaa;
    color: #000000;
    background: #faf9fd;
}

.heading-subtext {
    font-size: 1rem;
    font-weight: 200;
    color: #eee;
}

body.light-mode .heading-subtext {
    color: #666;
}

.newspaper-container {
    /* width: 100vw; */
    height: fit-content;
    position: relative;
    background: #111;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;

    scroll-behavior: smooth;
    /* scrollbar-width: thin !important;
    scrollbar-color: #6b46c1 #555 !important; */
    border-bottom: 0.1px solid #666;
}

body.light-mode .newspaper-container {
    background: #faf9fd;
    /* scrollbar-color: #6b46c1 #f1f1f1; */
}

/* For WebKit browsers (Chrome, Safari, Edge) */
/* .newspaper-container::-webkit-scrollbar {
    height: 8px;
}

.newspaper-container::-webkit-scrollbar-track {
    background: #555;
    border-radius: 4px;
}

body.light-mode .newspaper-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.newspaper-container::-webkit-scrollbar-thumb {
    background: #6b46c1;
    border-radius: 4px;
}

.newspaper-container::-webkit-scrollbar-thumb:hover {
    background: #553c9a;
} */

.newspaper-page {
    width: 100vw;
    height: 100%;
    flex: 0 0 100vw;
    scroll-snap-align: start;
    background: #111;
    display: flex;
    flex-direction: column;
    position: relative;
    scroll-behavior: smooth;
    scroll-snap-stop: always;
}

body.light-mode .newspaper-page {
    background: #faf9fd;
}

/* Page Indicator */
.newspaper-page-indicator {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: black;
    color: #eee;
    font-size: 1vh;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(107, 70, 193, 0.2);
}

body.light-mode .newspaper-page-indicator {
    background: #434343;
}

/* Header Styles */
.newspaper-header {
    text-align: center;
    padding: 1.5vh;
    background: #111;
    position: relative;
    justify-content: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 0.2rem;
    margin-bottom: 1.5vh;
    padding-top: 0.5rem;
}

body.light-mode .newspaper-header {
    background: #faf9fd;
}

/* Pin stripe separator */
.newspaper-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: #6b46c1;
}

.newspaper-title {
    font-size: 1.8vh;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #eee;
    margin-bottom: 0.3rem;
    
    max-width: 70%;
}

body.light-mode .newspaper-title {
    color: #000000;
}

.newspaper-date {
    font-size: 0.8rem;
    color: #eee;
    font-style: italic;
    font-weight: 400;
    display: none;
}

body.light-mode .newspaper-date {
    color: #666666;
}

.newspaper-date-heading {
    font-size: 1vh;
    color: #eee;
    font-style: italic;
    font-weight: 400;
}

.newspaper-headline-subheading {
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

body.light-mode .newspaper-date-heading {
    color: #666666;
}

/* Content Styles */
.newspaper-content {
    flex: 1;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    gap: 1rem;
}

/* Cover Page Styles */
.newspaper-cover .newspaper-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    grid-template-rows: auto 1fr;
}

.newspaper-main-story {
    grid-column: 1 / 2;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
}

.newspaper-hero-image {
    width: 100%;
    flex: 1;
    margin-bottom: 1vh;
    /* border: 1px solid #666; */
    overflow: hidden;
}

/* body.light-mode .newspaper-hero-image {
    border: 1px solid #e5e5e5;
} */

.newspaper-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 25vh;
    background: purple;
    min-height: 20vh;
}

.newspaper-main-headline {
    font-size: 2vh;
    font-weight: 200;
    line-height: 1.2;
    color: #eee;
    margin-bottom: 1vh;
    border-left: 3px solid #6b46c1;
    padding-left: 1.5vh;
}

body.light-mode .newspaper-main-headline {
    color: #000000;
}

.newspaper-main-subheading {
    font-size: 1.5vh;
    color: #eee;
    line-height: 1.5;
    font-style: italic;
    margin: 0;
    padding: 0;
    
    /* padding-left: 1rem; */
}

body.light-mode .newspaper-main-subheading {
    color: #555555;
}

.newspaper-secondary-story {
    grid-column: 2 / 3;
    padding: 1.2rem;
    background: #444;
    align-self: start;
}

body.light-mode .newspaper-secondary-story {
    background: #f5f4f8;
}

.newspaper-secondary-headline {
    font-size: 1rem;
    font-weight: 600;
    color: #eee;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid #6b46c1;
    padding-bottom: 0.4rem;
}

body.light-mode .newspaper-secondary-headline {
    color: #000000;
}

.newspaper-secondary-text {
    font-size: 0.85rem;
    color: #eee;
    line-height: 1.4;
}

body.light-mode .newspaper-secondary-text {
    color: #555555;
}

/* Headlines Page Styles */
.newspaper-headlines-layout {
    display: flex;
    flex-direction: column;
}

.newspaper-headline-item {
    display: flex;
    gap: 1rem;
    /* padding-bottom: 1rem; */
    background: #111;
    /* border-bottom: 1px solid #666; */
    transition: all 0.2s ease;
    align-items: center;
    /* padding-top: 1rem; */
}

body.light-mode .newspaper-headline-item {
    background: #faf9fd;
    /* border-bottom: 1px solid #e5e5e5; */
}

.newspaper-headline-item:hover {
    background: #444;
    border-color: #6b46c1;
}

body.light-mode .newspaper-headline-item:hover {
    background: #f5f4f8;
    border-color: #6b46c1;
}

.newspaper-headline-image {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #666;
}

body.light-mode .newspaper-headline-image {
    border: 1px solid #e5e5e5;
}

.newspaper-headline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.newspaper-headline-content {
    flex: 1;
}

.newspaper-headline-title {
    font-size: 1.8vh;
    font-weight: 200;
    color: #eee;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    
    /* Clamp to 5 lines */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.light-mode .newspaper-headline-title {
    color: #000000;
}

.newspaper-featured .newspaper-headline-title {
    font-size: 1.8vh;
    font-weight: 200;
}

.newspaper-headline-meta {
    display: flex;
    align-items: center;
    
    gap: 0.6rem;
}

.newspaper-byline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0rem;
    /* border-top: 1px solid #666; */
    /* padding-top: 0.8rem; */
}

/* body.light-mode .newspaper-byline {
    border-top: 1px solid #e5e5e5;
} */

.newspaper-sources {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #eee;
}

body.light-mode .newspaper-sources {
    color: #666666;
}

.newspaper-time {
    font-size: 1vh;
    color: #eee;
    font-style: italic;
}

body.light-mode .newspaper-time {
    color: #888888;
}

.newspaper-favicon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .newspaper-title {
        font-size: 1.8vh;
    }
    
    .newspaper-main-headline {
        font-size: 2vh;
    }
    
    .newspaper-cover .newspaper-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
    }
    
    .newspaper-secondary-story {
        grid-column: 1 / 2;
    }
    
    .newspaper-content {
        padding: 1rem;
        padding-top: 0rem;
    }
}

/* Category Management Page Styles */
.newspaper-category-management-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.newspaper-following-text {
    font-size: 1.5vh;
    color: #eee;
    font-weight: 400;
    margin: 0;
    /* padding-bottom: 0.5rem; */
    
    text-align: center;
}

body.light-mode .newspaper-following-text {
    color: #333333;
    
}

.newspaper-categories-list {
    flex: 1;
    max-height: 20vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-right: 0.5rem;
}

.newspaper-categories-list::-webkit-scrollbar {
    width: 4px;
}

.newspaper-categories-list::-webkit-scrollbar-track {
    background: #555;
    border-radius: 2px;
}

body.light-mode .newspaper-categories-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.newspaper-categories-list::-webkit-scrollbar-thumb {
    background: #6b46c1 !important;
    border-radius: 2px !important;
}

.newspaper-categories-list::-webkit-scrollbar-thumb:hover {
    background: #553c9a;
}

.newspaper-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: #444;
    border: 1px solid #666;
    border-radius: 6px;
    transition: all 0.05s ease;
    position: relative;
    overflow: hidden;
    min-height: 2vh;
}

body.light-mode .newspaper-category-item {
    background: #f8f7ff;
    border: 1px solid #e5e5e5;
}

.newspaper-category-item:hover {
    background: #555;
    border-color: #6b46c1;
}

body.light-mode .newspaper-category-item:hover {
    background: #f5f4f8;
    border-color: #6b46c1;
}

.newspaper-category-name {
    font-size: 1.5vh;
    font-weight: 600;
    color: #eee;
    flex: 1;
}

body.light-mode .newspaper-category-name {
    color: #000000;
}

.newspaper-category-remove {
    font-size: 1.5vh;
    color: #eee;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: lowercase;
}

body.light-mode .newspaper-category-remove {
    color: #666666;
}

.newspaper-category-remove:hover:not(:disabled) {
    background: #fee2e2;
    color: #dc2626;
}

.newspaper-category-remove.default-category {
    color: #999;
    cursor: not-allowed;
    font-style: italic;
}

body.light-mode .newspaper-category-remove.default-category {
    color: #9ca3af;
}

.newspaper-cta-section {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

body.light-mode .newspaper-cta-section {
    border-top: 1px solid #e5e5e5;
}

.newspaper-cta-description {
    font-size: 1.5vh;
    color: #eee;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
    max-width: 80%;
}

body.light-mode .newspaper-cta-description {
    color: #555555;
}

.newspaper-cta-primary {
    background: #6b46c1;
    color: #eee;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.5vh;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(107, 70, 193, 0.2);
    
}

.newspaper-cta-primary:hover {
    background: #553c9a;
    box-shadow: 0 4px 8px rgba(107, 70, 193, 0.3);
    transform: translateY(-1px);
}

.newspaper-cta-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(107, 70, 193, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .newspaper-category-name {
        font-size: 1.5vh;
    }
    
    .newspaper-cta-description {
        font-size: 1.5vh;
        max-width: 95%;
    }
    
    .newspaper-cta-primary {
        padding: 0.7rem 1.5rem;
        font-size: 1.5vh;
    }
}

/* Confirmation UI Styles */
.newspaper-category-item.confirmation-expanded {
    background: #8b5a2b;
    border-color: #f59e0b;
    padding-bottom: 6rem;
    padding-top: 1.5rem;
}

body.light-mode .newspaper-category-item.confirmation-expanded {
    background: #fef3c7;
    border-color: #f59e0b;
}

.newspaper-category-item.category-removing {
    opacity: 0;
    transform: translateX(-100%);
    margin-bottom: 0;
    padding: 0;
    border: none;
    min-height: 0;
}

.newspaper-remove-confirmation {
    position: absolute;
    bottom: 0.8rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    animation: slideInUp 0.3s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.newspaper-confirm-text {
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: 500;
}

body.light-mode .newspaper-confirm-text {
    color: #92400e;
}

.newspaper-confirm-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-start;
}

.newspaper-confirm-yes,
.newspaper-confirm-no {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.newspaper-confirm-yes {
    background: #dc2626;
    color: #eee;
}

.newspaper-confirm-yes:hover {
    background: #b91c1c;
}

.newspaper-confirm-no {
    background: #666;
    color: #eee;
}

body.light-mode .newspaper-confirm-no {
    background: #e5e7eb;
    color: #374151;
}

.newspaper-confirm-no:hover {
    background: #555;
}

body.light-mode .newspaper-confirm-no:hover {
    background: #d1d5db;
}

/* Responsive adjustments for confirmation */
@media (max-width: 768px) {
    .newspaper-confirm-text {
        font-size: 0.8rem;
    }
    
    .newspaper-confirm-yes,
    .newspaper-confirm-no {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Read All Button Styles */
.newspaper-read-all-btn {
    background: #111;
    border: 2px solid white;
    color: #eee;
    padding: 0.8rem 1.5rem;
    font-size: 1.5vh;
    font-weight: 600;
    border-radius: 6px;
    /* cursor: pointer; */
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    align-self: center;
    min-width: 180px;
    margin-bottom: 0.5rem;
}

body.light-mode .newspaper-read-all-btn {
    background: white;
    border: 2px solid #000000;
    color: #000000;
}

.newspaper-read-all-btn:hover {
    background: #444;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

body.light-mode .newspaper-read-all-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.newspaper-read-all-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Make headlines layout a flex column to center the button */
.newspaper-headlines-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .newspaper-read-all-btn {
        padding: 0.7rem 1.2rem;
        font-size: 1.5vh;
        min-width: 160px;
    }
}

/* .newspaper-container::-webkit-scrollbar {
    height: 8px;
    display: block !important; 
} */

/* .newspaper-container::-webkit-scrollbar-track {
    background: #555;
    border-radius: 4px;
}

.newspaper-container::-webkit-scrollbar-thumb {
    background: #6b46c1;
    border-radius: 4px;
    min-width: 20px; 
} */

/* Carousel Indicators */
.newspaper-carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 1rem 0;
    margin-top: 0.5rem;
}

.newspaper-carousel-dot {
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 0; /* Square dots */
    transition: all 0.3s ease;
    opacity: 0.4;
}

.newspaper-carousel-dot.active {
    background: #6b46c1;
    opacity: 1;
    transform: scale(1.2);
}

/* Light mode */
body.light-mode .newspaper-carousel-dot {
    background: #999;
}

body.light-mode .newspaper-carousel-dot.active {
    background: #6b46c1;
}

.newspaper-page.newspaper-headlines .newspaper-headline-title {
    font-size: 1.6vh;
}