@font-face{
  font-family:"IRANYekanX";
  src:url("./assets/fonts/IRANYekanX-Regular.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"IRANYekanX";
  src:url("./assets/fonts/IRANYekanX-Bold.woff2") format("woff2");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}

:root{
  --bg:#1c1c1c;

  --glass: rgba(12,13,16,.72);
  --line: rgba(255,255,255,.10);

  --text:#f2f4f8;
  --muted: rgba(242,244,248,.72);
  --muted2: rgba(242,244,248,.55);

  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --shadow2: 0 12px 36px rgba(0,0,0,.42);

  --stage: 1320px;
  --navH: 66px;

  --searchColor: #703a3a;
  --pillColor: #3f160d;

  --headerH: 45px; /* سرچ */
  --pillH: 40px;   /* دسته بندی */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:"IRANYekanX", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  overflow-x:hidden;
  padding-bottom: calc(var(--navH) + env(safe-area-inset-bottom));
}

/* ===== Background ===== */
body::before{
  content:"";
  position:fixed;
  inset:0;
  background-image:url("./assets/bg/bg.png");
  background-repeat:no-repeat;
  background-position:center center;
  background-size:cover;
  opacity:1;
  pointer-events:none;
  z-index:0;
}

.app, .sideNav, .bottomNav, .userDock{ position:relative; z-index:1; }

/* =========================
   Main app
========================= */
.app{
  min-height:100dvh;
  padding:16px 14px 18px;
}

/* =========================
   Header (PCMODTV)
========================= */
.pcmodHeader{
  max-width: var(--stage);
  margin: 0 auto;
  padding: 14px 0 12px;
}

.pcmodHeaderRow{
  display:flex;
  align-items:center;
  gap:18px;
  justify-content:space-between;
}

/* 1) Welcome (right) */
.pcmodWelcome{ min-width:260px; text-align:right; }
.pcmodWelcomeTitle{ font-weight:800; font-size:32px; line-height:1.05; }
.pcmodWelcomeSub{
  margin-top:6px;
  font-size:12px;
  color:rgba(255,255,255,.82);
  line-height:1.6;
}

/* 2) Search */
.pcmodSearchWrap{
  position:relative;
  flex:1;
  max-width:720px;
  height: var(--headerH);
  border-radius:999px;
  background: var(--searchColor);
  display:flex;
  align-items:center;
  padding: 0 14px;
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 12px 36px rgba(0,0,0,.25);
}
.pcmodSearch{
  flex:1;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#fff;
  font-size:13px;
  font-family:inherit;
  padding: 0 10px 0 44px;
}
.pcmodSearch::placeholder{ color:rgba(255,255,255,.75); }
.pcmodSearchBtn{
  position:absolute;
  left:10px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border:0;
  background:transparent;
  color:#fff;
  font-size:16px;
  cursor:pointer;
  opacity:.95;
}

/* 3) PCMODTV logo */
.pcmodBrand{ display:flex; align-items:center; justify-content:center; }
.pcmodBrandLogo{ width:210px; height:auto; display:block; }

/* 4) Social icons (PNG pure, 45x45, no filter/no border/no bg) */
.pcmodSocial{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:180px;
  justify-content:flex-start;
}

.pcmodSocialBtn{
  width:45px;
  height:45px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;

  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  border-radius:0 !important;
  overflow:visible !important;
}

.pcmodSocialBtn img{
  width:45px !important;
  height:45px !important;
  display:block !important;
  object-fit:contain !important;

  filter:none !important;
  background:none !important;
  box-shadow:none !important;
  border:0 !important;
  outline:0 !important;

  image-rendering:auto;
}

/* =========================
   Categories pills row
   (NO container background)
   Each pill has --pillColor
========================= */
.pcmodCatsRow{
  max-width: var(--stage);
  margin: 10px auto 0;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  padding:0; /* کانتینر جدا نداریم */
}

.pcmodPill,
.pcmodCatsRow .chip{
  height: var(--pillH);
  padding: 0 22px;
  border-radius:999px;
  font-size:12px;
  cursor:pointer;
  font-family:inherit;
  color:#fff;
  background: var(--pillColor);
  border:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}

.pcmodPill.active,
.pcmodCatsRow .chip.active{
  background: rgba(63,22,13,.88);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}

/* فاصله کوچیک بین دسته‌بندی‌ها و گرید */
.stage{ max-width:var(--stage); margin: 16px auto 0; }

/* =========================
   Grid + Cards
========================= */
.grid{
  display:grid;
  gap:14px;
  grid-template-columns:1fr;
}

.card{
  position:relative;
  cursor:pointer;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  overflow:hidden;
  box-shadow: var(--shadow2);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  contain: layout paint;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,.16);
}
.cardLink{ position:absolute; inset:0; z-index:6; display:block; }

