/* Core styles */
body {
    font-family: 'Raleway', Avenir, 'Century Gothic', sans-serif;
    /* background-color: #221E36; */
    background-color: black;
    color: #e8e0e8;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;

}



html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Carousel Structure */
.carousel-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    max-width: 1100px;
    margin: auto;
    padding-top: 1rem;
}

.cat-carousel-container,
.carousel-container {
    display: flex;
    flex-wrap: nowrap;
    
    height: 100%;
    overflow-x: auto;
    /* scroll-snap-type: x mandatory; */
    /* scroll-behavior: smooth; */
    /* -webkit-overflow-scrolling: touch; */
    max-width: 800px;
    margin: auto;
    /* scroll-padding: 0px; */
    /* overscroll-behavior-x: none; */
    /* touch-action: pan-x; */
    overflow-y: hidden;
    padding: 2%;
    overflow-x: hidden;
}
.cat-carousel-container {
    padding-top: 4%;
}

.cat-carousel-container {
    display: none;
}

.cat-carousel-container.active {
    display: flex;
}

.loader-container,
.trending-topic-card,
.article-card {
    flex: 0 0 100%;
    /* Reduced from 95% to show more of next card */
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 0.5rem;
    border-radius: 4px;
    width: 95%;
    /* padding-bottom: 15rem; */
    padding-top: 6rem;
    z-index: 998;
}

.reload-subtext {
    font-size: 0.8rem;
    color: #888;
    margin-top: 1rem;
    display: none;
}

.reload-subtext.active {
    display: block;
    color: #c77e7e;
    font-size: 1.2rem;
    font-weight: 200;
}


.article-card.interspersed-card {
    border: 0.1px solid #333;
}

body.light-mode .article-card.interspersed-card {
    border-color: #888;
}

.loader-container {
    position: relative;
}

.trending-topic-card .article-card {
    padding-top: 1rem;
}

.trending-topic-card .article-card .container {
    padding-bottom: 0rem;
    min-height: 1rem;
}
.trending-topic-card .article-card .watch-badge,
.trending-topic-card .article-card .read-badge {
    top: 1rem;
}

/* Ensure last card doesn't get cut off */
/* .trending-topic-card:last-child,
.article-card:last-child {
    margin-right: 5%;
} */


/* Mobile optimization */
@media (max-width: 768px) {

    /* .cat-carousel-container,
    .carousel-container {
        padding: 0 5%;
    } */

    /* .trending-topic-card,
    .article-card {
        flex: 0 0 95%;

    } */

    /* .article-card:last-child {
        margin-right: 8%;
    } */
}

/* Mobile-specific adjustments to disable excessive momentum */
@media (hover: none) and (pointer: coarse) {

    .cat-carousel-container,
    .carousel-container {
        scroll-behavior: auto;
        /* Disables smooth scrolling to prevent flick skipping */
    }
}




/* Navigation Arrows */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #e8e0e8;
    background: rgba(17, 15, 18, 0.8);
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    cursor: pointer;
    z-index: 999;
    transition: background 0.3s ease;
    display: none;
}

.arrow:hover {
    background: rgba(17, 15, 18, 0.95);
}

.arrow.left {
    left: 0.5rem;
}

.arrow.right {
    right: 0.5rem;
}

@media (max-width: 900px) {
    .arrow {
        display: none !important;
    }
}

/* Content Structure */
.container {
    margin: 0 auto;
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0 1rem;
    box-sizing: border-box;

    min-height: 110vh;
    padding-bottom: 5rem;
}

/* Title and Metadata */
.title-container {
    align-items: center;
    margin-bottom: 0.5rem;
}

.article-title,
.timeline-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    margin-right: auto;


}

.article-meta,
.timeline-card-meta {
    color: #888;
    font-size: 0.6rem;
    margin: 1rem 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.article-meta span,
.timeline-card-meta span {
    display: flex;
    align-items: center;
}

.article-meta {
    margin-bottom: 0rem;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.cat-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    object-fit: contain;
}

.celebration-cat-icon {
    width: 70px;
    height: 70px;
    margin-right: 0.5rem;
    object-fit: contain;
}

/* Media Content */
.media-scroll {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 15px;
    margin: -16px -16px 16px -16px;
    scrollbar-width: none;
    padding-top: 1rem;
}

.media-scroll::-webkit-scrollbar {
    display: none;
}

.tag {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    gap: 0.5rem;
    align-items: center;
    /* border: 0.1px solid; */
    /* position: absolute; */
    top: 1rem;
    left: 1rem;
    padding: 0.5rem;
    /* background: rgb(255, 255, 255, 0.9); */
    right: 1rem;
    /* display: none; */
    padding-right: 2rem;
    padding-left: 0rem;

    flex-direction: row;
    display: flex;
}

.tag-text {
    font-size: 0.6rem;
    color: #fff;
    background: #b71c1ca1;
    padding: 0.5rem;
    /* font-weight: 200; */
    z-index: 999;
    /* padding-left: 0rem; */
    border: 0.1px solid #c77e7e;
    color: #f6aeae;
    border-radius: 15px;
    position: relative;
}


.media-item {
    flex: 0 0 auto;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #b71c1c;
}

.media-item.single {
    width: 100%;
    height: auto;
    max-height: 200px;
}

.media-item.single img {
    width: 100%;
    height: auto;
    max-height: 175px;
    object-fit: cover;
}

.media-item img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    background: #fff;
    opacity: 0.9;
    margin-bottom: -3px;
    /* Fix for gap at the bottom - not able to solve it*/

}

.open-source {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 998;
}

/* Source Information */
.source-name {
    font-size: 0.8rem;
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: #e8e0e8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 5px;
    padding-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-name img.favicon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    object-fit: contain;
    margin-bottom: 0px;
}

/* Content Toggle and Summary */
.content-toggle {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin-top: 1rem;
    display: none;
}

.toggle-btn {
    background: none;
    border: none;
    color: #888;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    font-size: 0.8rem;
}

.toggle-btn.active {
    color: #fff;
}




.toggle-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #c77e7e;
}

/* Article Summary */
.article-summary {
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: 0.2px;
    margin-bottom: 1rem;
}


.article-summary ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-summary li {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
    position: relative;
    font-size: 1rem;
}

.detailed-summary li,
.bullet-points li {
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 8px 12px;
    margin: 0 -12px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.detailed-summary li:hover,
.bullet-points li:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Entity Links */
.entity-link {
    border-bottom: 1px dotted #c77e7e;
    color: #ffd5d5;
    cursor: pointer;
    text-decoration: none;
    position: relative;
}


/* Detailed Summary */
.bullet-points,
.detailed-summary {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    display: none;
}

.bullet-points.active,
.detailed-summary.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}


.bullet-points li b,
.bullet-points li strong,
.detailed-summary b,
.detailed-summary strong {
    color: #ffd5d5;
    font-weight: normal;
}

.detailed-summary .entity-link {
    color: #ffd5d5;
    font-weight: normal;
    border-bottom: 1px dotted #c77e7e;
}

/* Bottom Navigation */


/* .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 0.5rem;
    gap: 4px;
    padding: 4px 16px;
    transition: color 0.2s ease;
    position: relative;
}

.nav-item svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 1;
    transition: transform 0.3s ease;
}

.nav-item.rotated svg {
    transform: rotate(-90deg);
}



.nav-item.active {
    color: #c77e7e;
} */
/* body.premium .nav-item.active {
    color: #B8860B;
} */


/* ──────────────────────────
   3a. Base nav styles
   (your existing rules, only svg-specific bits removed)
   ────────────────────────── */
   .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 4px;
    padding: 1vh;
    color: #888;
    font-size: 1.2vh;
    transition: color .2s ease;
    position: relative;
    height: 4vh;
    margin-bottom: 0px;
    padding-bottom: 0.5vh;
    width: 33.33%;
  }
  
  /* Little helper span that shows the png */
  .nav-item .icon{
    width:2.5vh; height:2.5vh;
    background-size:contain;
    background-repeat:no-repeat;
    transition:background-image .2s ease;
    margin-left: 0.4vh;
  }
  
  /* ──────────────────────────
     3b. Accent colours for the label
     ────────────────────────── */
  :root            { --nav-accent: #A045EC; }   /* light */
  /* [data-theme="dark"]{ --nav-accent: #A045EC; } dark  */
  
  .nav-item.active{ color:var(--nav-accent); }
  
  /* ──────────────────────────
     3c. LIGHT THEME  (default)
     ────────────────────────── */
  [data-icon="newspaper"] .icon  { background-image:url("/static/images/Newspaper – OnLight – Deselected.png"); }
  [data-icon="heart"]     .icon  { background-image:url("/static/images/Heart – OnLight – Deselected.png"); }
  [data-icon="broadcast"] .icon  { background-image:url("/static/images/Broadcast – OnLight – Deselected.png"); }
  
  .nav-item.active[data-icon="newspaper"] .icon  { background-image:url("/static/images/Newspaper – OnLight – Selected.png"); }
  .nav-item.active[data-icon="heart"]     .icon  { background-image:url("/static/images/Heart – OnLight – Selected.png"); }
  .nav-item.active[data-icon="broadcast"] .icon  { background-image:url("/static/images/Broadcast – OnLight – Selected.png"); }
  
  /* ──────────────────────────
     3d. DARK THEME overrides
     ────────────────────────── */
  [data-theme="dark"] [data-icon="newspaper"] .icon  { background-image:url("/static/images/Newspaper – OnLight – Deselected.png"); }
  [data-theme="dark"] [data-icon="heart"]     .icon  { background-image:url("/static/images/Heart – OnLight – Deselected.png"); }
  [data-theme="dark"] [data-icon="broadcast"] .icon  { background-image:url("/static/images/Broadcast – OnLight – Deselected.png"); }
  
  [data-theme="dark"] .nav-item.active[data-icon="newspaper"] .icon  { background-image:url("/static/images/Newspaper – OnLight – Selected.png"); }
  [data-theme="dark"] .nav-item.active[data-icon="heart"]     .icon  { background-image:url("/static/images/Heart – OnLight – Selected.png"); }
  [data-theme="dark"] .nav-item.active[data-icon="broadcast"] .icon  { background-image:url("/static/images/Broadcast – OnLight – Selected.png"); }
  


/* Fix for scroll container visibility */
#scrollContainer {
    visibility: hidden;
}


