/* ==========================================================================
   ANIMEHUB ULTRA-MODERN HOMEPAGE STYLESHEET (PERSIAN & RTL OPTIMIZED)
   Mobile & Windows Dual-Optimized | Zero Letter-Spacing | Vazirmatn Typography
   ========================================================================== */

/* 1. Global Reset & Persian Typography Standards (GEMINI.md) */
.stories-container-section,
.adv-search-section,
.parent-portals-section,
.pjadval-sec,
.unified-archive-analytics-section {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Vazirmatn', 'Vazir', 'Shabnam', 'Yekan', 'B Yekan', Tahoma, Arial, sans-serif !important;
    box-sizing: border-box;
}

.stories-container-section *,
.adv-search-section *,
.parent-portals-section *,
.pjadval-sec *,
.unified-archive-analytics-section * {
    letter-spacing: normal !important;
    box-sizing: border-box;
}

/* Common Section Header Component */
.shelf-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
}
.shelf-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.shelf-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}
.shelf-main-heading {
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 1.6;
}
.shelf-sub-heading {
    display: block;
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.85;
    margin-top: 2px;
}

/* ==========================================================================
   SECTION 1: STORIES TRACK (استوری‌ها و هایلایت‌ها)
   ========================================================================== */
.stories-container-section {
    max-width: 1360px;
    margin: 1.25rem auto 2rem;
    padding: 0 1.25rem;
}
.stories-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    padding: 0 0.35rem;
}
.stories-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.stories-header-icon {
    font-size: 1.25rem;
}
.stories-header-title {
    font-size: 1.05rem;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.6;
}
.stories-header-hint {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.85;
}
.stories-scroll-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 1.1rem 1.15rem;
    background: rgba(15, 20, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.stories-scroll-track::-webkit-scrollbar { display: none; }
.story-bubble-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    flex-shrink: 0;
    font-family: inherit;
}
.story-ring-wrapper {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, #ff2a6d 0%, #8b5cf6 50%, #00f0ff 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.story-bubble-item:hover .story-ring-wrapper {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 42, 109, 0.5);
}
.story-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #0d121f;
    border: 2px solid #070a13;
}
.story-avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.story-badge-count {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ff2a6d, #8b5cf6);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1.5px solid #070a13;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}
.story-title-label {
    font-size: 0.76rem;
    font-weight: 800;
    color: #e2e8f0;
    margin-top: 0.25rem;
    line-height: 1.4;
    text-align: center;
    max-width: 76px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   SECTION 2: ADVANCED FILTER SEARCH CONSOLE (کنسول جستجوی پیشرفته)
   ========================================================================== */
.adv-search-section {
    max-width: 1360px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 1.25rem;
}
.adv-search-card {
    background: linear-gradient(135deg, rgba(16, 22, 40, 0.85) 0%, rgba(9, 13, 25, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(139, 92, 246, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.adv-search-main-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.adv-search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}
.adv-search-input-icon {
    position: absolute;
    right: 14px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.05rem;
    pointer-events: none;
}
.adv-main-input {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 12px;
    padding: 0 44px 0 16px;
    font-size: 0.88rem;
    transition: all 0.25s ease;
    font-family: inherit;
    line-height: 1.8;
}
.adv-main-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.25);
    outline: none;
}
.adv-search-actions-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.adv-toggle-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.15rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}
.adv-toggle-filter-btn:hover, .adv-toggle-filter-btn.active {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.45);
    color: #ffffff;
}
.adv-toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.25s ease;
}
.adv-toggle-filter-btn.active .adv-toggle-icon {
    transform: rotate(180deg);
}
.adv-btn-search {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.45rem;
    background: linear-gradient(135deg, #ff2a6d, #8b5cf6);
    border: none;
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(255, 42, 109, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}
.adv-btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 42, 109, 0.5);
}
.adv-filter-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}
.adv-filter-drawer.is-open {
    max-height: 500px;
    opacity: 1;
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.adv-drawer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: flex-end;
}
.adv-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.adv-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    line-height: 1.8;
}
.adv-select {
    height: 44px;
    background: #0e1424;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 12px;
    padding: 0 0.85rem;
    font-size: 0.84rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}
