/* ==========================================================================
   🔥 FIREBIX YOUTUBE-GRADE CHANNEL PROFILE STYLES (STABLE & ANIMATED)
   ========================================================================== */
:root {
    --fire-base: #F13423;
    --fire-glow: #FF6B35;
    --fire-dark: #111827;
    --fire-gray-bg: #FAFAFB;
    --fire-card-bg: #ffffff;
    --fire-text-main: #1f2937;
    --fire-text-muted: #6b7280;
    --fire-gradient: linear-gradient(135deg, #F13423, #FF6B35);
    --fire-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
    --fire-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.025);
    --fire-shadow-glow: 0 8px 24px rgba(241, 52, 35, 0.12);
    --transition-snappy: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent !important; /* 🔥 Tap glow light turned off */
}

body {
    background: var(--fire-gray-bg);
    color: var(--fire-text-main);
    min-height: 100vh;
}

/* ==========================================================================
   🧩 CROSS-PLATFORM SYSTEM LAYOUT STRUCTURAL WRAPPERS
   ========================================================================== */
.app-layout-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.main-content-stream {
    width: 100%;
    max-width: 800px; /* Mobile/Tablet baseline size */
    background: var(--fire-card-bg);
    padding-bottom: 95px;
    box-sizing: border-box;
}

.firesite-page {
    width: 100%;
    background: var(--fire-card-bg);
    position: relative;
}

/* ==========================================================================
   🖼️ YOUTUBE STYLE ROUNDED COVER BANNER & CONTAINER
   ========================================================================== */
.banner-container {
    padding: 12px 16px 0 16px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.cover-area {
    width: 100%;
    height: 140px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #1f2937, #374151);
    position: relative;
}

.cover-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-default-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #111827, #374151);
}

/* ==========================================================================
   👤 CHANNEL HEADER (YOUTUBE SIDE-BY-SIDE FLEX LAYOUT)
   ========================================================================== */
.channel-header {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--fire-card-bg);
}

.channel-header-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-photo {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--fire-card-bg);
    padding: 2px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.04);
}

.profile-photo-fallback {
    font-size: 28px;
    font-weight: 800;
    color: #4B5563;
}

.channel-meta-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.title-row h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--fire-dark);
    letter-spacing: -0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* YOUTUBE SUB-LINE METRICS */
.channel-sub-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--fire-text-muted);
    font-weight: 500;
    flex-wrap: wrap;
}

.channel-sub-info .handle {
    font-weight: 700;
    color: var(--fire-base);
}

.dot-sep {
    font-size: 10px;
    color: #9CA3AF;
}

.animated-count-node {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animated-count-node.bump-active {
    transform: scale(1.35);
    color: var(--fire-base);
}

/* BIO LINE WITH MORE LINK */
.channel-bio-line {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: var(--fire-text-main);
    margin-top: -2px;
}

.short-bio {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 82%;
}

.bio-more-btn {
    border: none;
    background: transparent;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--fire-dark);
    cursor: pointer;
    padding: 0;
}

/* YOUTUBE FULL-WIDTH FOLLOW / EDIT ACTION ROW */
.channel-action-row {
    margin-top: 4px;
    width: 100%;
}

.yt-follow-btn, .yt-edit-btn {
    width: 100%;
    height: 38px;
    border-radius: 20px;
    border: none;
    background: #111827 !important;
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-snappy);
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 🪐 ENHANCED GRADIENT HOVER & DISCO SHIFT LOOK FOR FOLLOW BTN */
.yt-follow-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, #F13423, #FF6B35, #ff0055, #F13423);
    background-size: 300% 300%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.yt-follow-btn:not(.state-following):hover::before {
    opacity: 1;
    animation: followDiscoShift 3s infinite linear;
}

@keyframes followDiscoShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.yt-follow-btn:not(.state-following):active {
    transform: scale(0.96);
}

.yt-follow-btn.state-following {
    background: #F3F4F6 !important;
    color: var(--fire-text-main) !important;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: none !important;
}

.yt-follow-btn.state-following::before {
    display: none;
}

.yt-edit-btn {
    background: #F3F4F6;
    color: var(--fire-dark);
}

.yt-edit-btn:hover {
    background: #E5E7EB;
}

/* ==========================================================================
   🧭 NAVIGATION TABS SYSTEMS (BLACK PILLS STYLE)
   ========================================================================== */
.tabs-wrap {
    width: 100%;
    background: var(--fire-card-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 40;
}

.tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 16px;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none !important;
}