/* Bottom Sheet Styles */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: #e8e0e8;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    z-index: 3001;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;

}

.bottom-sheet-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

.close-sheet {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
}

/* Entity Section Styles */


.entity-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 1rem;
    padding-top: 1rem;
    border-bottom: 1px solid #333;
}

.entity-content h4 {
    font-size: 1.2rem;
    margin: 0;
    /* color: #fff; */
    /* font-style: italic; */
    font-weight: 400;
}

.entity-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.entity-content img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

.entity-content p {
    font-size: 0.7rem;
    line-height: 1.5;

    margin: 0;
}

.entity-content a {
    color: #c77e7e;
}

.follow-btn {
    align-self: flex-start;
    background: transparent;
    color: #c77e7e;
    border: 1px solid #c77e7e;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: none;
}

.follow-btn:hover {
    background: rgba(199, 126, 126, 0.1);
}

.citation-item {
    padding: 16px 0;
    border-bottom: 1px solid #333;
}

.citation-item:last-child {
    border-bottom: none;
}

.citation-media {
    display: flex;
    gap: 12px;
    align-items: center;
}

.citation-media img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.media-url {
    opacity: 0.7;
    font-style: italic;
    font-size: 0.6rem;

    font-style: italic;
    padding: 0.5rem;

    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    display: block;
}





/* Citations Section Styles */
.citation-item {
    padding: 16px 0;
    border-bottom: 1px solid #333;
}

.citation-item:last-child {
    border-bottom: none;
}

.citation-text {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 12px 0;

}

.citation-source {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #888;
    padding-top: 1rem;
}

.citation-source img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #e8e0e8;
    color: black;
}

.view-article {
    margin-left: auto;
    color: #c77e7e;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #c77e7e;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.view-article:hover {
    background: rgba(199, 126, 126, 0.1);
}




/*Wiki styles*/
.wiki-preview {
    position: fixed;
    background: #f9f9f9;
    color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 16px;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s ease;

}

.wiki-preview.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wiki-preview img {
    max-width: 150px;

    height: auto;
    object-fit: cover;
    background-color: #e8e0e8;
    border: 3px solid #e8e0e8;
    margin-top: 1rem;
}

#wikiTitle {
    margin-bottom: 1rem;
    margin-top: 0rem;
    position: relative;
    font-size: 1.4rem;
    text-decoration: underline;
}

#wikiExcerpt {
    font-size: 0.9rem;
}

.wiki-preview .close-button {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    /* margin: -8px; */
    position: absolute;
    top: 0;
    right: 5px;
}



/* Timeline Article Specific Styles */


/* Hero Collage */
.timeline-hero-collage {
    margin: -1rem -1rem 1.5rem -1rem;
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 15px;
}

.collage-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    height: 100%;
    background: #1d0101;
}

.collage-item {
    width: 100%;
    height: 100px;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.collage-item.main {
    grid-row: span 1;
}

.collage-item:hover {
    opacity: 1;
}

/* Timeline Main Title */
.timeline-main-title {
    padding: 1rem 0;
}

.timeline-main-title h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    margin-right: auto;

}

/* Timeline Container */
.timeline-container {
    position: relative;
    padding: 1rem 0;
}

/* Timeline Sections */
.timeline-section {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 2rem;
    text-align: center;
    padding-top: 0.2rem;
}

.time-tag {
    font-size: 0.5rem;
    color: #888;
    white-space: nowrap;
}

.latest-tag {
    background: #c77e7e;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    text-align: center;
}

/* Section Content */
.timeline-content {
    position: relative;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 0.1px solid #333;

}

.timeline-content h3 {
    font-size: 1.1rem;
    margin: 0 0 0rem 0;
    font-weight: 400;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.timeline-content p {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 0.8rem;
}

/* Source Scroll */
.source-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0 0 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

.source-item img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #e8e0e8;
    color: black;
}

/* Timeline Connector */
.timeline-section::before {
    content: '';
    position: absolute;
    left: 0.4rem;
    top: 2rem;
    bottom: -2rem;
    width: 2px;
    background: #333;
}

.timeline-section:last-child::before {
    display: none;
}

/* Section Toggle and Content */
.timeline-content .content-toggle {
    margin-bottom: 1rem;
}

.bullet-points,
.timeline-content .bullet-points {
    display: none;
}

.bullet-points.active,
.timeline-content .bullet-points.active {
    display: block;
}

.timeline-content .detailed-summary {
    display: none;
}

.timeline-content .detailed-summary.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card.timeline-article .container {

    padding-right: 1rem;
    padding-top: 1rem;
}





/* Light Mode styles*/
body.light-mode .splash-title,
body.light-mode .number,
body.light-mode .region-btn.active,
body.light-mode .action-btn {
    color: #333;
}

body.light-mode .progress-splash,
body.light-mode .tabs-and-filters,
body.light-mode .reading-progress-bar,
body.light-mode .cat-reading-progress-bar,
body.light-mode .locale-dropdown,
body.light-mode .article-actions,
body.light-mode .cat-article-actions,
body.light-mode .categories-feed-header,
body.light-mode .section-header,
body.light-mode,
body.light-mode .search-timeline-card {
    background-color: white;
    color: #333;
}

body.light-mode .tabs-and-filters {
    background-color: white;
    border-bottom: transparent;
}


body.light-mode .bottom-nav {
    border-top: 0.1px solid #666;

}

body.light-mode .stat-card,
body.light-mode .region-toggle,
body.light-mode .region-btn.active,
body.light-mode .spider-chart-placeholder {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .cat-floating-button-container,
body.light-mode .floating-button-container {
    background: #f9f9f9ff;
}

body.light-mode .bottom-nav,
body.light-mode .wiki-preview,
body.light-mode .bottom-sheet {
    color: #1a1a1a;
    background: white;
}

body.light-mode .categories-feed,
body.light-mode .categories-feed-header,
body.light-mode .categories-panel,
body.light-mode .categories-header,
body.light-mode .layer-header {
    background: white;
    color: #1a1a1a;
}

body.light-mode .categories-back-button,
body.light-mode .back-button,
body.light-mode .section-title,
body.light-mode .toggle-btn.active,
body.light-mode .category-question,
body.light-mode .categories-section-title,
body.light-mode .section-title {
    color: #333;
}

body.light-mode .timeline-content h3 {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .source-scroll {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .category-card {
    border: 1px solid #fff;
}

body.light-mode .category-card::after {

    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.95) 100%);
}






body.light-mode .entity-link,
body.light-mode .detailed-summary .entity-link {
    color: #a72d2d;
    border-bottom: 1px dotted #a72d2d;
}

body.light-mode .bullet-points li b,
body.light-mode .bullet-points li strong,
body.light-mode .detailed-summary b,
body.light-mode .detailed-summary strong {
    color: #a72d2d;
}

body.light-mode .tag-text {
    border: 0.1px solid #a72d2d;
    color: white;
}

body.light-mode .timeline-content {
    border: 0.1px solid #CCC
}

body.light-mode .timeline-section::before {
    background: #DDD;
}

/* Light Mode styles End */




/* Citation Count Badge */
.citation-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(199, 126, 126, 0.1);
    color: #c77e7e;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    border: 1px solid rgba(199, 126, 126, 0.2);
}

/* Enhanced Citation Text */
.citation-text {
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    padding-left: 24px;
}

.citation-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 2em;
    line-height: 1;
    color: #c77e7e;
    opacity: 0.6;
}

.citation-text.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.read-more {
    color: #c77e7e;
    cursor: pointer;
    display: inline-block;
    margin-left: 4px;
}