.thumb{
  position:relative;
  width:100%;
  aspect-ratio: 9 / 16;
  background:#000;
  overflow:hidden;
  transform: translateZ(0);
}
.thumbVideo,
.thumbImg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  display:block;
  transform: translateZ(0);
  backface-visibility:hidden;
}

.thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(to top, rgba(0,0,0,.55), transparent 55%),
    radial-gradient(800px 300px at 50% 0%, rgba(255,255,255,.06), transparent 60%);
  pointer-events:none;
  z-index:2;
}

.badge{
  position:absolute;
  top:10px; right:10px;
  padding:6px 10px;
  font-size:11px;
  border-radius:999px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index:3;
}

.metaRow{ padding:12px 12px 14px; position:relative; z-index:4; }
.metaRow .h{ font-weight:700; font-size:13px; }
.metaRow .p{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.7;
  max-height:2.9em;
  overflow:hidden;
}

/* =========================
   Bottom nav
========================= */
.bottomNav{
  position:fixed;
  left:0; right:0; bottom:0;
  height: var(--navH);
  display:flex;
  justify-content:space-around;
  align-items:center;
  background: rgba(12,13,16,.92);
  border-top:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index:60;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomNav .tab{
  width:48px; height:48px;
  display:flex; align-items:center; justify-content:center;
  border-radius:18px;
  color:#fff;
  font-size:19px;
  text-decoration:none;
}
.bottomNav .tab.active{
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
}

/* =========================
   User dock
========================= */
.userDock{
  position:fixed;
  left:14px;
  bottom: calc(var(--navH) + 14px + env(safe-area-inset-bottom));
  z-index:80;
}
.userBtn{
  display:flex;
  align-items:center;
  gap:10px;
  height:44px;
  padding:10px 12px;
  border-radius:18px;
  background: rgba(12,13,16,.45);
  border:1px solid rgba(255,255,255,.14);
  color:var(--text);
  cursor:pointer;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-family:inherit;
}
.userAvatar{
  width:38px; height:38px;
  border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  font-size:20px;
}
.userText{ display:flex; flex-direction:column; line-height:1.2; text-align:right; }
.uName{ font-weight:700; font-size:13px; }
.uRole{ margin-top:4px; font-size:11px; color:var(--muted2); }
.userChevron{ opacity:.85; }

.userPop{
  position:absolute;
  left:0;
  bottom:58px;
  min-width:240px;
  background: rgba(12,13,16,.92);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding:8px;
  display:none;
}
.userPop.open{ display:block; }

.popItem{
  display:flex; align-items:center; gap:10px;
  padding:10px 10px;
  border-radius:14px;
  text-decoration:none;
  color:var(--text);
  border:1px solid transparent;
  font-size:12px;
  font-weight:700;
}
.popItem:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}
.popSep{ height:1px; background: rgba(255,255,255,.08); margin:8px 6px; }
.soon{
  margin-right:auto;
  font-weight:400;
  font-size:10px;
  padding:4px 8px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  color:var(--muted);
}

/* =========================================================
   Sidebar - NEW glass version (override old sidebar cleanly)
   (این بخش “پایین‌تر” میاد تا برنده‌ی CSS بشه)
========================================================= */
@media (min-width: 980px){

  .sideNav{
    position: fixed;
    top: 18px;
    right: 18px;
    bottom: 18px;

    width: 310px;
    border-radius: 26px;

    background: rgba(12,13,16,.38);
    border: 1px solid rgba(255,255,255,.12);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    box-shadow: 0 30px 90px rgba(0,0,0,.55);
    z-index: 60;

    padding: 18px 16px;
    display: flex;
    flex-direction: column;
  }

  /* فضای اپ کنار سایدبار */
  .app{
    margin-right: 350px;
    padding: 20px 24px 22px;
  }

  body{ padding-bottom:0; }
  .bottomNav{ display:none; }
  .userDock{ bottom:14px; }
}