.tab {
    border: none;
    background: transparent;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--fire-text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-snappy);
    outline: none !important;
}

.tab:hover {
    color: var(--fire-dark);
    background: #F3F4F6;
}

.tab.active {
    background: #111827;
    color: #ffffff !important;
}

/* ==========================================================================
   📦 VIEWPORT AREA CARD LAYERS (HEIGHT STABILIZED)
   ========================================================================== */
.content-area {
    width: 100%;
    position: relative;
    min-height: 60vh;
    transition: min-height 0.3s ease;
}

.tab-section {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    animation: fbxTabFadeIn 0.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fbxTabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-card {
    padding: 16px;
    background: var(--fire-card-bg);
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.section-card h2 {
    font-size: 15px;
    font-weight: 800;
    color: var(--fire-dark);
    letter-spacing: -0.3px;
    margin-bottom: 12px;
}

/* ==========================================================================
   🎬 SMART RESPONSIVE GRID SYSTEMS (COMPACT & BALANCED)
   ========================================================================== */
.sparks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

/* ⚡ Video Shorts Card Framework */
.spark-card {
    width: 100%;
    aspect-ratio: 9 / 14;
    border-radius: 10px;
    overflow: hidden;
    background: #000000;
    position: relative;
    cursor: pointer;
    box-shadow: var(--fire-shadow-sm);
    transition: var(--transition-snappy);
}

.spark-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fire-shadow-glow);
}

.spark-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
    display: block;
}

/* 🖼️ Standard Feed Image Matrix */
.post-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #F3F4F6;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition-snappy);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fire-shadow-md);
}

.post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   📰 PREMIUM ARTICLES VERTICAL STRIP SHELF
   ========================================================================== */
.profile-articles-vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-article-list-card {
    display: flex;
    background: var(--fire-card-bg);
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-snappy);
    height: 90px;
}

.profile-article-list-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fire-shadow-glow);
    border-color: rgba(241, 52, 35, 0.15);
}

.article-list-img {
    width: 110px;
    height: 100%;
    background: #F3F4F6;
    flex-shrink: 0;
}

.article-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-list-meta-body {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.article-list-meta-body h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--fire-dark);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-list-meta-body p {
    font-size: 11.5px;
    color: var(--fire-text-muted);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   🏜️ FALLBACK INTERFACE EMPTY BOXES
   ========================================================================== */
.empty-box {
    padding: 30px 16px;
    text-align: center;
    color: var(--fire-text-muted);
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 12px;
    background: #FAFAFB;
}

.about-bio-text {
    line-height: 1.6;
    color: #334155;
    font-size: 14px;
}

/* ==========================================================================
   ✨ SPECIAL HIGH-END ANIMATION OVERLAYS (CELEBRATION MATRIX)
   ========================================================================== */
#followCelebrationCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100000;
    display: block;
}