/* Bottom Sheet Enhancements */
.freemium-overlay,
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 3000;
}

.freemium-overlay {
    z-index: 1003;
    background: transparent;
    overflow-y: auto;
    top: 6vh;
}


.freemium-overlay.active,
.bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Scrollbar Styles */
.bottom-sheet {
    scrollbar-width: thin;
    scrollbar-color: #444 #1a1a1a;
}

.bottom-sheet::-webkit-scrollbar {
    width: 6px;
}

.bottom-sheet::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.bottom-sheet::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 3px;
}



@media (max-width: 768px) {
    .bottom-sheet {
        padding: 16px;
    }

    .entity-content img {
        max-width: 100px;
        height: 100px;
        object-fit: cover;
    }

    .citation-source {
        flex-wrap: wrap;
    }

}


/* For Webkit browsers (Chrome, Safari, etc.) */
* {

    /* Width of the scrollbar */
    ::-webkit-scrollbar {
        width: 4px;
        /* vertical scrollbar width */
        height: 4px;
        /* horizontal scrollbar height */
    }

    /* Track (background) of the scrollbar */
    ::-webkit-scrollbar-track {
        background: transparent;
    }

    /* Handle (thumb) of the scrollbar */
    ::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

    /* Handle on hover */
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.01) transparent;
}

/* For Edge/IE */
* {
    -ms-overflow-style: -ms-autohiding-scrollbar;
}


/*categories page  tbd*/

.categories-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.categories-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.categories-feed {
    position: fixed;
    inset: 0;
    /* background: #221E36; */
    background-color: black;
    color: #e8e0e8;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    overflow-y: auto;
}


.categories-panel {
    position: fixed;
    inset: 0;
    background: #110f12;
    color: #e8e0e8;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow-y: auto;
    padding-bottom: 5rem;
}

.categories-feed.active,
.categories-panel.active {
    transform: translateX(0);
}

.layer-header,
.categories-header {
    position: sticky;
    top: 0;
    background: #110f12;
    padding: 1rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
}

.layer-header h2,
.categories-header h2 {
    font-size: 1.8rem;
    font-weight: 200;
    margin: 0;
    width: 70%;
}

.categories-close {
    background: none;
    border: none;
    color: #888;
    padding: 8px;
    cursor: pointer;
}

.categories-close svg {
    width: 24px;
    height: 24px;
}

.categories-grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding-bottom: 5rem;
}







.categories-grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding-bottom: 5rem;
}

.category-card {
    position: relative;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 3rem;
}

.category-card.user-saved {
    border-color: rgb(160, 69, 236);
    min-height: 0px;
    padding-top: 1rem;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    opacity: 0.9;
    transition: all 0.3s ease;
    z-index: 1;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            rgba(17, 15, 18, 0.6) 0%,
            rgba(17, 15, 18, 0.8) 50%,
            rgba(17, 15, 18, 0.95) 100%);
    z-index: 2;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: #c77e7e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-card:hover::before {
    opacity: 0.9;
    transform: scale(1.05);
}

.category-name {
    font-size: 1.3rem;
    /* font-weight: 600; */
    margin-bottom: 0.5rem;
    /* color: #e44242; */
    position: relative;
    /* z-index: 3; */
    /* font-size: 0.8rem; */
    color: #fff;
    background: #6d0dbd;
    padding: 0.5rem;
    font-weight: 200;
    z-index: 999;
}

.category-question {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 3;
    margin-top: 0rem;
}

.category-answer {
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 3;
    padding: 0.5rem;
    background: rgb(0, 0, 0, 0.3);
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-top: 0rem;
    padding-left: 1rem;
    font-style: italic;
    padding-right: 2rem;
    padding-bottom: 2rem;
}

.categories-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.categories-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.topics-horizontal-scroll {
    width: 100%;
    /* margin: 1rem 0; */
    position: relative;
    width: 95%;
    margin: auto;
}


.sort-filter {
    display: inline-block;
    /* margin-top: 1rem; */
    position: relative;
    /* width: 50%; */
    z-index: 100;
    /* margin-right: 0.5rem; */
    width: 10rem;
}

@media screen and (max-width: 768px) {
    .sort-filter {
        position: static;
        z-index: auto;
    }
}



.sort-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: transparent;
    border: transparent;
    /* border-radius: 15px; */
    color: #e8e0e8;
    cursor: pointer;
    padding: 0.5rem;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    font-size: 0.8rem;
    /* border-bottom: 0.1px solid #656565;*/
}


.sort-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M0 2l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 8px;
}

@media screen and (max-width: 768px) {

    .sort-select,
    .sort-select option {
        transform: none;
        left: auto;
        top: auto;
    }
}

@media screen and (max-width: 768px) {
    .sort-select {
        position: relative;
        width: 100%;
        z-index: 1;
        appearance: none;
    }
}


/* Reading Progress Bar */
/* Progress Bar Entrance Animation */
.cat-reading-progress-bar,
.reading-progress-bar {
    position: fixed;
    top: 5vh;
    left: 0;
    right: 0;
    height: 4vh;
    z-index: 999;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: #110f12;
    transform: translateY(-100%);
    /* Start above viewport */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-reading-progress-bar.visible,
.reading-progress-bar.visible {
    transform: translateY(0);
    /* Slide down to natural position */
}

.cat-progress-container,
.progress-container {
    width: 50%;
    height: 2rem;
    display: flex;
    align-items: center;
}

.cat-progress-bar,
.progress-bar {
    height: 100%;
    display: flex;
    align-items: center;
    width: 100%;

    transition: all 0.3s ease;
}

.cat-progress-completed,
.progress-completed {
    height: 100%;
    background: #b71c1ca1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 200;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cat-progress-next,
.progress-next {
    height: 100%;
    background: #5c031fa1;
    color: #00000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 200;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cat-progress-message,
.progress-message {
    margin-left: 1rem;
    font-size: 1.2vh;
    line-height: 1.1;
    padding-right: 1rem;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
}

.cat-progress-message .highlight,
.progress-message .highlight {

    font-weight: 600;
}

/* Splash Screen */

.progress-splash {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(17, 15, 18, 0.98);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-splash.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Ensure the container takes up the full width of its parent */
.splash-loader-container {
    display: flex;
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
    position: fixed;
    /* Make the container fixed to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Full viewport height */
    z-index: 9999;
    /* Ensure it is on top of other elements */
    padding: 20px;
    /* Add padding on all sides */
    box-sizing: border-box;
    transition: opacity 1s ease, visibility 1s ease;
    opacity: 0;
    visibility: hidden;
    /* Apply transition only to disappearing state */
    transition: none;
}


  
.splash-loader-container.active {
    opacity: 1;
    visibility: visible;
    /* Instant appearance - no transition */
    transition: none;
}

.splash-loader-container:not(.active) {
    transition: opacity 1s ease, visibility 1s ease;
}


.article-view-container {
    position: fixed;
    /* Make the container fixed to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transition: opacity 1s ease, visibility 1s ease;
    opacity: 0;
    visibility: hidden;
}

.article-view-container.active {
    opacity: 1;
    visibility: visible;
    /* Instant appearance - no transition */
    transition: none;
}
  
  /* Only apply transition when removing the active class */
.article-view-container:not(.active) {
    transition: opacity 1s ease, visibility 1s ease;
}

/* Make the loader image responsive */
.loader-image {
    max-width: 100%;
    height: auto;
}

.splash-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    width: calc(100% - 2rem);
    overflow-y: auto;
    padding: 2rem 1rem 8rem 1rem;
    /* Added bottom padding for button */
}

.progress-splash.active .splash-content {
    opacity: 1;
    transform: translateY(0);
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
    padding: 0.5rem;
}

.progress-splash.active .close-button {
    opacity: 1;
    transform: rotate(0);
}

.splash-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 2rem;
}

.splash-title {
    font-size: 2rem;
    margin: 0;
    color: #fff;
    font-weight: 200;
}

.splash-subtitle {
    color: #888;
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

.leaderboard-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.tab-button {
    background: none;
    border: none;
    color: #888;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
}

.tab-button.active {
    color: #fff;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: #b71c1c;
}

.leaderboard-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.stat-card h3 {

    font-weight: 400;
    font-size: 1rem;
    color: #888;
    margin-bottom: 1rem;
}

.placeholder-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.personal-best,
.week-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
}

.number {
    font-size: 3rem;
    font-weight: 200;
    color: #fff;
}

.label {
    color: #888;
    margin-top: 0.5rem;
    text-align: center;
}

.interests-section {
    margin-bottom: 6rem;
}

.interests-section h3 {
    margin: 0 0 1rem 0;
    font-weight: 400;
    font-size: 1rem;
    color: #888;
}

.spider-chart-placeholder {

    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.floating-button-container-freemium,
.floating-button-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(17, 15, 18, 0.98) 0%, rgba(17, 15, 18, 0.98) 80%, rgba(17, 15, 18, 0) 100%);
    z-index: 2002;
}

.floating-button-container-freemium {
    background: none;
}

.cat-floating-button-container {
    padding: 1rem;
    z-index: 2002;
}

.cat-floating-button-container {
    display: none;
}

.cat-floating-button-container.active {
    display: block;
}

/* Floating Button */
.floating-button-freemium,
.dismiss-overlay,
.cat-floating-button,
.floating-button {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: #460046;
    color: #fbe1ff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    border: 1px solid;
    font-weight: 600;
}

body.light-mode .floating-button-freemium,
body.light-mode .dismiss-overlay,
body.light-mode .cat-floating-button,
body.light-mode .floating-button {
    background: #6d0dbd;
    color: #fbe1ff;
}

.cat-floating-load-more {
    display: block;

    max-width: 400px;
    margin: 0 auto;
    border: 1px solid #c77e7e;
    color: #c77e7e;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    background: transparent;
}

.cat-floating-load-more-container {
    position: absolute;
    top: 70%;
    left: 0;
    right: 0;
    padding: 1rem;
    z-index: 2002;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cat-floating-button:hover,
.floating-button:hover {
    transform: scale(1.02);
}


@media (max-width: 768px) {
    .splash-content {
        padding: 1rem 1rem 6rem 1rem;
    }

    .cat-floating-button,
    .floating-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .cat-floating-button-container,
    .floating-button-container {
        padding: 0.75rem;
    }
}


/*spider chart*/
.wrapper {
    width: 100%;
    max-width: 1200px;
}

.coming-soon {
    position: absolute;
    inset: 0;
    background: #333c;
    color: #fff;
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2000;
    /* padding-top: 7rem; */
    font-size: 1.5rem;
    text-align: center;
    opacity: 0.6;
}

.coming-soon p {
    text-align: center;
    width: 100%;
    font-weight: 500;
}

.chart-container {

    border-radius: 8px;
    position: relative;

}

.chart-header {
    margin-bottom: 0rem;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e8e0e8;
    display: none;
}

.legend-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.this-week {
    background-color: #c77e7e;
}

.legend-dot.lifetime {
    background-color: #48bb78;
}

.legend-label {
    font-size: 0.875rem;
    color: #888;
}

.tooltip {
    position: fixed;
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    z-index: 3000;
    display: none;
    border: 1px solid #333;
}

.tooltip-text {
    color: #e8e0e8;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.tooltip-stats,
.tooltip-stats2 {
    color: #888;
    font-size: 0.6rem;
}

#canvas-container {
    position: relative;
    height: calc(100% - 80px);
}


.metric-card {
    flex: 0 0 80%;
    background-color: #110f12;
    padding: 20px;
    color: #888;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#articles-today {
    padding-left: 0rem;
}

.metrics-container.visible {
    opacity: 1;
    visibility: visible;
    display: block;
}

.activity-chart-container {
    height: 150px;
    margin-bottom: 3rem;
    position: relative;
}

.activity-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100%;
    padding-top: 25px;
}

.activity-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    flex: 1;
}

