/* PULSE - Terminal Aesthetic Dashboard */

:root {
    --bg-primary: #F5F5F5;
    --bg-secondary: #EFEFEF;
    --bg-panel: #F5F5F5;
    --border-color: #cccccc;
    --text-primary: #1a1a18;
    --text-secondary: #1a1a18;
    --text-dim: #4a4a48;
}

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

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px;
    padding-left: 140px;
}

/* Header */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    border-bottom: 3px solid var(--text-primary);
    margin-bottom: 16px;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.logo {
    height: 204px;
    width: auto;
    display: block;
}

.subtitle {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.update-time {
    color: var(--text-dim);
    font-size: 11px;
}

.refresh-btn {
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.refresh-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.refresh-btn:active {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.refresh-btn.loading {
    color: var(--text-dim);
    border-color: var(--text-dim);
    cursor: wait;
}

/* Trending Section - 2 rows of 5 at top */
.trending-section {
    margin-bottom: 16px;
    padding-bottom: 8px;
}

.trending-grid {
    max-width: 100%;
}

/* People Section */
.people-section {
    margin-top: 24px;
    border-top: 3px solid var(--text-primary);
    padding-top: 16px;
}

.people-row-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 16px;
}

.person-card {
    text-align: center;
    min-width: 0;
}

.person-image {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
}

.person-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-known-for {
    font-size: 9px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
}

/* Category Grid Layout */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.category-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 1400px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* Panels */
.panel {
    background: var(--bg-panel);
    min-width: 0;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.panel-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.panel-source {
    font-size: 9px;
    color: var(--text-dim);
}

.panel-content {
    padding: 8px 0;
}

/* Rankings List */
.ranking-item {
    display: flex;
    align-items: flex-start;
    padding: 3px 0;
    min-height: 36px;
}

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

.rank-number {
    width: 24px;
    flex-shrink: 0;
    font-weight: 400;
    color: var(--text-dim);
    font-size: 11px;
    text-align: right;
    padding-right: 6px;
}

.rank-number.rank-1 {
    color: var(--text-primary);
    font-weight: 700;
}

.rank-number.rank-2,
.rank-number.rank-3 {
    color: var(--text-secondary);
}

.rank-content {
    flex: 1;
    min-width: 0;
}

.rank-title {
    color: var(--text-primary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-title-link {
    color: var(--text-primary);
    text-decoration: none;
}

.rank-title-link:hover {
    text-decoration: underline;
}

.rank-1 .rank-title {
    font-weight: 700;
}

.rank-meta {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-stats {
    width: 50px;
    flex-shrink: 0;
    text-align: right;
    font-size: 10px;
    color: var(--text-dim);
    margin-left: 4px;
}

.rank-delta {
    font-size: 9px;
    margin-left: 4px;
}

.rank-delta.up {
    color: var(--text-dim);
}

.rank-delta.down {
    color: var(--text-dim);
}

.rank-delta.new {
    color: var(--text-dim);
}

/* Trending Items - Grid Card Layout */
.trend-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--bg-panel);
    min-width: 0;
    overflow: hidden;
}

.trend-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.trend-link:hover {
    opacity: 0.8;
}

.trend-link:hover .trend-title {
    text-decoration: underline;
}

.trend-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
    min-width: 0;
    overflow: hidden;
}

.trend-rank {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-dim);
}

.trend-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-image {
    width: 100%;
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    margin-bottom: 8px;
}

.trend-context {
    color: var(--text-dim);
    font-size: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trend-divider {
    grid-column: 1 / -1;
    height: 2px;
    background: var(--text-primary);
    margin: 8px 0;
}

/* Section Labels - bold labels in left margin */
.section-label {
    position: absolute;
    left: -130px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    font-family: 'Futura', 'Futura PT', 'Century Gothic', 'Arial Black', sans-serif;
    font-size: 70px;
    font-weight: 700;
    color: #e8e8e8;
    text-transform: uppercase;
    letter-spacing: -0.08em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
}

/* Row wrapper - contains label + content */
.trending-row-wrapper {
    position: relative;
}

.charts-wrapper {
    position: relative;
    border-top: 3px solid var(--text-primary);
    padding-top: 16px;
}

.trending-row-wrapper {
    margin-bottom: 16px;
}

.trending-row-wrapper:last-child {
    margin-bottom: 0;
}

.section-divider {
    height: 2px;
    background: var(--text-primary);
    margin: 8px 0 16px 0;
}

.trending-row-content {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .trending-row-content {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }
}

@media (max-width: 900px) {
    .trending-row-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .trending-row-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

.trending-section {
    position: relative;
}

.main-content {
    position: relative;
}

/* Legacy trend-item styles (keep for fallback) */
.trend-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px dotted var(--border-color);
    position: relative;
    cursor: default;
}

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

.trend-bullet {
    color: var(--text-dim);
    font-size: 10px;
    line-height: 1.4;
}

.trend-text {
    color: var(--text-primary);
    font-size: 11px;
    line-height: 1.4;
}

.trend-source {
    display: none;
}

/* Upcoming Items */
.upcoming-item {
    display: flex;
    align-items: flex-start;
    padding: 3px 0;
}

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

.upcoming-date {
    width: 70px;
    flex-shrink: 0;
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 700;
}

.upcoming-content {
    flex: 1;
}

.upcoming-title {
    color: var(--text-primary);
    font-size: 12px;
}

.upcoming-meta {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 1px;
}

/* Loading State */
.loading {
    color: var(--text-dim);
    font-size: 11px;
    padding: 10px;
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Error State */
.error {
    color: var(--text-dim);
    font-size: 11px;
    padding: 10px;
    text-align: center;
}

/* Footer */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-top: 3px solid var(--text-primary);
    margin-top: 20px;
    font-size: 10px;
    color: var(--text-dim);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

#statusIndicator {
    color: var(--text-dim);
}

#statusIndicator.fetching {
    color: var(--text-secondary);
}

#statusIndicator.error {
    color: var(--text-dim);
}


/* ASCII Decorations */
.ascii-border {
    color: var(--border-color);
    font-size: 10px;
}

/* Empty State */
.empty-state {
    color: var(--text-dim);
    font-size: 11px;
    padding: 20px;
    text-align: center;
}

/* Coming Soon Header */
.coming-soon-header {
    font-size: 12px;
    color: var(--text-primary);
    text-transform: uppercase;
    padding: 8px 0 4px 24px;
    margin-top: 4px;
}

/* Media Popup (Movies, Videos, etc.) */
.media-item {
    cursor: pointer;
}

.media-item:hover {
    background: var(--bg-secondary);
}

.media-popup {
    position: absolute;
    z-index: 1000;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 8px;
    width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.media-popup-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.media-popup-text {
    font-size: 10px;
    line-height: 1.4;
    color: var(--bg-primary);
}

/* Web Traffic Section */
.web-section {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.web-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px 20px;
}

@media (max-width: 1400px) {
    .web-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .web-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .web-grid {
        grid-template-columns: 1fr;
    }
}

/* YouTube Section */
.youtube-section {
    position: relative;
    border-top: 3px solid var(--text-primary);
    padding-top: 16px;
    padding-bottom: 16px;
}

.youtube-section .trend-title {
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Out of the Loop Section */
.ootl-section {
    position: relative;
    border-top: 3px solid var(--text-primary);
    padding-top: 16px;
    margin-top: 24px;
}

.ootl-header {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ootl-card .trend-title {
    font-size: 12px;
    letter-spacing: 0.5px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* TikTok Section */
.tiktok-section {
    position: relative;
    border-top: 3px solid var(--text-primary);
    padding-top: 16px;
    padding-bottom: 16px;
}

.tiktok-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    padding: 8px 0;
}

.tiktok-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tiktok-card:hover .tiktok-thumbnail img {
    transform: scale(1.05);
}

.tiktok-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: var(--bg-secondary);
    overflow: hidden;
}

.tiktok-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.tiktok-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 7px;
    color: var(--text-dim);
}

.tiktok-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s;
}

.tiktok-card:hover .tiktok-play-overlay {
    opacity: 1;
}

.tiktok-play-btn {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiktok-play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid var(--text-primary);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    margin-left: 2px;
}

.tiktok-info {
    padding: 4px 0;
    height: 30px;
    overflow: hidden;
}

.tiktok-author {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 14px;
    line-height: 14px;
}

.tiktok-stats {
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 1px;
    height: 12px;
    line-height: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===========================================
   MOBILE HORIZONTAL CAROUSEL EXPERIENCE
   =========================================== */

@media (max-width: 768px) {
    /* Hide content until loaded and scrolled to prevent flash */
    body:not(.loaded) .container {
        visibility: hidden;
        opacity: 0;
    }

    body.loaded .container {
        visibility: visible;
        opacity: 1;
    }

    /* Hide desktop elements */
    .header,
    .footer,
    .section-label,
    .coming-soon-header {
        display: none !important;
    }

    /* Hide OOTL on mobile */
    .ootl-section {
        display: none !important;
    }

    /* Reset body */
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Main HORIZONTAL scroll container */
    .container {
        padding: 0;
        padding-left: 0;
        max-width: none;
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: row;
        scroll-snap-type: x mandatory;
        overflow-x: scroll;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide main-content wrapper styling */
    .main-content {
        display: contents;
    }

    /* ===========================================
       PULL TO REFRESH
       =========================================== */
    .pull-to-refresh {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'Futura', 'Futura PT', 'Century Gothic', 'Arial Black', sans-serif;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text-dim);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        background: var(--bg-primary);
    }

    .pull-to-refresh.visible {
        transform: translateY(0);
    }

    .pull-to-refresh.refreshing {
        color: var(--text-primary);
    }

    /* ===========================================
       BASE MOBILE SLIDE STYLES
       =========================================== */
    .mobile-slide {
        scroll-snap-align: start;
        scroll-snap-stop: always;
        min-width: 100vw;
        width: 100vw;
        height: 100vh;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        padding: 8px;
        overflow: hidden;
    }

    /* ===========================================
       GOOGLE & X TRENDS - Each is its own horizontal slide
       =========================================== */
    .trending-section {
        display: contents !important;
    }

    .trending-section .trending-grid {
        display: contents;
    }

    .trending-section .section-divider {
        display: none;
    }

    .trending-section .trending-row-wrapper {
        scroll-snap-align: start;
        scroll-snap-stop: always;
        min-width: 100vw;
        width: 100vw;
        height: 100vh;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        padding: 8px;
        overflow: hidden;
    }

    .trending-section .trending-row-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(5, 1fr);
        gap: 6px;
        flex: 1;
        min-height: 0;
    }

    .trending-section .trend-card {
        display: flex;
        flex-direction: column;
        position: relative;
        padding: 0;
        min-height: 0;
        overflow: hidden;
        background: var(--bg-primary);
    }

    .trending-section .trend-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 40px;
        background: url('fallback.png') center center / cover no-repeat;
        opacity: 0.3;
        z-index: 0;
    }

    .trending-section .trend-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100% - 40px);
        object-fit: cover;
        opacity: 0.4;
        margin: 0;
        z-index: 1;
    }

    .trending-section .trend-header {
        position: relative;
        z-index: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 6px 6px 0 6px;
        text-align: center;
    }

    .trending-section .trend-title {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 21px;
        font-weight: 700;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding-bottom: 40px;
    }

    .trending-section .trend-context {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40px;
        background: var(--bg-primary);
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        font-size: 9px;
        color: var(--text-dim);
        line-height: 1.3;
        padding: 2px 4px;
        text-align: center;
        overflow: hidden;
        z-index: 3;
    }

    /* ===========================================
       YOUTUBE - Horizontal slide
       =========================================== */
    .youtube-section {
        display: contents !important;
    }

    .youtube-section .trending-row-wrapper {
        scroll-snap-align: start;
        scroll-snap-stop: always;
        min-width: 100vw;
        width: 100vw;
        height: 100vh;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        padding: 8px;
        overflow: hidden;
    }

    .youtube-section .trending-row-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(5, 1fr);
        gap: 6px;
        flex: 1;
        min-height: 0;
    }

    .youtube-section .trend-card {
        display: flex;
        flex-direction: column;
        position: relative;
        padding: 0;
        min-height: 0;
        overflow: hidden;
        background: var(--bg-primary);
    }

    .youtube-section .trend-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 40px;
        background: url('fallback.png') center center / cover no-repeat;
        opacity: 0.3;
        z-index: 0;
    }

    .youtube-section .trend-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100% - 40px);
        object-fit: cover;
        opacity: 0.5;
        margin: 0;
        z-index: 1;
    }

    .youtube-section .trend-header {
        position: relative;
        z-index: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 6px 6px 0 6px;
        text-align: center;
    }

    .youtube-section .trend-title {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 700;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding-bottom: 40px;
    }

    .youtube-section .trend-context {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40px;
        background: var(--bg-primary);
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        font-size: 9px;
        color: var(--text-dim);
        line-height: 1.3;
        padding: 2px 4px;
        text-align: center;
        overflow: hidden;
        z-index: 3;
    }

    /* ===========================================
       TIKTOK - Horizontal slide
       =========================================== */
    .tiktok-section {
        scroll-snap-align: start;
        scroll-snap-stop: always;
        min-width: 100vw;
        width: 100vw;
        height: 100vh;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        padding: 8px;
        overflow: hidden;
        border: none;
    }

    .tiktok-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: repeat(5, 1fr) !important;
        gap: 6px !important;
        flex: 1;
        min-height: 0;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .tiktok-card {
        display: flex;
        flex-direction: column;
        position: relative;
        padding: 0;
        min-height: 0;
        overflow: hidden;
        background: var(--bg-primary);
    }

    .tiktok-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 40px;
        background: url('fallback.png') center center / cover no-repeat;
        opacity: 0.3;
        z-index: 0;
    }

    .tiktok-thumbnail {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: calc(100% - 40px) !important;
        aspect-ratio: auto !important;
        overflow: hidden;
        background: var(--bg-secondary);
    }

    .tiktok-thumbnail img {
        width: 100%;
        height: 150%;
        object-fit: cover;
        object-position: top center;
        opacity: 0.5;
    }

    .tiktok-info {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40px;
        background: var(--bg-primary);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2px 4px;
        text-align: center;
        overflow: hidden;
        z-index: 3;
    }

    .tiktok-author {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        height: auto;
        line-height: 1.1;
        z-index: 2;
        padding: 6px;
    }

    .tiktok-stats {
        font-size: 9px;
        height: auto;
        line-height: 1.3;
        margin-top: 0;
        color: var(--text-dim);
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tiktok-play-overlay {
        display: none !important;
    }

    /* ===========================================
       CHARTS - Hide old structure, use new mobile slides
       =========================================== */
    .charts-wrapper,
    .main-content {
        display: none !important;
    }

    /* ===========================================
       NEW Mobile Charts Slides (Songs/Movies/Shows)
       =========================================== */
    .mobile-charts-slide {
        scroll-snap-align: start;
        scroll-snap-stop: always;
        min-width: 100vw;
        width: 100vw;
        height: 100vh;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        padding: 8px;
        overflow: hidden;
    }

    .mobile-charts-slide .trending-row-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(5, 1fr);
        gap: 6px;
        flex: 1;
        min-height: 0;
    }

    .mobile-charts-slide .trend-card {
        display: flex;
        flex-direction: column;
        position: relative;
        padding: 0;
        min-height: 0;
        overflow: hidden;
        background: var(--bg-primary);
    }

    .mobile-charts-slide .trend-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 40px;
        background: url('fallback.png') center center / cover no-repeat;
        opacity: 0.3;
        z-index: 0;
    }

    .mobile-charts-slide .trend-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100% - 40px);
        object-fit: cover;
        opacity: 0.5;
        margin: 0;
        z-index: 1;
    }

    .mobile-charts-slide .trend-header {
        position: relative;
        z-index: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 6px 6px 0 6px;
        text-align: center;
    }

    .mobile-charts-slide .trend-title {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 700;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding-bottom: 40px;
    }

    .mobile-charts-slide .trend-context {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40px;
        background: var(--bg-primary);
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        font-size: 9px;
        color: var(--text-dim);
        line-height: 1.3;
        padding: 2px 4px;
        text-align: center;
        overflow: hidden;
        z-index: 3;
    }

    /* ===========================================
       Mobile Category Labels
       =========================================== */
    .mobile-category-label {
        font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
        font-size: 24px;
        font-weight: 800;
        color: var(--text-primary);
        text-transform: uppercase;
        text-align: center;
        letter-spacing: 2px;
        padding: 8px 0;
        flex-shrink: 0;
    }

    /* ===========================================
       Page indicator dots (horizontal)
       =========================================== */
    .mobile-page-indicator {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 8px;
        z-index: 100;
    }

    .mobile-page-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--text-dim);
        opacity: 0.3;
        transition: opacity 0.2s, background 0.2s;
    }

    .mobile-page-dot.active {
        opacity: 1;
        background: var(--text-primary);
    }
}
