/* ===== TrendPulse — Blue Viral Video Hub ===== */

:root {
    --tp-bg: #060c1f;
    --tp-bg-alt: #0b1530;
    --tp-card: #101c3d;
    --tp-border: #1e2c54;
    --tp-blue: #2f8fff;
    --tp-cyan: #22d3ee;
    --tp-text: #e6ecff;
    --tp-text-dim: #93a2c9;
    --tp-yt: #ff4d4d;
    --tp-fb: #4d8dff;
    --tp-tt: #22d3ee;
    --tp-ig: #e1306c;
    --tp-pin: #e60023;
    --tp-sc: #fffc00;
    --tp-tw: #1d9bf0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: radial-gradient(circle at top, var(--tp-bg-alt), var(--tp-bg) 60%);
    color: var(--tp-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

.tp-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

a { color: var(--tp-cyan); text-decoration: none; }

/* ---- Header / Nav ---- */
.tp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(6, 12, 31, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--tp-border);
}
.tp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.tp-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--tp-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tp-logo-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tp-blue), var(--tp-cyan));
    box-shadow: 0 0 12px var(--tp-cyan);
}
.tp-tabs { display: flex; gap: 8px; }
.tp-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--tp-border);
    color: var(--tp-text-dim);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.tp-tab:hover, .tp-tab.is-active { color: var(--tp-text); border-color: var(--tp-blue); background: rgba(47,143,255,0.1); }
.tp-tab-youtube:hover, .tp-tab-youtube.is-active { color: var(--tp-yt); border-color: var(--tp-yt); }
.tp-tab-facebook:hover, .tp-tab-facebook.is-active { color: var(--tp-fb); border-color: var(--tp-fb); }
.tp-tab-tiktok:hover, .tp-tab-tiktok.is-active { color: var(--tp-tt); border-color: var(--tp-tt); }
.tp-tab-instagram:hover, .tp-tab-instagram.is-active { color: var(--tp-ig); border-color: var(--tp-ig); }
.tp-tab-pinterest:hover, .tp-tab-pinterest.is-active { color: var(--tp-pin); border-color: var(--tp-pin); }
.tp-tab-snapchat:hover, .tp-tab-snapchat.is-active { color: var(--tp-sc); border-color: var(--tp-sc); }
.tp-tab-twitter:hover, .tp-tab-twitter.is-active { color: var(--tp-tw); border-color: var(--tp-tw); }

.tp-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--tp-border);
    color: var(--tp-text);
    border-radius: 8px;
    font-size: 1.2rem;
    padding: 4px 10px;
    cursor: pointer;
}

/* ---- Hero ---- */
.tp-hero { text-align: center; padding: 50px 0 20px; }
.tp-hero-title { font-size: 2.2rem; margin-bottom: 6px; }
.tp-hero-sub { color: var(--tp-text-dim); margin-bottom: 30px; }

.tp-featured-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 4px 20px;
    scroll-snap-type: x mandatory;
}
.tp-featured-card {
    flex: 0 0 auto;
    width: 300px;
    scroll-snap-align: start;
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}
.tp-badge {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 2;
    background: rgba(0,0,0,0.6);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.tp-featured-youtube .tp-badge { color: var(--tp-yt); }
.tp-featured-facebook .tp-badge { color: var(--tp-fb); }
.tp-featured-tiktok .tp-badge { color: var(--tp-tt); }

/* ---- Section headings ---- */
.tp-platform-section { padding: 40px 0 10px; }
.tp-section-title {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tp-border);
}
.tp-section-youtube .tp-icon { color: var(--tp-yt); }
.tp-section-facebook .tp-icon { color: var(--tp-fb); }
.tp-section-tiktok .tp-icon { color: var(--tp-tt); }
.tp-section-instagram .tp-icon { color: var(--tp-ig); }
.tp-section-pinterest .tp-icon { color: var(--tp-pin); }
.tp-section-snapchat .tp-icon { color: var(--tp-sc); }
.tp-section-twitter .tp-icon { color: var(--tp-tw); }

/* ---- Category page intro ---- */
.tp-page-intro { padding: 40px 0 10px; }
.tp-page-title {
    font-size: 1.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.tp-page-text { color: var(--tp-text-dim); max-width: 720px; }

/* ---- Homepage "show" ---- */
.tp-show-title { border: none; }
.tp-grid-home {
    display: grid;
    grid-template-columns: repeat(var(--tp-home-cols, 2), 1fr);
    gap: 24px;
}
.tpadm-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    margin-bottom: 8px;
}
.tpadm-badge-youtube { color: var(--tp-yt); }
.tpadm-badge-facebook { color: var(--tp-fb); }
.tpadm-badge-tiktok { color: var(--tp-tt); }
.tpadm-badge-instagram { color: var(--tp-ig); }
.tpadm-badge-pinterest { color: var(--tp-pin); }
.tpadm-badge-snapchat { color: var(--tp-sc); }
.tpadm-badge-twitter { color: var(--tp-tw); }

/* ---- Video grid ---- */
.tp-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.tp-video-card {
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    padding: 12px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.tp-video-card:hover { transform: translateY(-3px); border-color: var(--tp-blue); }
.tp-video-title {
    font-size: 0.95rem;
    margin: 0 0 10px;
    color: var(--tp-text);
    font-weight: 600;
}
.tp-empty { color: var(--tp-text-dim); font-style: italic; }

/* ---- Embeds (responsive 16:9 for youtube/facebook) ---- */
.tpadm-embed-youtube, .tpadm-embed-facebook {
    position: relative;
    padding-top: 56.25%;
    border-radius: 10px;
    overflow: hidden;
}
.tpadm-embed-youtube iframe, .tpadm-embed-facebook iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 10px;
}
.tpadm-embed-tiktok, .tpadm-embed-instagram, .tpadm-embed-pinterest, .tpadm-embed-snapchat {
    display: flex;
    justify-content: center;
}
.tpadm-embed-tiktok blockquote, .tpadm-embed-instagram blockquote { margin: 0 auto; }
.tpadm-embed-fallback a {
    display: block;
    padding: 40px 10px;
    text-align: center;
    color: var(--tp-sc);
    font-weight: 700;
}

/* ---- Ad zones ---- */
.tp-ad-zone-wrap { margin: 30px auto; text-align: center; }
.tpadm-ad-zone { display: inline-block; max-width: 100%; overflow: hidden; }
.tp-header-banner-zone, .tp-footer-banner-zone { text-align: center; padding: 10px 0; }
.tp-social-bar-zone { position: relative; z-index: 60; }

/* ---- Footer ---- */
.tp-footer {
    margin-top: 40px;
    padding: 24px 0 40px;
    border-top: 1px solid var(--tp-border);
    color: var(--tp-text-dim);
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 900px) {
    .tp-grid-home { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .tp-header-inner { flex-wrap: wrap; }
    .tp-nav-toggle { display: block; }
    .tp-tabs {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 6px;
        order: 3;
    }
    .tp-tabs.is-open { display: flex; }
    .tp-tab { padding: 10px 14px; font-size: 0.85rem; justify-content: flex-start; }
    .tp-featured-card { width: 240px; }
}