.metric-card p {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 15px;
    text-align: center;
}

.metric-card h2 {
    margin: 0 0 1rem 0;
    font-weight: 400;
    font-size: 1rem;
    color: #888;
}

.activity-bar {
    width: 80%;
    background-color: #b71c1c;
    transition: height 0.5s ease-out;
    position: relative;
}

.activity-date {
    font-size: 0.7rem;
    margin-top: 5px;
    color: #787878;
}

.streak-bar-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;

}

.streak-bar {
    width: 100%;
    height: 10px;
    background-color: #3c3f41;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.streak-progress {
    width: 0;
    height: 100%;
    background-color: #5c031f;
    transition: width 1.5s ease-out;
}

#streak-text {
    font-size: 0.9rem;
    color: #888;
}

.activity-bar::before {
    content: attr(data-count);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
}

.metrics-container {
    width: 100%;
    overflow-x: auto;
    /* padding: 20px 0; */
    background-color: #110f12;
    opacity: 0;
    visibility: hidden;
    display: none;

    padding-top: 1rem;
}

.metrics-container.visible {
    opacity: 1;
    visibility: visible;
    display: block;

}

.metrics-scroll {
    display: flex;
}

#legends {
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    width: 80%;
    
    /* margin: auto; */
    font-size: 0.6rem;
    gap: 3rem;
    padding-left: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blue-dot {
    background-color: #00375b;
}

.light-blue-dot {
    background-color: #003492;
}

.green-dot {
    background-color: #2ecc71;
}

.red-dot {
    background-color: #e74c3c;
}

.grey-dot {
    background-color: #b7c4cd;
}

.purple-dot {
    background-color: #8552c2;
}

.dot {
    width: 10px;
    height: 10px;
    /* border-radius: 50%; */
}

.legend-text {
    font-size: 0.6rem;
    min-width: 2rem;
}



.bar {
    width: 30px;
    background-color: transparent;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
}

@media (max-width: 768px) {
    .bar {
        width: 15px;
    }
}





.graph-container {
    display: flex;
    justify-content: space-around;
    height: 150px;
    padding: 0 10px;
    align-items: flex-end;
    margin-top: 3rem;
    margin-bottom: 3rem;
}


.bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    margin: 0 5px;
    height: 100%;
    position: relative;
}




.bar::before {
    content: attr(data-name);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(-45deg);
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .bar::before {
        font-size: 10px;
    }
}

.stacked-bar {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
}

.bar::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    white-space: nowrap;
    color: #fff;
}

.read-bar {
    background-color: #00375b;
}

.bar.current-user-bar .read-bar {
    background-color: rgba(52, 152, 219, 0.9);
}

.dislike-bar {
    background-color: #e74c3c;
}

.video-bar {
    background-color: #b7c4cd;
}

.fm-bar {
    background-color: #8552c2;
}

.skimmed-bar {
    background-color: #003492;
}

.relevant-bar {
    background-color: #2ecc71;
}


/* Read Badge Styles */
.watch-badge,
.read-badge {
    position: absolute;
    top: 6rem;
    right: 0.5rem;
    background: #b71c1ca1;
    color: white;
    padding: 0.2rem;
    /* border-radius: 4px; */
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding-right: 0.6rem;
    padding-left: 0.3rem;
    border-top-right-radius: 15px;
    font-weight: 200;
}
.watch-badge {
    background: #1c7eb7a1;
    top: 5rem;
}

.skimmed-badge{
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 997;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* top: 5rem; */
    
    
}

.article-card.timeline-article .watch-badge,
.article-card.timeline-article .read-badge {
    right: 0.5rem;
}
.skimmed-badge.visible,
.watch-badge.visible,
.read-badge.visible {
    opacity: 1;
    transform: translateY(0);
}
.watch-badge svg,
.read-badge svg {
    width: 16px;
    height: 16px;
}

.article-card.read {
    position: relative;
}

/* Milestone Celebration Styles */
@keyframes messageRipple {
    0% {
        background: transparent;
    }

    20% {
        background: #5c031f;
    }

    100% {
        background: transparent;
    }
}

.cat-reading-progress-bar.celebrate .reading-progress-bar.celebrate {
    animation: messageRipple 1.5s ease-in-out;
}


/* Top tabs */
.tabs-and-filters {
    position: fixed;
    top: 7vh;
    left: 0;
    right: 0;
    background: #000;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
    height: 4.5vh;
    display: flex;
    border-bottom: 0.1px solid #888888;
}

.top-tabs-container {
    height: 4.5vh;
    flex: 1;
    /* Take up remaining space */
    overflow: hidden;
    padding-top: 0.1vh;
    /* Hide overflow */
}

.tabs-and-filters.visible {
    transform: translateY(0);
}