.adv-select:focus {
    border-color: rgba(139, 92, 246, 0.6);
}
.adv-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

/* ==========================================================================
   SECTION 3: PARENT CATEGORY PORTALS (پورتال‌های اصلی مادر ۵تایی)
   Desktop 5-Col Grid | Mobile Symmetrical 2x2 + Panoramic 5th Card
   ========================================================================== */
.parent-portals-section {
    max-width: 1360px;
    margin: 2rem auto 2.75rem;
    padding: 0 1.25rem;
}
.parent-portals-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.15rem;
    align-items: stretch;
}
.parent-portal-card {
    position: relative;
    min-height: 215px;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem 1.15rem 1rem;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7);
    background: #090d19;
    text-align: right;
    cursor: pointer;
}
.parent-portal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--card-accent, #8b5cf6), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.65;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.parent-portal-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 35px var(--card-glow, rgba(139, 92, 246, 0.4));
    border-color: rgba(255, 255, 255, 0.25);
}
.parent-portal-card:hover::before { opacity: 1; }

.portal-card-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
    filter: brightness(0.55) contrast(1.2);
    z-index: 0;
}
.parent-portal-card:hover .portal-card-backdrop {
    transform: scale(1.08);
    filter: brightness(0.68) contrast(1.25);
}
.portal-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.35) 0%, rgba(6, 10, 20, 0.7) 45%, rgba(3, 6, 14, 0.98) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}
.parent-portal-card:hover .portal-card-overlay {
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.2) 0%, rgba(6, 10, 20, 0.6) 45%, rgba(3, 6, 14, 0.94) 100%);
}
.portal-ambient-glow {
    position: absolute;
    bottom: -25px;
    right: -25px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--card-glow, rgba(139, 92, 246, 0.4)) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(24px);
    transition: transform 0.35s ease, opacity 0.35s ease;
    z-index: 1;
    opacity: 0.7;
}
.parent-portal-card:hover .portal-ambient-glow {
    transform: scale(1.3);
    opacity: 1;
}
.portal-header-row {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.portal-icon-3d-box {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.parent-portal-card:hover .portal-icon-3d-box {
    transform: scale(1.08) rotate(4deg);
}
.portal-count-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    direction: rtl;
}
.portal-body-content {
    position: relative;
    z-index: 2;
    margin-top: auto;
    display: flex;
    flex-direction: column;
}
.portal-title-fa {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1.45;
    margin: 0.5rem 0 0.3rem;
}
.portal-title-fa a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.parent-portal-card:hover .portal-title-fa a {
    color: var(--card-accent, #8b5cf6);
}
.portal-sub-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    min-height: 24px;
}
.portal-sub-pill {
    font-size: 0.68rem;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 2px 7px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.portal-sub-pill:hover {
    background: var(--card-accent, #8b5cf6);
    color: #ffffff;
    border-color: var(--card-accent, #8b5cf6);
}
.portal-sub-tagline {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.6;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.portal-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
    color: #94a3b8;
    transition: color 0.25s ease;
}
.parent-portal-card:hover .portal-action-row { color: #ffffff; }
.portal-action-text-mobile { display: none; }
.portal-action-arrow {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    transition: transform 0.25s ease, background 0.25s ease;
    flex-shrink: 0;
}
.parent-portal-card:hover .portal-action-arrow {
    transform: translateX(-4px);
    background: var(--card-accent, #8b5cf6);
    color: #ffffff;
}

/* ==========================================================================
   SECTION 4: WEEKLY BROADCAST SCHEDULE (جدول پخش هفتگی قالب دیجی‌مدیا)
   ========================================================================== */
.pjadval-sec {
    max-width: 1360px;
    margin: 2.25rem auto 3rem;
    padding: 22px 24px;
    border-radius: 20px;
    background: #0f0f1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}
.jadval-ambient-glow {
    position: absolute;
    top: -50px;
    left: 20%;
    width: 300px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 152, 0, 0.12) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}
.jadval-headline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
    position: relative;
    z-index: 1;
    gap: 15px;
    flex-wrap: wrap;
}
.jadval-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.6;
}
.jadval-title-icon { font-size: 1.35rem; }
.ma-days {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.jadval-day-btn {
    padding: 7px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #a0a0b8;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.jadval-day-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}
.jadval-day-btn.active {
    background: #ff9800 !important;
    color: #fff !important;
    border-color: #ff9800 !important;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}
.day-count-badge {
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 800;
}
.jadval-subtabs-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}
.jadval-subtabs-label {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 700;
    margin-left: 4px;
}
.jadval-subtab-pill {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.jadval-subtab-pill.active {
    border-color: #ff9800;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 152, 0, 0.3);
}
.jadval-subtab-pill:hover:not(.active) {
    background: rgba(255, 152, 0, 0.15);
    color: #fff;
    border-color: rgba(255, 152, 0, 0.3);
}
.jadval-post-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.25s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.jadval-post-row a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #fff;
    gap: 14px;
    width: 100%;
}
.jadval-post-row:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 152, 0, 0.3) !important;
    transform: translateX(-4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.jadval-post-row .thumb {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.jadval-post-row .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.jadval-post-row .title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 12px;
}
.jadval-post-row .title-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
    text-align: right;
}
.jadval-post-row .en-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: right;
    unicode-bidi: isolate;
    transition: color 0.2s ease;
}
.jadval-post-row:hover .en-title {
    color: #ff9800 !important;
}
.jadval-post-row .fa-title {
    font-size: 0.78rem;
    color: #ff9800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}
.jadval-post-row .update-pill {
    font-size: 0.74rem;
    color: #fff;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 8px;
    padding: 5px 14px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 152, 0, 0.25);
}

/* ==========================================================================
   SECTION 5: UNIFIED ARCHIVE ANALYTICS INFOGRAPHIC (اینفوگرافیک آمار جامع)
   ========================================================================== */
.unified-archive-analytics-section {
    max-width: 1360px;
    margin: 2.5rem auto 3.5rem;
    padding: 0 1.25rem;
}
.unified-analytics-glass-card {
    position: relative;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9) 0%, rgba(10, 15, 28, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.75rem 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(139, 92, 246, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}
.unified-ambient-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}
.unified-analytics-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.15rem;
    margin-bottom: 1.5rem;
}
.unified-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.unified-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(255, 42, 109, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
}
.unified-main-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
}
.unified-sub-title {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 2px 0 0;
    line-height: 1.85;
}
.unified-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
}
.pulse-green-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.unified-analytics-body {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 2.25rem;
    align-items: center;
    margin-bottom: 1.75rem;
}
.unified-chart-column {
    display: flex;
    justify-content: center;
    align-items: center;
}
.donut-chart-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
}
.donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.donut-track {
    fill: transparent;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 16;
}
.donut-slice {
    fill: transparent;
    stroke-width: 16;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}