/* Header of sidebar (logo + toggle) */
.sideTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.sideLogo{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  text-decoration:none;
}

.sideLogo img{
  height:46px;
  width:auto;
  display:block;
  object-fit:contain;
}

/* Toggle button */
.sideToggle,
.sideCollapse{
  width:40px;
  height:40px;
  border-radius:12px;

  background:#753131;
  border: 1px solid rgba(255,255,255,.12);
  color:#fff;

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;
  box-shadow:0 10px 25px rgba(0,0,0,.35);
  transition: transform .15s ease;
}
.sideToggle:hover{ transform:scale(1.05); }

/* Menu in sidebar */
.sideMenu{
  margin-top: 12px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

/* Item style */
.sideItem{
  position: relative;
  display:flex;
  align-items:center;
  gap: 12px;

  padding: 10px 12px;
  border-radius: 18px;

  text-decoration:none;
  color: var(--text);

  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);

  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.sideItem:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}

.sideItem.active{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
}

/* Icon rectangle 35px */
.sideIconBox{
  width: 35px;
  height: 35px;
  border-radius: 12px;

  background: #753131;
  display:flex;
  align-items:center;
  justify-content:center;

  flex: 0 0 35px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.sideIconBox i{
  font-size: 16px;
  color: #fff;
}

/* Label */
.sideLbl{
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .1px;
}

/* Badge */
.sideBadge{
  margin-right: auto;
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 999px;

  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(242,244,248,.85);
}

/* Divider */
.sideDivider{
  height: 1px;
  background: rgba(255,255,255,.10);
  margin: 8px 6px;
}

.sideBottom{
  margin-top: auto;
  padding-top: 12px;
  text-align:center;
  opacity: .9;
}
.sideBottom .tiny{
  font-size: 11px;
  color: rgba(242,244,248,.65);
}

/* Collapsed state */
.sideNav.collapsed{ width:92px; }

.sideNav.collapsed .sideLbl,
.sideNav.collapsed .sideBadge,
.sideNav.collapsed .sideGroupTitle{
  display:none;
}

.sideNav.collapsed .sideMenu{
  align-items:center;
}

.sideNav.collapsed .sideItem{
  justify-content:center;
}

/* وقتی منو بسته شد، لوگو و دکمه وسط و ستونی */
.sideNav.collapsed .sideTop{
  justify-content:center;
  gap:10px;
  padding-bottom:16px;
  flex-direction:column; /* ✅ */
}

/* ✅ دکمه رو مخفی نکن! */
.sideNav.collapsed #sideToggle{
  display:flex;
  width:38px;
  height:38px;
}

/* لوگوی سمبل، دقیق و خوش‌فرم */
.sideNav.collapsed .sideLogo img{
  height:42px;
  width:42px;
}