.tabs-scroll-container {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    padding: 0 1rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.tabs-scroll-container::-webkit-scrollbar {
    display: none;
}

.tab-item {
    padding: 1vh;
    white-space: nowrap;
    color: #888;
    font-size: 1.6vh;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
    flex-shrink: 0;
    /* padding-bottom: 0.5rem; */
    padding-left: 2vh;
    padding-right: 2vh;
}

.tab-item.active {
    background: #460046;
    color: #ff02ff;
    border-radius: 25px;
    font-weight: 800;
}



/* Hide progress bar when tabs are visible */
.cat-reading-progress-bar,
.reading-progress-bar {
    top: 5vh;
    /* Height of section header */

    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-reading-progress-bar.with-header,
.reading-progress-bar.with-header {
    transform: translateY(0);
}


/* Ensure tabs are hidden when not on first card */
/* .article-card:not(:first-child) .top-tabs-container {
    transform: translateY(-100%);
} */
.article-card:not(:first-child) .tabs-and-filters {
    transform: translateY(-100%);
}

.categories-feed-header,
.section-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5vh;
    background: black;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
}

.categories-feed-header,
.section-header.visible {
    transform: translateY(0);
}

.categories-back-button,
.back-button {
    background: none;
    border: none;
    color: #fff;
    padding: 8px;

    cursor: pointer;
    margin-right: 8px;
    padding-top: 12px;
    position: fixed;
}

.back-button-other-windows {
    background: none;
    border: none;
    color: #fff;
    padding: 8px;

    cursor: pointer;
    margin-right: 8px;
    padding-top: 12px;
    position: fixed;
    padding: 1.5rem;
    z-index: 9000;
}

.back-button-other-windows svg,
.categories-back-button svg,
.back-button svg {
    width: 24px;
    height: 24px;
}

.categories-beta-tag,
.beta-tag {
    width: 2rem;
    text-align: center;
    padding: 0.2rem;
    background: #c77e7e;
    display: none;
    position: fixed;
    right: 1rem;
    top: 0.9rem;
    font-size: 0.6rem;
    color: white;
}

.categories-beta-tag.active,
.beta-tag.active {
    display: block;
}


.categories-back-button svg,
.back-button svg {
    width: 24px;
    height: 24px;
}

.categories-section-title,
.section-title {
    font-size: 1rem;
    color: #fff;
    font-weight: 200;
    text-align: center;
    flex-grow: 1;
    padding-left: 3rem;
    padding-right: 3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* display: -webkit-box; */
    /* -webkit-box-orient: vertical; */
    /* -webkit-line-clamp: 1; */
    max-width: 100%;
    box-sizing: border-box;
}

.nav-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    z-index: 1002;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform 0.3s ease;
    
}

.refresh-pill {

    position: fixed;
    top: 17vh;
    left: 50%;
    color: white;
    z-index: 999;
    display: none;
    flex-direction: column;
    transform: translateY(-300%);
    transition: transform 0.3s ease;
    align-items: center;
}

.reload-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.refresh-pill.active {
    display: flex;
    transform: translateY(0);
    align-items: center;
    transform: translateX(-50%);
}

.refresh-button {
    background: #d55252;
    /* width: 10rem; */
    text-align: center;
    border-radius: 1rem;
    padding: 0.3rem 1rem;
    font-size: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-wrapper.hidden {
    transform: translateY(50%);
}

.bottom-nav {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    border-top: none;
    display: flex;
    justify-content: space-around;
    background: #000;
    border-top: 0.1px solid #666;
    color: #888888;

}

@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(5px, env(safe-area-inset-bottom));
    }
}

.article-feedback-actions {

    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    padding-bottom: 12px;
    gap: 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease;


}

.cat-article-actions,
.article-actions {


    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #110f12;
    padding-bottom: 8px;
    transform: translateY(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease;

    display: none;
    padding-left: 1rem;
}


.cat-article-actions.active,
.article-actions.active {
    opacity: 1;
    transform: translateY(0);
    display: flex;
}


.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #e8e0e8;
    padding: 4px 16px;
    cursor: pointer;
    transition: color 0.2s ease;
    font-size: 0.6rem;
}

.action-btn.like,
.action-btn.dislike {
    border: 0.1px solid #888;
    border-radius: 10px;
    margin-right: 1rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;

}

.action-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 1;
    margin-right: 5px;
}

.action-btn.like svg,
.action-btn.dislike svg {
    width: 12px;
    height: 12px;
}

.action-btn-text,
.action-count {
    font-size: 0.7rem;
    font-weight: 100;
    color: #888;
}

.action-btn.liked,
body.light-mode .action-btn.liked {
    color: #c77e7e;
    border-color: #c77e7e;
}

.action-btn.liked .action-btn-text,
body.light-mode .action-btn.liked .action-btn-text,
.action-btn.liked .action-count,
body.light-mode .action-btn.liked .action-count,
.action-btn.disliked .action-btn-text,
body.light-mode .action-btn.disliked .action-btn-text,
.action-btn.disliked .action-count,
body.light-mode .action-btn.disliked .action-count {
    color: #c77e7e;
}

.action-btn.disliked,
body.light-mode .action-btn.disliked {
    color: #c77e7e;
    border-color: #c77e7e;
}

body.light-mode .action-btn.saved,
.action-btn.saved {
    color: #4682B4;
}

/* New CSS while maintaining your dark theme */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

}


.region-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);

    border-radius: 8px;
}

.region-btn {

    border: none;
    background: transparent;
    color: #888;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.region-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.podium-layout {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem 1rem;

}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}

.avatar-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
}

.first-place .avatar {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(45deg, #FFD700, #FFA500);
}

.second-place .avatar {
    background: linear-gradient(45deg, #C0C0C0, #A9A9A9);
}

.third-place .avatar {
    background: linear-gradient(45deg, #CD7F32, #8B4513);
}

.rank-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: #fff;
    color: #000;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.username {
    font-weight: 400;
    color: #fff;
    font-size: 0.8rem;
    width: 6rem;
}

.score {
    font-size: 0.8rem;
    color: #888;
}

.rank-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
    margin-bottom: 1rem;
}

.divider-text {
    background: #110f12;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.rank-divider:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.rankings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    transition: background 0.2s;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.rank-item.current-user {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-number {
    width: 1.5rem;
    text-align: center;
    font-weight: bold;
    color: #666;
}

.user-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-details .username {
    font-size: 0.8rem;
}


/*layers */
.layer-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0px;
    z-index: 4000;
    pointer-events: none;
}

/* account layer */
.layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #110f12;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

.layer.active {
    transform: translateX(0);
}



.layer-tabs {
    display: flex;
    gap: 20px;
}

.layer-tab {
    background: none;
    border: none;
    color: #888;
    padding: 10px 0;
    cursor: pointer;
    position: relative;
}

.layer-tab.active {
    color: #c77e7e;
}

.layer-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #c77e7e;
}

.layer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.layer {
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
}

.layer-content {
    -webkit-overflow-scrolling: touch;
    /* For iOS momentum scroll */
    overscroll-behavior-y: contain;
    /* Prevent scroll chain to body */
}

.account-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-option {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #333;
    color: inherit;
    text-decoration: none;
}

.option-icon {
    margin-right: 15px;
    font-size: 20px;
}