/* Floating Thank You Popover Alert Banner */
.follow-thanks-toast-alert {
    position: fixed;
    bottom: 70px;
    left: 16px;
    right: 16px;
    background: #111827;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.08);
    z-index: 100001;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.follow-thanks-toast-alert.show-toast {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.thanks-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 500;
}

.thanks-toast-content b {
    color: var(--fire-glow);
}

.fire-pulse-icon {
    font-size: 18px;
    color: #FF6B35;
    animation: firePulseNode 1.2s infinite alternate ease-in-out;
}

@keyframes firePulseNode {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px #F13423); }
    100% { transform: scale(1.25); filter: drop-shadow(0 0 8px #FF6B35); }
}

/* Immersive Conversion Unfollow Dialogue Box Overlay Panel */
.unfollow-structural-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100002;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 20px;
}

.unfollow-structural-modal-overlay.open-modal {
    opacity: 1;
    pointer-events: auto;
}

.unfollow-modal-card-box {
    background: #ffffff;
    width: 100%;
    max-width: 360px;
    border-radius: 24px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.15);
    transform: scale(0.9) translateY(15px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.unfollow-structural-modal-overlay.open-modal .unfollow-modal-card-box {
    transform: scale(1) translateY(0);
}

.unfollow-modal-pfp-wrapper {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    margin: 0 auto 16px;
    overflow: hidden;
    padding: 3px;
    background: #FAFAFB;
    border: 1px solid rgba(0,0,0,0.05);
}

.unfollow-modal-pfp-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.unfollow-modal-card-box h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--fire-dark);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.unfollow-modal-card-box p {
    font-size: 13px;
    color: var(--fire-text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
    padding: 0 4px;
}

.unfollow-modal-action-row {
    display: flex;
    gap: 10px;
}

.unfollow-modal-action-row button {
    flex: 1;
    border: none;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition-snappy);
    outline: none !important;
}

.modal-action-btn-dismiss {
    background: #F3F4F6;
    color: #4B5563;
}
.modal-action-btn-dismiss:hover {
    background: #E5E7EB;
}

.modal-action-btn-confirm {
    background: #111827;
    color: #ffffff;
}
.modal-action-btn-confirm:hover {
    background: #1f2937;
}

/* ==========================================================================
   📱 MOBILE BREAKPOINT RESPONSIVE CONSTRAINTS (HIGH RES COMPACT RESET)
   ========================================================================== */
@media (max-width: 767px) {
    .banner-container {
        padding: 10px 12px 0 12px;
    }
    .cover-area {
        height: 125px;
    }
    .channel-header {
        padding: 12px 16px;
    }
    .profile-photo {
        width: 68px;
        height: 68px;
    }
    .title-row h1 {
        font-size: 18px;
    }
    .sparks-grid, .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    .post-card, .spark-card {
        border-radius: 6px;
    }
}

/* ==========================================================================
   💻 DESKTOP ARCHITECTURE LIMIT VIEWPORT (>= 992px)
   ========================================================================== */
@media (min-width: 768px) {
    .banner-container {
        padding: 16px 24px 0 24px;
    }
    .cover-area {
        height: 180px;
    }
    .profile-photo {
        width: 86px;
        height: 86px;
    }
    .title-row h1 {
        font-size: 22px;
    }
}

@media (min-width: 992px) {
    .bottom-nav { display: none !important; }
    body { background: #F4F5F7; }
    .app-layout-wrapper { display: grid; grid-template-columns: 1fr; justify-content: center; padding-left: 260px; gap: 0; max-width: 1320px; margin: 0 auto; }
    .main-content-stream { max-width: 850px; margin: 0 auto; background: #ffffff; border-left: 1px solid rgba(0, 0, 0, 0.05); border-right: 1px solid rgba(0, 0, 0, 0.05); padding-bottom: 40px; box-shadow: var(--fire-shadow-sm); }
}

/* ==========================================
   PROFILE PHOTO SWIPE MODAL (DARK MODE)
========================================== */
.pfp-swipe-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.pfp-swipe-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.pfp-modal-drag-indicator {
    width: 45px;
    height: 5px;
    background: rgba(255,255,255,0.4);
    border-radius: 10px;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#pfpExpandedImg {
    width: auto;
    max-width: 100vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    user-select: none;
    -webkit-user-drag: none;
}

/* ==========================================================================
   🚀 TOP ACTION BAR (FIXED STICKY OVERLAY - WON'T SCROLL WITH PAGE)
   ========================================================================== */
.profile-top-action-bar {
    position: fixed !important;
    top: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 800px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 16px !important;
    z-index: 1000 !important;
    pointer-events: none !important;
}

.profile-top-action-bar .action-btn {
    pointer-events: auto !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #ffffff !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1) !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
}

.profile-top-action-bar .action-btn:active {
    transform: scale(0.85) !important;
}

.right-top-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 3-DOTS MENU DROPDOWN POPUP */
.menu-dropdown-wrapper {
    position: relative;
    pointer-events: auto;
}

.profile-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 6px;
    min-width: 160px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transform-origin: top right;
    transition: var(--transition-snappy);
    z-index: 1001;
}

.profile-menu-dropdown.show-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-snappy);
}

.dropdown-item-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item-btn i {
    font-size: 15px;
    color: var(--fire-glow);
}

/* 🟢 SMOOTH TAB CONTENT SLIDE ANIMATIONS */
.tab-section.slide-out-left {
    animation: fbxSlideOutLeft 0.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.tab-section.slide-out-right {
    animation: fbxSlideOutRight 0.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.tab-section.slide-in-left {
    animation: fbxSlideInLeft 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.tab-section.slide-in-right {
    animation: fbxSlideInRight 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fbxSlideOutLeft {
    to { opacity: 0; transform: translateX(-35px); }
}
@keyframes fbxSlideOutRight {
    to { opacity: 0; transform: translateX(35px); }
}
@keyframes fbxSlideInLeft {
    from { opacity: 0; transform: translateX(-35px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fbxSlideInRight {
    from { opacity: 0; transform: translateX(35px); }
    to { opacity: 1; transform: translateX(0); }
}