/* =========================================================
   Responsive
========================================================= */
@media (min-width:520px){ .grid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (min-width:720px){ .grid{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (min-width:1100px){ .grid{ grid-template-columns:repeat(4, minmax(0,1fr)); } }

@media (max-width:900px){
  .pcmodHeaderRow{ flex-wrap:wrap; gap:12px; }
  .pcmodWelcome{ min-width:100%; }
  .pcmodSearchWrap{ max-width:100%; }
  .pcmodBrandLogo{ width:180px; }
  .pcmodSocial{ min-width:140px; }
}

@media (max-width:420px){
  .userText{ display:none; }
}

@media (max-width: 979px){
  #sideNav{ display:none !important; }
}



/* ===== Mobile header: default hidden ===== */
.mHeader{ display:none; }

/* Mobile: show mobile header, hide desktop header row items */
@media (max-width: 979px){

  .mHeader{ display:block; }

  /* هدر دسکتاپ رو در موبایل کامل مخفی کن (بدون تغییر ساختارش) */
  .pcmodHeaderRow{ display:none !important; }
}

/* Desktop: ensure mobile header never shows */
@media (min-width: 980px){
  .mHeader{ display:none !important; }
}



/* =========================
   Mobile-only header reorder
   (NO desktop changes)
========================= */
@media (max-width: 900px){

  /* 1) Welcome totally hidden on mobile */
  .pcmodWelcome{ display:none !important; }

  /* 2) Header row becomes a 2-row layout */
  .pcmodHeaderRow{
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center;
    gap:12px !important;
  }

  /* 3) Put PCMODTV + Social on top row */
  .pcmodBrand{ order:1 !important; }
  .pcmodSocial{
    order:2 !important;
    margin-right:auto;           /* هل بده به سمت چپ (RTL) */
    justify-content:flex-start;  /* چپ‌چین برای آیکن‌ها */
    min-width:auto !important;
  }

  /* 4) Search goes under them as full width */
  .pcmodSearchWrap{
    order:3 !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Optional: logo size a bit better on mobile */
  .pcmodBrandLogo{ width: 190px !important; }
}



/* =========================================================
   MOBILE BOTTOM NAV — FINAL (capsule + center orange, no bump)
   - Edge padding fixed (first/last not stuck)
   - Hover/active mild (no overflow)
   - Active halo INSIDE (no bleeding out)
   Desktop untouched
========================================================= */
@media (max-width:979px){

  .bottomNav{
    position:fixed;
    left:0; right:0; bottom:0;

    height: calc(92px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);

    display:flex;
    justify-content:center;
    align-items:center;

    padding-left: 16px;
    padding-right: 16px;

    gap: 14px;

    background:transparent !important;
    border:0 !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;

    z-index:999;
  }

  /* Capsule frame */
  .bottomNav::before{
    content:"";
    position:absolute;

    left:24px;
    right:24px;
    bottom: calc(14px + env(safe-area-inset-bottom));

    height:64px;
    border-radius:999px;

    background: rgba(190,190,190,.72);
    border:1px solid rgba(255,255,255,.35);

    box-shadow:0 20px 55px rgba(0,0,0,.55);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);

    z-index:0;
  }

  /* Remove gray center bump */
  .bottomNav::after{
    content:none !important;
  }

  /* Tabs */
  .bottomNav .tab{
    position:relative;
    z-index:2;

    width:56px;
    height:56px;
    border-radius:18px;

    display:flex;
    align-items:center;
    justify-content:center;

    text-decoration:none;

    /* prevent any halo bleed */
    overflow:hidden;

    transition: background .16s ease, box-shadow .16s ease;
  }

  /* Push first/last inward so they never touch capsule edges */
  .bottomNav .tab:first-child{ margin-right: 10px; } /* RTL: right side */
  .bottomNav .tab:last-child{  margin-left:  10px; } /* RTL: left side */

  /* Base icons */
  .bottomNav .navIco{
    width:28px;
    height:28px;
    display:block;
    object-fit:contain;

    opacity:.96;
    transition: opacity .16s ease, filter .16s ease;
    filter: drop-shadow(0 8px 14px rgba(0,0,0,.25));
  }

  /* Normalize Save icon size (often visually smaller) */
  .bottomNav .tab[href*="favorites"] .navIco{
    width:26px;
    height:26px;
  }

  /* Hover (mild, no scale/translate) */
  .bottomNav .tab:hover{
    background: rgba(255,255,255,.12);
    box-shadow: 0 8px 18px rgba(0,0,0,.26);
  }
  .bottomNav .tab:hover .navIco{
    opacity: 1;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,.30));
  }

/* ===== REMOVE ACTIVE HALO COMPLETELY ===== */

.bottomNav .tab.active:not(.tabCenter){
  background: rgba(255,255,255,.08);  /* فقط یک tint خیلی سبک */
  border: none;
  box-shadow: none;
  transform: none;
}

.bottomNav .tab.active:not(.tabCenter):hover{
  background: rgba(255,255,255,.10);
  border: none;
  box-shadow: none;
}


  /* ===== CENTER BUTTON ===== */
  .bottomNav .tabCenter{
    width:72px;
    height:72px;
    border-radius:999px;

    transform: translateY(-22px);

    background:#ff5b2e !important;
    border:1px solid rgba(255,255,255,.45);

    box-shadow:
      0 18px 45px rgba(0,0,0,.62),
      0 0 0 10px rgba(255,91,46,.23);

    /* allow glow for center button */
    overflow: visible;

    transition: transform .16s ease, box-shadow .16s ease;
  }

  .bottomNav .tabCenter:hover{
    transform: translateY(-23px);
    box-shadow:
      0 18px 45px rgba(0,0,0,.64),
      0 0 0 10px rgba(255,91,46,.25);
  }

  .bottomNav .navIcoCenter{
    width:32px;
    height:32px;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,.35));
  }
}