.option-text {
    flex: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider.round {
    border-radius: 34px;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round:before {
    border-radius: 50%;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

.toast {
    position: fixed;
    bottom: 4rem;
    left: 1rem;
    background-color: #c77e7e;
    color: white;
    padding: 16px;
    border-radius: 4px;
    max-width: 300px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 40000;
    display: none;
    font-size: 0.6rem;
}

.toast.show {
    opacity: 1;
    display: block;
}



/* for trending news */


.trending-topic-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    padding-left: 0.5rem;
}

.trending-rank {
    font-size: 1.5rem;
    /* color: #666; */
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 200;
    padding-left: 0.5rem;
}

.country-flag {
    font-size: 16px;
}

.topic-articles {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 5rem;
}

.topic-articles .article-card {
    margin: 0;
    /* Override default article-card margin */
}

.disclaimer-podcast {
    font-weight: 200;
    font-size: 3rem;
    padding-top: 3rem;

}

.search-question-input {
    width: 80%;
    min-height: 40px;
    background: #333;
    border: none;
    border-radius: 4px;
    padding: 1rem;
    color: #fff;
    font-size: 0.8rem;
    resize: vertical;
    font-style: italic;
}

.submit-answer {
    background: #c77e7e;
    color: #fff;
}

.submit-answer,
.skip-question {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.skip-question {
    background: transparent;
    border: 1px solid #444;
    color: #888;
}

.search-controls {
    padding: 1rem;
}

.button-container {
    display: flex;
    gap: 1rem;

    margin-top: 1rem;

}

.feedback-cat,
.search-empty-cat {
    width: 100px;
    height: 100px;
}

.search-timeline-card {
    background: #0e0e0e;
    /* border-top: 0.1px solid #333; */
    /* margin-bottom: 1rem; */
    transition: all 0.3s ease;
    cursor: pointer;
    border-bottom: 0.1px solid #333;
}

.search-timeline-card-meta {
    font-size: 0.6rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.curious-summary,
.search-timeline-card.curious-summary,
body.light-mode .curious-summary,
body.light-mode .search-timeline-card.curious-summary,
body.light-mode .search-timeline-card.curious-summary b,
body.light-mode .search-timeline-card.curious-summary.search-timeline-card-meta {
    background-color: #7b0000;
    color: white;
}

.sourceiconsearch {
    width: 0.6rem;
    height: 0.6rem;
    margin-right: 0.5rem;
    fill: #c77e7e;
    background-color: white;
}


.locale-dropdown {
    color: #e8e0e8;
    background-color: #110f12;
    font-size: 1.2vh;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8e0e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
    padding-right: 1.5rem;
    padding-left: 1rem;
    border: none;
    display: none;
}

.locale-dropdown:focus {
    outline: none;
}


/* categories css */
.categories-section-content {
    margin-top: 60px;
    padding: 1rem;
    display: none;
}

.categories-section-content.active {
    display: block;
}

.qa-content {
    padding: 0.5rem;
}

.question-text,
.approx-match-message {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.counter {
    color: #ff02ff;
}

body.light-mode .counter {
    color: #6d0dbd;
}

.answer-container {
    padding-left: 1rem;
    font-size: 1rem;
    border-left: 0.1px solid;
}

.question-input-for-filters {
    width: 80%;
    min-height: 120px;
    background: #333;
    border: none;
    border-radius: 4px;
    padding: 1rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    resize: vertical;
    font-style: italic;
}

.answer-footer {
    font-size: 0.7rem;
}

.edit-answer-btn,
.reload-feed {
    background: #c77e7e;
    color: #fff;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #460046;
    color: #ff02ff;
    border-radius: 25px;
    border: 1px solid;
    font-weight: 400;
}

.subtext,
.learning-subtext {
    font-size: 0.6rem;
    margin-bottom: 1.5rem;
}


.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 30000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.feedback-overlay-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: #0e0e0e;
    padding: 2rem;
}

.feedback-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-feedback-card {
    display: none;
    /* Hidden by default */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.article-feedback-card.active {
    display: block;
    /* Only active card is shown */
}

.article-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

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

.article-content {
    padding: 20px;
}

.article-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    line-height: 1.4;
}

.article-content p {
    margin: 0 0 20px 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}



.feedback-button {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    flex: 1;
}

.feedback-button.positive {
    border-color: #4CAF50;
    color: #4CAF50;
}

.feedback-button.negative {
    border-color: #FF5722;
    color: #FF5722;
}

.feedback-button.selected {
    color: white;
}

.feedback-button.selected.positive {
    background: #4CAF50;
}

.feedback-button.selected.negative {
    background: #FF5722;
}



/* Light mode adjustments */
.light-mode .feedback-overlay-content {
    background: #f9f9f9;
}

.light-mode .article-content p {
    color: rgba(0, 0, 0, 0.8);
}

.feedback-overlay-content {
    position: relative;
    padding-bottom: 5rem;
    /* Space for dismiss button */
}

.article-feedback-card {
    display: none;
    transition: opacity 0.3s ease;
}

.article-feedback-card.completed {
    opacity: 0.6;
    /* visually greyed out */
    pointer-events: none;
    /* no clicks */
    transform: translateY(-10px);
    display: block;
}

.article-feedback-card.active {
    display: block;
}






.pink-loader {
    border: 6px solid #f3f3f3;
    /* Light grey */
    border-top: 6px solid #c77e7e;
    /* Pink color for the spinner */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.feedback-header {
    margin-bottom: 3rem;
}


.article-feedback-card.final-message-card {
    /* Similar styling as other cards or something distinctive */
    background: #222;
    border: 1px solid #c77e7e;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    opacity: 1;
    pointer-events: auto;
    transition: none;
    display: block;
    margin-bottom: 2rem;
}

.article-content h3 {
    margin-bottom: 0.5rem;
    /* etc. */
}

body.light-mode .article-feedback-card.final-message-card {
    background: white;

}

/* Loader Css */
/* .loader-container {
    width: 300px;
    height: 300px;
    position: relative;
    padding-top: 50%;
    padding-left: 8%;
  } */

.hexagon-loader {
    width: 100%;
    height: 60%;
    max-height: 50vh;
}

.hexagon-loader-end {
    width: 150px;
    height: 150px;
}

.hexagon-path {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: draw 4s linear infinite;
}

@keyframes draw {
    0% {
        stroke-dashoffset: 3000;
    }

    80% {
        stroke-dashoffset: 0;
        stroke-width: 3;
    }

    90% {
        stroke-dashoffset: 0;
        stroke-width: 5;
    }

    100% {
        stroke-dashoffset: 0;
        stroke-width: 3;
    }
}

/* Create gradient for the stroke */
.gradient-stroke {
    stroke: url(#line-gradient);
}

/*For desktop */
@media (min-width: 768px) {

    .cat-progress-container,
    .progress-container {
        width: 85%;
    }

    .cat-progress-message,
    .progress-message {
        width: 15%;
    }
}

body.light-mode::-webkit-scrollbar,
body.light-mode *::-webkit-scrollbar {
    width: 1px;
    /* vertical scrollbar width */
    height: 4px;
    /* horizontal scrollbar height */
}

body.light-mode::-webkit-scrollbar-track,
body.light-mode *::-webkit-scrollbar-track {
    background: transparent;
}

body.light-mode::-webkit-scrollbar-thumb,
body.light-mode *::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 1px;
}

body.light-mode::-webkit-scrollbar-thumb:hover,
body.light-mode *::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Firefox scrollbar */
body.light-mode,
body.light-mode * {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.01) transparent;
}


/*For article-view */
.content-section {
    max-width: 800px;
    margin: 0 auto;

    padding-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow-y: auto;
}

.content-section.show {
    max-width: 800px;
    margin: 0 auto;

    padding-top: 0rem;
    opacity: 1;
    transform: translateY(0);

    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    overflow-y: auto;
    z-index: 1000;
}

.header {
    background-color: #000;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1001;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    justify-content: space-between;
}

.light-mode .header {
    background-color: #fff;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loader-container-article-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #110f12;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.light-mode .loader-container-article-view {
    background-color: #f0f0f0;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid #e8e0e8;
    border-top: 3px solid #c77e7e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.light-mode .loader {
    border: 3px solid #ccc;
    border-top: 3px solid #3498db;
}


.topic-title {
    font-size: 1.5rem;
    color: #e8e0e8;
    padding: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    font-family: 'proxima-nova', 'Segoe UI', 'Helvetica Neue', sans-serif;
    letter-spacing: 0px;
    font-weight: 200;
}

.light-mode .topic-title,
.light-mode .view-updates {
    color: #333;
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    height: 4rem;
}

.bottom-bar a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.light-mode .bottom-bar {
    background-color: #fff;
    border-top: 1px solid #ddd;
}

.light-mode .bottom-bar a {
    color: #333;
}

.back-home {
    padding-right: 10px;
    cursor: pointer;
}

.chevron {
    font-size: 24px;
    line-height: 1;
}

.home-text {
    padding-left: 1rem;
}

.next-article {
    display: flex;
    align-items: center;
    max-width: 60%;
    cursor: pointer;
    display: none;
}

.bottom-bar a.next-article {
    display: none;
}

.next-article-image {
    display: none;
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
    cursor: pointer;
}

.next-article-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3rem;
    padding-right: 1rem;
    font-size: 0.7rem;
    cursor: pointer;
}

.next-article-image.hidden {
    display: none;
}

.twitter-post-button {
    background-color: #102938;
    color: white;
    padding: 15px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
    position: absolute;
    top: 15px;
    right: 2px;
    z-index: 10000;
}

.twitter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.twitter-content {
    background-color: #333333;
    padding: 20px;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    width: 500px;
}

.twitter-content textarea {
    width: 90%;
    height: 100px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.twitter-content button {
    background-color: #1DA1F2;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.twitter-content input[type="text"] {
    width: 90%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.twitter-content button {
    background-color: #1DA1F2;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 10px;
}

.twitter-content button:last-child {
    margin-right: 0;
}

.share-button {
    position: fixed;
    top: 1.5rem;
    right: 1rem;
    background-color: black;
    color: #e8e0e8;
    border: none;
    border-radius: 20px;
    width: 20%;
    height: 2rem;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1002;
    border: 1px solid rgba(52, 152, 219, 0.9);
    display: none;
}

.light-mode .share-button {
    background-color: #fff;
    color: #333;
    border: 1px solid #3498db;
}

.content-section.show .article-card.timeline-article,
.content-section.show .article-card {
    margin-right: 0%;
}

@media (max-width: 768px) {

    .header {
        padding: 10px;
    }

    .content-section {

        padding-top: 2rem;
    }

    .cat-icon {
        width: 25px;
        height: 25px;

    }

    .bottom-bar {
        padding: 1rem;
        padding-top: 0rem;
        padding-bottom: 0rem;
        padding-right: 0rem;
    }

    .bottom-bar a {
        font-size: 1rem;
        padding: 0.5rem;
    }

    .chevron {
        font-size: 2rem;
        padding-bottom: 0.25rem;
    }

    .next-article-image {
        width: 30px;
        height: 30px;
    }

}

@media screen and (min-width: 1024px) {

    .header,
    .hero-section,
    .bottom-bar {
        max-width: 800px;

    }

    .share-button {
        top: auto;
        bottom: 5rem;

    }
}

.edit-button {
    position: absolute;
    bottom: 2.5rem;
    right: 1.5rem;
    padding: 0.5rem;
    z-index: 4;
    width: 1rem;
    height: 1rem;
    background-color: black;
    color: white;
    border-radius: 50%;
    border: 0.1px solid;
}

.breaking-dot {
    position: absolute;
    top: 0.8rem;
    left: 1rem;
    font-size: 0.3rem;
    background-color: #13c013;
    border-radius: 50%;
}
.live-dot {
    position: absolute;
    top: 0.5vh;
    right: 25%;
    /* width: 0.5rem; */
    /* height: 0.5rem; */
    background-color: #c01313;
    padding: 0.2rem;
    color: white;
    /* padding-bottom: 0rem; */
    /* padding-top: 0rem; */
    font-size: 0.4rem;
    
}

.read-before {
    font-size: 0.6rem;
    margin-bottom: 1rem;
    background: #c77e7e;
    padding: 0.5rem;
    color: white;
}



/* Container within the overlay */
:root {
    --primary: #6c5ce7;
    --primary-light: #8c7ae6;
    --primary-dark: #5649c0;
    --accent: #ff7675;
    --text: #2d3436;
    --text-light: #636e72;
    --background: #ffffff;
    --card-bg: #f8f9fa;
    --border-radius: 12px;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}


/* Content container - simulates content behind the overlay */
.content-backdrop {
    position: fixed;
    top: 6vh;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://via.placeholder.com/1200x800');
    background-size: cover;
    background-position: center;
    filter: blur(2px);
}

/* Gradient overlay for backdrop */


.paywall-container {
    position: relative;
    background-color: transparent;
    width: 100%;
    padding-top: 10vh;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 1) 100%);
    backdrop-filter: blur(1px);
}

.paywall-header {
    text-align: center;
    padding: 0 20px 20px;
    color: white;
}

.paywall-header h2 {
    font-size: 2rem;
    font-weight: 200;
    margin-bottom: 10px;
}

.paywall-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.timer-container {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 8px;
    padding: 15px;
    margin: 0 20px 20px;
    text-align: center;
    color: white;
}

.timer-label {
    font-size: 1rem;
    margin-bottom: 10px;
}

.countdown {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-value {
    background-color: #6d0dbd;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 45px;
    text-align: center;
}

.time-label {
    font-size: 0.75rem;
    margin-top: 4px;
    opacity: 0.8;
}

.timer-sublabel {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.subscription-content {
    background-color: #e8e8e8;
    border-radius: 12px 12px 0 0;
    padding: 25px 20px;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
    color: #110f12;
    padding-bottom: 6rem;
}

.offer-badge {
    display: inline-block;
    border: 0.1px solid #a72d2d;
    /* color: white; */
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    /* font-weight: 600; */
    margin-bottom: 20px;
    text-align: center;
}

.subscription-options {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.subscription-card {
    flex: 1;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    border: 2px solid transparent;
    transition: transform 0.2s ease;
}

.subscription-card:hover {
    transform: translateY(-2px);
}

.subscription-card.selected {
    border: 1px solid #6d0dbd;
}

.recommended-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #6d0dbd;
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.plan-name {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 5px 0;
    color: #6d0dbd;
}

.plan-price {
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.3rem;
    font-weight: 600;
}

.plan-price strike {
    font-size: 0.9rem;
    color: #888;
    font-weight: 200;
    margin-right: 0.5rem;
}

.current-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.original-price {
    display: block;
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.discount-tag {
    text-align: center;
    padding: 3px 0;
    font-size: 0.8rem;
    color: #bb2626;
    font-weight: 600;
}

.benefits-header {
    margin: 20px 0 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.benefits-list {
    margin-bottom: 20px;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.benefit-item::before {
    content: "✓";
    color: #6d0dbd;
    margin-right: 10px;
    font-weight: bold;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
    text-align: center;
}

.disclaimer a {
    text-decoration: none;
    font-weight: bold;
}

@media (max-width: 768px) {
    .paywall-header h2 {
        font-size: 2rem;
    }

    /* .subscription-options {
        flex-direction: column;
    } */
}

.email-p {
    font-weight: 200;

    margin-bottom: 1rem;
}

.article-card.other-places {
    text-align: center;
    padding-bottom: 8rem;
    padding-right: 1rem;
    padding-left: 1rem;
}

.other-places-header {
    font-size: 1.6rem;
    font-weight: 200;
}

.other-places-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem
}

.other-grid-item {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

.other-grid-item p {

    font-size: 0.8rem;
    font-weight: 200;
    padding-top: 0.5rem;
}

.other-grid-item-button {
    border: 1px solid #c77e7e;
    color: #c77e7e;
    padding: 1rem;
    text-align: center;
    border-radius: 15px;
    font-size: 0.8rem;
}

.cat-article-actions {
    z-index: 1003;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.bottom-bar a.notification-settings {
    display: none;
    flex-direction: row;
    justify-content: right;
    background-color: #b71c1ca1;
    color: white;
    height: 4rem;
}

.notification-settings svg {
    width: 50px;
    height: 50px;
}

.notif-twoliner {
    display: flex;
    flex-direction: column;
    justify-content: left;
}

.notif-twoliner p {
    margin: 0;
    padding: 0;
    font-weight: 200;
    font-size: 0.5rem;
}

.notif-twoliner .notif-main-text {
    font-size: 0.8rem;
    font-weight: 400;
    padding-top: 0.2rem;
    padding-right: 0.5rem;
}

.number-for-click {
    font-size: 0.5rem;
    background-color: rgb(111, 8, 8);
    position: absolute;
    top: -0.5rem;
    right: 0px;
    border-radius: 50%;
    padding: 0.2rem;
    border-width: 0.1px;
    border-style: solid;
    border-color: rgb(199, 126, 126);
    border-image: initial;
}

.view-updates {
    background: none;
    border: none;
    color: #e8e0e8;
    padding: 8px;
    cursor: pointer;
    margin-right: 8px;
    gap: 0.5rem;
    
    align-items: center;
    max-width: 50%;
    flex-direction: row;
    position: relative;
    border: 0.1px solid;
    border-radius: 5px;
    display: none;
    padding-left: 0.7rem;
}

.view-updates svg {
    width: 24px;
    height: 24px;
}

.update-dot {
    position: absolute;
    top: 1.1rem;
    right: 1.8rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #13c013;
    border-radius: 50%;
    display:none;
}


/* Curious FM CSS Styles */

/* Main container */
#curious-fm-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    max-width: 600px;
    margin: 0 auto;
    background-color: #121212;
    color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    height: 100vh;
    
    display: flex;
    flex-direction: column;
}

/* Loader - Hexagon */
#persistent-player {
    height: 100%;
}

/* Landing screen */
.curious-fm-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    height: 100%;
    text-align: center;
    background: linear-gradient(180deg, #1a1a1a, #121212)
}

.curious-fm-landing-logo {
    width: 180px;
    height: 180px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.curious-fm-landing-logo img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.curious-fm-landing-content {
    margin-bottom: 60px;
}

.curious-fm-landing-title {
    font-size: 3rem;
    font-weight: 200;
    
}

.curious-fm-landing-tagline {
    font-size: 18px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    max-width: 480px;
    margin: 0 auto;
}

/* Waveform visualization */






/* Spacer for pushing content to bottom */
/* .curious-fm-spacer {
    
    min-height: 40px;
} */

.curious-fm-topics {
    text-align: left;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.curious-fm-topics h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #ffffff;
}

.curious-fm-topics ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.curious-fm-topics li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.curious-fm-topics li:before {
    content: "â€¢";
    position: absolute;
    left: 0;
    color: #6d0dbd;
    font-size: 20px;
}

.curious-fm-play-btn {
    background: linear-gradient(135deg, #6d0dbd, #A045EC);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 16px 32px;
    font-size: 18px;
    
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(133, 0, 0, 0.3);
}

.curious-fm-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(133, 0, 0, 0.4);
}

.curious-fm-play-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(133, 0, 0, 0.3);
}

/* Main player */
.curious-fm-player {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.curious-fm-main {
    
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
}

.curious-fm-player .curious-fm-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #2a2a2a;
}

.curious-fm-player .curious-fm-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.curious-fm-player .curious-fm-info {
    margin-bottom: 24px;
}

.curious-fm-player .curious-fm-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.curious-fm-player .curious-fm-source {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* .curious-fm-progress {
    margin-bottom: 24px;
} */

.curious-fm-progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.curious-fm-progress-current {
    height: 100%;
    background: linear-gradient(90deg, #6d0dbd, #A045EC);
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    transition: width 0.3s linear;
}

.curious-fm-time {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.curious-fm-actions {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.curious-fm-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.curious-fm-action-btn:hover {
    color: #ffffff;
}

.curious-fm-action-btn.curious-fm-relevant {
    color: #cc0000;
}

.curious-fm-action-btn svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.curious-fm-action-btn span {
    margin-top: 4px;
}

.curious-fm-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin-top: auto; */
    margin-bottom: 16px;
    padding-top: 2rem;
    
}

.curious-fm-control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 12px;
    transition: transform 0.2s ease;
}

.curious-fm-control-btn:hover {
    transform: scale(1.1);
}

.curious-fm-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.curious-fm-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d0dbd, #A045EC);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    box-shadow: 0 4px 12px rgba(133, 0, 0, 0.3);
}

.curious-fm-play svg {
    width: 28px;
    height: 28px;
}

.curious-fm-tabs {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.curious-fm-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    position: relative;
}

.curious-fm-tab.active {
    color: white;
}

.curious-fm-tab.active:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #6d0dbd, #A045EC);
    border-radius: 3px 3px 0 0;
}

/* Bottom sheet */
.curious-fm-bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90vh;
    max-height: 700px;
    background-color: #1e1e1e;
    border-radius: 20px 20px 0 0;
    z-index: 10;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.curious-fm-bottom-sheet-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.curious-fm-bottom-sheet-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.curious-fm-playing-now {
    display: flex;
    align-items: center;
    margin-top: 16px;
    padding: 0 8px;
    cursor: pointer;
}

.curious-fm-mini-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.curious-fm-mini-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.curious-fm-mini-info {
    flex: 1;
    overflow: hidden;
}

.curious-fm-mini-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.curious-fm-mini-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.curious-fm-mini-play {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
}

.curious-fm-bottom-sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.curious-fm-up-next h3,
.curious-fm-read-article h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.curious-fm-playlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.curious-fm-playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.curious-fm-playlist-item:last-child {
    border-bottom: none;
}

.curious-fm-playlist-item.playing {
    background-color: rgba(133, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 8px;
}

.curious-fm-playlist-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
}

.curious-fm-playlist-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.curious-fm-playing-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.curious-fm-playing-indicator:before {
    content: "";
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.curious-fm-playlist-info {
    flex: 1;
    overflow: hidden;
}

.curious-fm-playlist-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.curious-fm-playlist-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.curious-fm-playlist-play {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
}

.curious-fm-read-article {
    padding-bottom: 40px;
}

.curious-fm-article-source {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.curious-fm-article-content {
    line-height: 1.6;
    margin-bottom: 24px;
}

.curious-fm-article-content p {
    margin-bottom: 16px;
}

.curious-fm-article-updates {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
}

.curious-fm-article-updates h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #cc0000;
}

.curious-fm-article-updates ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.curious-fm-article-updates li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.5;
}

.curious-fm-article-updates li:last-child {
    border-bottom: none;
}

.curious-fm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .curious-fm-player .curious-fm-title {
        font-size: 18px;
    }
    
    .curious-fm-actions {
        margin-bottom: 2rem;
    }
    
    .curious-fm-action-btn {
        font-size: 10px;
    }
    
    .curious-fm-action-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .curious-fm-controls {
        margin-bottom: 8px;
    }
    
    .curious-fm-play {
        width: 56px;
        height: 56px;
    }
    
    .curious-fm-tab {
        padding: 12px;
        font-size: 14px;
    }
}


/* Add these CSS styles to your existing styles_newhome.css file */

/* Audio waveform animation enhancements */
.curious-fm-waveform-bar {
    transition: height 0.1s ease-in-out;
}

/* Active audio state indicator */
.curious-fm-play.is-playing {
    color: #9370DB;
}

/* Audio loading indicator */
.curious-fm-audio-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.curious-fm-audio-loading span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #9370DB;
    border-radius: 50%;
    display: inline-block;
    animation: audio-loading 1.4s infinite ease-in-out both;
}

.curious-fm-audio-loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.curious-fm-audio-loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes audio-loading {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1.0);
    }
}

/* Enhanced playing indicator animation for playlist items */
.curious-fm-playing-indicator {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.curious-fm-playing-indicator:after {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M6 19h4V5H6v14zm8-14v14h4V5h-4z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.curious-fm-waveform-container {
    width: 100%;
    height: 80px;
    display: flex;
    
    flex-grow: 1;
    /* Simpler background for better performance */
    background: rgba(133, 0, 0, 0.03);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.curious-fm-waveform {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0px; /* Remove gap for a continuous look */
    padding: 0;
}


.curious-fm-waveform-bar {
    flex: 1;
    background: #cc0000;
    min-height: 5%;
    border-radius: 0px; /* Remove radius for a cleaner line */
    will-change: height;
    transition: height 0.05s linear; /* Fast transition for responsiveness */
    position: relative;
    max-width: 20px; /* Wider bars */
    margin: 0;
}


.curious-fm-waveform-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(204, 0, 0, 0.3), rgba(255, 100, 100, 0.7));
    filter: blur(1px);
    opacity: 0.5;
    border-radius: 1px;
}

.curious-fm-waveform-bar[data-active="true"] {
    background: #cc0000; /* Same color for consistency when not active */
}

.curious-fm-waveform-bar[data-active="true"].voice-active {
    background: linear-gradient(to top, #a50000, #ff3333);
    max-width: 4px;
}

/* Remove any hover effects or animations that might impact performance */
.curious-fm-waveform-bar::after {
    content: none; /* Remove the glow effect for better performance */
}

/* Remove the reflection effect for better performance */
.curious-fm-waveform::after {
    content: none;
}

.curious-fm-waveform::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        rgba(204, 0, 0, 0.1) 0%,
        transparent 70%
    );
    pointer-events: none;
}

/* Ensure our waveform is properly sized in all contexts */
#curious-fm-voice-waveform {
    height: 100%;
}


.curious-fm-waveform.voice-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        rgba(204, 0, 0, 0.08) 0%,
        transparent 70%
    );
    pointer-events: none;
}

#curious-fm-voice-waveform {
    height: 100%;
}