.slice-anime { stroke: #8b5cf6; }
.slice-movie { stroke: #0ea5e9; }
.slice-series { stroke: #ec4899; }
.slice-manga { stroke: #f59e0b; }

.donut-center-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
}
.donut-center-num {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
}
.donut-center-lbl {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 700;
    margin-top: 2px;
}

.unified-breakdown-column {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.breakdown-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.breakdown-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    font-weight: 800;
    color: #e2e8f0;
}
.breakdown-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-anime { background: #8b5cf6; box-shadow: 0 0 8px #8b5cf6; }
.dot-movie { background: #0ea5e9; box-shadow: 0 0 8px #0ea5e9; }
.dot-series { background: #ec4899; box-shadow: 0 0 8px #ec4899; }
.dot-manga { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

.breakdown-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 700;
}
.breakdown-badge {
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 900;
}
.badge-anime { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.badge-movie { background: rgba(14, 165, 233, 0.2); color: #7dd3fc; }
.badge-series { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.badge-manga { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }

.breakdown-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
}
.breakdown-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.fill-anime { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.fill-movie { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.fill-series { background: linear-gradient(90deg, #ec4899, #f472b6); }
.fill-manga { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.unified-metrics-bar {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.15rem;
}
.metric-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.metric-value {
    color: #ffffff;
    font-weight: 800;
}
.metric-pill.highlight-free {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-weight: 800;
    margin-right: auto;
}

/* ==========================================================================
   MODALS: STORY PLAYER & ONLINE TRAILER PLAYER
   Strictly Hidden by Default (display: none !important) until activated
   ========================================================================== */
.story-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(3, 7, 18, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    z-index: 999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}
.story-modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Trailer Modal Content */
.trailer-modal-dialog {
    position: relative;
    width: 90%;
    max-width: 800px;
    aspect-ratio: 16/9;
    background: #000000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 42, 109, 0.4);
    border: 1px solid rgba(255, 42, 109, 0.4);
}
.trailer-modal-header {
    position: absolute;
    top: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}
.trailer-modal-title {
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    text-shadow: 0 2px 8px #000;
    line-height: 1.5;
}
.trailer-close-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.trailer-close-btn:hover {
    background: #ff2a6d;
    border-color: #ff2a6d;
    transform: scale(1.1);
}

/* Story Player Modal Card */
.story-player-card {
    position: relative;
    width: 94%;
    max-width: 420px;
    height: 85vh;
    max-height: 760px;
    background: #060913;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(139, 92, 246, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
}
.story-progress-bars {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    z-index: 25;
}
.story-progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    overflow: hidden;
}
.story-progress-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    border-radius: 2px;
    transition: width 0.1s linear;
}
.story-player-header {
    position: absolute;
    top: 20px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 25;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
    padding: 6px 8px;
    border-radius: 12px;
}
.story-video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.story-video-element.is-covered {
    object-fit: cover;
}
.story-caption-box {
    position: absolute;
    bottom: 16px;
    left: 14px;
    right: 14px;
    z-index: 25;
    background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, transparent 100%);
    padding: 24px 12px 10px;
    border-radius: 14px;
    text-align: right;
}
.story-caption-text {
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.8;
    margin-bottom: 8px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
.story-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #ff2a6d, #8b5cf6);
    color: #fff;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 42, 109, 0.4);
}
.story-nav-touch-left,
.story-nav-touch-right {
    position: absolute;
    top: 60px;
    bottom: 80px;
    width: 40%;
    z-index: 15;
    cursor: pointer;
}
.story-nav-touch-left { left: 0; }
.story-nav-touch-right { right: 0; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (LAPTOP / TABLET / MOBILE REFINEMENT)
   ========================================================================== */

/* Medium Tablet & Small Laptops (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .parent-portals-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
    .parent-portal-card:nth-child(4),
    .parent-portal-card:nth-child(5) {
        grid-column: span 1;
    }
    .adv-drawer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .unified-analytics-body {
        grid-template-columns: 130px 1fr;
        gap: 1.5rem;
    }
}

/* Standard Mobile (< 768px) */
@media (max-width: 767px) {
    /* 1. Stories Track Mobile */
    .stories-container-section {
        margin: 0.75rem auto 1.35rem !important;
        padding: 0 0.75rem !important;
    }
    .stories-header-title {
        font-size: 0.94rem !important;
    }
    .stories-header-hint {
        font-size: 0.74rem !important;
    }
    .stories-scroll-track {
        gap: 0.85rem !important;
        padding: 0.75rem 0.65rem !important;
        border-radius: 18px !important;
    }
    .story-ring-wrapper {
        width: 54px !important;
        height: 54px !important;
    }
    .story-badge-count {
        font-size: 0.52rem !important;
        padding: 1px 4px !important;
    }
    .story-title-label {
        font-size: 0.68rem !important;
        max-width: 62px !important;
    }

    /* 2. Advanced Search Console Mobile */
    .adv-search-section {
        margin: 0.75rem auto 1.5rem !important;
        padding: 0 0.75rem !important;
    }
    .adv-search-card {
        padding: 0.9rem 0.85rem !important;
        border-radius: 16px !important;
    }
    .adv-search-main-bar {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .adv-search-input-wrapper {
        width: 100% !important;
    }
    .adv-main-input {
        height: 44px !important;
        font-size: 0.84rem !important;
        padding: 0 38px 0 12px !important;
        border-radius: 10px !important;
    }
    .adv-search-actions-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .adv-toggle-filter-btn, .adv-btn-search {
        height: 42px !important;
        font-size: 0.82rem !important;
        justify-content: center !important;
        width: 100% !important;
        border-radius: 10px !important;
        padding: 0 0.5rem !important;
    }
    .adv-drawer-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .adv-select {
        height: 42px !important;
        font-size: 0.82rem !important;
    }
    .adv-results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
    }

    /* 3. Parent Category Portals Mobile: Perfect 2x2 Grid + Sleek Panoramic 5th Card */
    .parent-portals-section {
        margin: 1.25rem auto 1.85rem !important;
        padding: 0 0.75rem !important;
    }
    .shelf-main-heading {
        font-size: 1.05rem !important;
    }
    .shelf-sub-heading {
        font-size: 0.72rem !important;
        line-height: 1.65 !important;
    }
    .shelf-icon-badge {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.15rem !important;
        border-radius: 10px !important;
    }
    .parent-portals-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
    }
    .parent-portal-card {
        min-height: 132px !important;
        height: 132px !important;
        padding: 0.75rem 0.65rem !important;
        border-radius: 14px !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important;
    }
    .portal-icon-3d-box {
        width: 34px !important;
        height: 34px !important;
        font-size: 1.15rem !important;
        border-radius: 9px !important;
    }
    .portal-count-chip {
        font-size: 0.62rem !important;
        padding: 2px 6px !important;
        border-radius: 6px !important;
        gap: 3px !important;
    }
    .portal-title-fa {
        font-size: 0.88rem !important;
        font-weight: 800 !important;
        line-height: 1.35 !important;
        margin: 0.35rem 0 0.2rem !important;
    }
    .portal-sub-pills-row {
        display: none !important; /* Kept hidden on 2x2 mobile cards to guarantee 100% equal card heights */
    }
    .portal-action-row {
        padding-top: 0.35rem !important;
        font-size: 0.68rem !important;
    }
    .portal-action-text {
        display: none !important;
    }
    .portal-action-text-mobile {
        display: inline-block !important;
        font-size: 0.68rem !important;
        font-weight: 800 !important;
        color: var(--card-accent, #ff758c) !important;
    }
    .portal-action-arrow {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.75rem !important;
    }

    /* 🌟 The 5th Card (Manga & Manhwa) Transforms into a Sleek Panoramic Banner */
    .parent-portal-card:last-child:nth-child(odd) {
        grid-column: span 2 !important;
        min-height: 74px !important;
        height: auto !important;
        padding: 0.65rem 0.85rem !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .parent-portal-card:last-child:nth-child(odd) .portal-header-row {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        order: 1 !important;
    }
    .parent-portal-card:last-child:nth-child(odd) .portal-body-content {
        margin-top: 0 !important;
        order: 2 !important;
        flex: 1 !important;
        padding: 0 8px !important;
    }
    .parent-portal-card:last-child:nth-child(odd) .portal-title-fa {
        margin: 0 !important;
        font-size: 0.92rem !important;
    }
    .parent-portal-card:last-child:nth-child(odd) .portal-sub-pills-row {
        display: block !important;
        min-height: auto !important;
        margin-bottom: 0 !important;
    }
    .parent-portal-card:last-child:nth-child(odd) .portal-sub-tagline {
        font-size: 0.66rem !important;
        color: #fcd34d !important;
    }
    .parent-portal-card:last-child:nth-child(odd) .portal-action-row {
        order: 3 !important;
        border-top: none !important;
        padding-top: 0 !important;
        gap: 6px !important;
    }

    /* 4. Weekly Broadcast Schedule Mobile */
    .pjadval-sec {
        padding: 14px 12px !important;
        margin: 1.25rem auto 2rem !important;
        border-radius: 16px !important;
    }
    .jadval-headline {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding-bottom: 12px !important;
    }
    .jadval-title {
        font-size: 0.98rem !important;
    }
    .ma-days {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 2px 2px 6px !important;
    }
    .ma-days::-webkit-scrollbar { display: none; }
    .jadval-day-btn {
        flex: 0 0 auto !important;
        padding: 6px 13px !important;
        font-size: 0.76rem !important;
        border-radius: 14px !important;
    }
    .jadval-subtabs-nav {
        overflow-x: auto !important;
        scrollbar-width: none !important;
        padding-bottom: 8px !important;
        gap: 6px !important;
    }
    .jadval-subtabs-nav::-webkit-scrollbar { display: none; }
    .jadval-subtab-pill {
        flex: 0 0 auto !important;
        font-size: 0.72rem !important;
        padding: 4px 10px !important;
    }
    .jadval-post-row a {
        padding: 8px 10px !important;
        gap: 10px !important;
    }
    .jadval-post-row .thumb {
        width: 40px !important;
        height: 40px !important;
        border-radius: 8px !important;
    }
    .jadval-post-row .en-title {
        font-size: 0.82rem !important;
    }
    .jadval-post-row .fa-title {
        font-size: 0.7rem !important;
    }
    .jadval-post-row .update-pill {
        font-size: 0.65rem !important;
        padding: 3px 8px !important;
    }

    /* 5. Unified Archive Analytics Infographic Mobile */
    .unified-archive-analytics-section {
        margin: 1.25rem auto 2rem !important;
        padding: 0 0.75rem !important;
    }
    .unified-analytics-glass-card {
        padding: 1rem 0.85rem !important;
        border-radius: 18px !important;
    }
    .unified-analytics-header {
        margin-bottom: 0.85rem !important;
        padding-bottom: 0.65rem !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    .unified-header-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.2rem !important;
        border-radius: 10px !important;
    }
    .unified-main-title {
        font-size: 0.98rem !important;
    }
    .unified-sub-title {
        display: none !important; /* Space saver for mobile */
    }
    .unified-status-badge {
        font-size: 0.68rem !important;
        padding: 0.25rem 0.6rem !important;
    }
    .unified-analytics-body {
        grid-template-columns: 1fr !important;
        gap: 1.15rem !important;
        margin-bottom: 1rem !important;
    }
    .donut-chart-wrapper {
        width: 110px !important;
        height: 110px !important;
        margin: 0 auto !important;
    }
    .donut-center-num {
        font-size: 1.1rem !important;
    }
    .donut-center-lbl {
        font-size: 0.62rem !important;
    }
    .unified-breakdown-column {
        gap: 0.65rem !important;
        width: 100% !important;
    }
    .breakdown-label {
        font-size: 0.78rem !important;
        gap: 0.4rem !important;
    }
    .breakdown-meta {
        font-size: 0.72rem !important;
        gap: 0.4rem !important;
    }
    .breakdown-badge {
        font-size: 0.65rem !important;
        padding: 1px 5px !important;
    }
    .breakdown-track {
        height: 6px !important;
    }
    .unified-metrics-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
        padding-top: 0.85rem !important;
    }
    .metric-pill {
        font-size: 0.72rem !important;
        padding: 0.4rem 0.55rem !important;
        border-radius: 10px !important;
        justify-content: center !important;
        text-align: center !important;
    }
    .metric-pill.highlight-free {
        grid-column: span 2 !important;
        text-align: center !important;
        justify-content: center !important;
        margin-right: 0 !important;
        font-size: 0.74rem !important;
        padding: 0.5rem 0.6rem !important;
    }
}

/* Extra Small Mobile (< 400px) */
@media (max-width: 400px) {
    .parent-portals-grid {
        gap: 0.5rem !important;
    }
    .parent-portal-card {
        min-height: 124px !important;
        height: 124px !important;
        padding: 0.65rem 0.55rem !important;
    }
    .portal-title-fa {
        font-size: 0.82rem !important;
    }
    .portal-icon-3d-box {
        width: 30px !important;
        height: 30px !important;
        font-size: 1rem !important;
    }
    .portal-count-chip {
        font-size: 0.58rem !important;
        padding: 1px 5px !important;
    }
    .parent-portal-card:last-child:nth-child(odd) {
        min-height: 68px !important;
        padding: 0.55rem 0.65rem !important;
    }
}