/* ===== Content Header (tab bar) ===== */
.content-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.content-header-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #888);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.content-header-tab svg {
    flex-shrink: 0;
}

.content-header-tab:hover {
    color: var(--text-primary, #eee);
    background: rgba(255, 255, 255, 0.05);
}

.content-header-tab.active {
    color: white;
    background: var(--accent-color, #ff1212);
    border-color: var(--accent-color, #ff1212);
}

@media (max-width: 600px) {
    .content-header {
        justify-content: flex-start;
        padding: 8px 12px;
    }

    .content-header-tab {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
}

/* ===== Wide Feed Layout ===== */
.wide-feed {
    max-width: none;
    padding: 0 32px 40px;
}

@media (max-width: 768px) {
    .wide-feed {
        padding: 0 16px 40px;
    }
}

/* ===== Card Preview Video ===== */
.content-card-thumb,
.card-thumb {
    position: relative;
    overflow: hidden;
}

.card-preview-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.card-preview-video.visible {
    opacity: 1;
}

/* ===== Discovery Pages ===== */
.discovery-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.discovery-header {
    padding: 28px 0 20px;
}

.discovery-header h1 {
    font-size: 28px;
    margin: 0;
    color: var(--text-primary, #f0f0f0);
}

.discovery-header p {
    color: var(--text-secondary, #888);
    margin: 6px 0 0;
    font-size: 14px;
}

/* Search Form */
.search-form {
    margin-top: 16px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #222);
    border-radius: 12px;
    transition: border-color 0.2s;
}

.search-input-wrap:focus-within {
    border-color: var(--accent, #667eea);
}

.search-input-wrap svg {
    flex-shrink: 0;
    color: var(--text-secondary, #666);
}

.search-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary, #f0f0f0);
    font-size: 16px;
    outline: none;
}

.search-input-wrap input::placeholder {
    color: var(--text-secondary, #555);
}

/* Search Tabs */
.search-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border, #1a1a1a);
    margin-bottom: 20px;
    overflow-x: auto;
}

.search-tab {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #888);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-tab:hover {
    color: var(--text-primary, #eee);
}

.search-tab.active {
    color: var(--accent, #667eea);
    border-bottom-color: var(--accent, #667eea);
}

.tab-count {
    font-size: 12px;
    color: var(--text-secondary, #555);
    margin-left: 4px;
}

/* Search Section */
.search-section {
    margin-bottom: 28px;
}

/* Content Cards Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.content-card {
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #1a1a1a);
    transition: transform 0.2s, box-shadow 0.2s;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.content-card-thumb {
    aspect-ratio: 16/9;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.content-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-thumb {
    aspect-ratio: 1;
}

.post-thumb {
    aspect-ratio: 4/3;
}

.duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.content-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.content-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #eee);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card-meta {
    font-size: 12px;
    color: var(--text-secondary, #666);
}

.audio-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Channel Cards (search results) */
.channels-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.channel-card-link {
    text-decoration: none;
    color: inherit;
}

.channel-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #1a1a1a);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.channel-card:hover {
    border-color: var(--accent, #667eea);
}

.channel-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-card-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.channel-card-name {
    font-weight: 600;
    font-size: 14px;
}

/* Channels Directory Page */
.channels-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.dir-channel-card {
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #1a1a1a);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dir-channel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dir-channel-banner {
    height: 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: cover;
    background-position: center;
}

.dir-channel-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 16px;
    margin-top: -24px;
}

.dir-channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.dir-channel-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.dir-channel-name {
    font-weight: 600;
    font-size: 15px;
    margin-top: 6px;
    color: var(--text-primary, #eee);
}

.dir-channel-followers {
    font-size: 12px;
    color: var(--text-secondary, #666);
    margin-top: 2px;
}

/* Schedule Page */
.sched-tz-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: rgba(255, 18, 18, 0.06);
    border: 1px solid rgba(255, 18, 18, 0.12);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary, #888);
}

.sched-tz-notice svg {
    flex-shrink: 0;
    color: var(--accent-color, #ff1212);
}

.sched-week-heading-pub {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 10px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-color, #ff1212);
}

.sched-week-heading-pub:first-child {
    margin-top: 0;
}

.sched-week-heading-pub::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--accent-color-20, rgba(255, 18, 18, 0.2));
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.schedule-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #1a1a1a);
    border-radius: 12px;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    max-width: 800px;
}

.schedule-card:hover {
    background: var(--bg-secondary, #151515);
    border-color: rgba(255, 255, 255, 0.08);
}

.sched-day-heading-pub {
    font-size: 15px;
    font-weight: 600;
    color: #ccc;
    margin: 12px 0 6px 2px;
}

.sched-time-badge {
    flex-shrink: 0;
    width: 52px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-color, #ff1212);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.schedule-info {
    flex: 1;
    min-width: 0;
}

.schedule-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary, #eee);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-channel-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary, #888);
}

.schedule-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.schedule-avatar.placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color, #ff1212);
    color: white;
    font-size: 10px;
    font-weight: 700;
}

.schedule-countdown {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 18px;
    color: var(--accent-color, #ff1212);
    min-width: 70px;
    text-align: right;
}

.schedule-countdown.live {
    color: #4ade80;
}

/* Post Cards (search) */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 14px 16px;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #1a1a1a);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.post-card:hover {
    border-color: var(--accent, #667eea);
}

.post-card-text {
    font-size: 14px;
    color: var(--text-primary, #ddd);
    line-height: 1.5;
    margin-bottom: 6px;
}

.post-card-meta {
    font-size: 12px;
    color: var(--text-secondary, #666);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0;
}

.page-btn {
    padding: 8px 16px;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #222);
    border-radius: 8px;
    color: var(--text-primary, #eee);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.2s;
}

.page-btn:hover {
    border-color: var(--accent, #667eea);
    color: var(--accent, #667eea);
}

.page-info {
    font-size: 13px;
    color: var(--text-secondary, #666);
}

/* Empty State */
.empty-state-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 20px;
    text-align: center;
}

.empty-state-large p {
    color: var(--text-secondary, #666);
    font-size: 15px;
}

/* Live Search Dropdown */
.live-search-wrap {
    position: relative;
}

.live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #222);
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.live-search-dropdown.visible {
    display: block;
}

.live-search-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--border, #1a1a1a);
}

.live-search-section:last-child {
    border-bottom: none;
}

.live-search-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #666);
    padding: 4px 16px;
}

.live-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-primary, #eee);
    font-size: 13px;
    transition: background 0.15s;
}

.live-search-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.live-search-item .ls-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.live-search-item .ls-meta {
    font-size: 11px;
    color: var(--text-secondary, #666);
    margin-left: auto;
}

.live-search-all {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    color: var(--accent, #667eea);
    text-decoration: none;
    font-weight: 500;
}

.live-search-all:hover {
    text-decoration: underline;
}

/* Homepage Discovery Sections */
.home-section {
    margin-bottom: 32px;
}

.streaming-section {
    margin-bottom: 48px;
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.home-section-header h2 {
    font-size: 18px;
    margin: 0;
    color: var(--text-primary, #f0f0f0);
}

.home-section-header a {
    font-size: 13px;
    color: var(--accent, #667eea);
    text-decoration: none;
}

.home-section-header a:hover {
    text-decoration: underline;
}

/* Accent section button */
.section-btn {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-color, #ff1212);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.15s;
}

.section-btn:hover {
    opacity: 0.85;
    color: #fff;
}

/* Responsive channels grid */
.home-channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

/* Auto-scrolling ticker */
.ticker-wrapper {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}

.ticker-track {
    display: flex;
    gap: 0;
    animation: tickerScroll var(--ticker-duration, 30s) linear infinite;
    width: max-content;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: var(--secondary-bg, #111);
    border: 1px solid #222;
    border-radius: 8px;
    margin-right: 12px;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.ticker-item:hover {
    border-color: var(--accent-color, #ff1212);
}

.ticker-countdown {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--accent-color, #ff1212);
    min-width: 60px;
}

.ticker-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #eee;
}

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

/* Text-only post card preview */
.post-preview-text-card {
    padding: 12px;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .channels-directory {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .schedule-card {
        flex-wrap: wrap;
    }

    .home-channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

/* ===== Articles Blog-Post Layout ===== */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-card {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-secondary, #111);
    border: 1px solid var(--border, #1a1a1a);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}

.article-card:hover {
    border-color: rgba(255, 18, 18, 0.25);
    transform: translateY(-2px);
}

.article-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.article-card-author {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-color, #ff1212);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #eee);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-date {
    font-size: 0.72rem;
    color: var(--text-secondary, #666);
    margin-top: auto;
}

.article-card-thumb {
    flex-shrink: 0;
    width: 160px;
    border-radius: 8px;
    overflow: hidden;
}

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

@media (max-width: 600px) {
    .article-card {
        flex-direction: column-reverse;
        padding: 14px;
    }

    .article-card-thumb {
        width: 100%;
        height: 160px;
    }
}