.thumbnail-loading {
    position: relative;
}

.thumbnail-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thumbnail-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    z-index: 10;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.curious-fm-play.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.short {
    scroll-snap-align: start;
    /* height: 70vh; */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 0rem;
    justify-content: start;
    height: 100%;

}

.player-wrapper {
    width: 100%;
    /* height: 70%; */
    display: flex
;
    justify-content: center;
    align-items: start;
    position: relative;
    padding-bottom: 9rem;
    flex: 1;
    border-radius: 15px;
    
}

iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    
    
    
  }

  .info-bar {
    position: absolute;
    bottom: 4rem;
    /* background: rgba(0, 0, 0, 0.6); */
    width: 100%;
    text-align: center;
    /* padding: 1rem; */
    font-size: 16px;
    z-index: 10;
    display: flex
;
    flex-direction: column;
    align-items: center;
    display: flex
;
    /* padding-top: 1rem; */
    flex-direction: row;
    justify-content: space-between;
    /* align-items: end; */
    /* display: none; */
    height: 5rem;
}

.info-content {
    
            /* margin-bottom: 10px; */
    text-align: left;
    padding: 1rem;
    /* padding-top: 0rem; */
    font-size: 0.9rem;
    display: flex
;
    /* gap: 1rem; */
    flex-direction: column;
    padding-bottom: 0rem;
    max-height: 5rem;
    width: 100%;
    padding-top: 0rem;
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    cursor: pointer;
    padding: 1rem;
    gap: 5px;
}

.volume-icon {
    height: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 8px;
    padding: 0.5rem;
    background-color: #999;
    
}

.volume-text {
  font-size: 14px;
  display:none;
}

.fallback {
  position: absolute;
  top: 40%;
  text-align: center;
  display: none;
}

.fallback a {
  color: #1db954;
  text-decoration: underline;
}

.video-players {
    /* scroll-snap-type: y mandatory; */
    /* margin-top: 7vh; */
    /* padding-bottom: 15vh; */
    height: 100vh;
    padding-top: 5rem;
    opacity: 0.1;
}
.info-content strong {
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* line-height: 1.5; */
    max-height: 3rem;
}

#global-volume-icon {
    color: white;
}
body.light-mode #global-volume-icon {
    color: #333;
}
.video-placeholder {
    border-radius: 15px;
}
.info-content small {
    display: none;
}

.promo-div {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.promo-text {
    color: white;
    font-size: 0.7rem;
}
body.light-mode .promo-text {
    color: #333;
}

.ios-disclaimer {
    font-size: 0.4rem;
    padding: 0.5rem;
    text-align: right;
    display: block;
    padding-left: 0rem;
    padding-top: 0rem;
}
.disclaimer2-podcast {
    font-size: 2rem;
    margin-bottom: 5rem;
    font-weight: 200;
    text-align: center;
}
.disclaimer2-podcast-subtext {
    font-size: 0.8rem;
    text-align: center;
}
.curious-fm-logo {
    
    max-width: 100%;
    max-height: 60vh;
    margin-bottom: 1rem;
}

.logo-container {
    min-height: 60vh;
}

.load-podcast {
    display: block;
    margin: 0 auto;
    border: 1px solid #c77e7e;
    color: white;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    background: linear-gradient(135deg, rgb(133, 0, 0), rgb(204, 0, 0));
    display: flex;
    align-content: center;
    align-items: center;
    /* text-align: center; */
    padding-left: 2.3rem;
} 

.load-podcast svg {
    width: 24px;
    height: 24px;
    
}

.summary-bubble {
    width: 100%;
}

.player-overlay {
    position: absolute;
    top: 10%;
    /* bottom: 10vh; */
    left: 0;
    right: 0;
    width: 100%;
    height: 70%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
}