:root {
        font-family: system-ui, "Segoe UI", Tahoma, sans-serif;
        --bg: #141414;
        --bar: #1c1c1c;
        --field: #262626;
        --text: #f5f5f5;
        --muted: #a3a3a3;
        --border: #404040;
        --btn: #525252;
        --btn-hover: #636363;
        --accent: #e50914;
      }
      * {
        box-sizing: border-box;
      }
      body {
        margin: 0;
        min-height: 100vh;
        background: #000;
        color: var(--text);
        text-align: right;
      }
      .header {
        position: sticky;
        top: 0;
        z-index: 50;
        background: #000;
        padding: 1rem 3rem 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      }
      .header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1rem;
      }
      .logo {
        font-size: 1.35rem;
        font-weight: 800;
        color: var(--accent);
        margin: 0;
      }
      .logo-link {
        display: inline-flex;
        align-items: center;
        text-decoration: none;
        line-height: 0;
      }
      .logo-img {
        display: block;
        height: 2rem;
        width: auto;
        max-width: 10rem;
        object-fit: contain;
      }
      .site-footer {
        position: relative;
        width: 100%;
        margin-top: 5rem;
        border-top: 1px solid #3a3a3c;
        background: #1c1c1e;
        color: #a3a3a3;
        --site-container-max: 1920px;
        --site-container-x: 1rem;
        --site-footer-split-gap: 30px;
        --footer-copy-font: 0.75rem;
        --footer-copy-line-height: 1.55;
        --footer-copy-line-gap: 0.2rem;
        --footer-inner-padding-y: 1.25rem;
        --footer-social-font: 0.75rem;
        --footer-social-font-weight: 500;
        --footer-social-line-height: 1.25;
        --footer-social-icon-size: 1rem;
      }
      @media (min-width: 768px) {
        .site-footer {
          --site-container-x: 3rem;
          --footer-inner-padding-y: 1.5rem;
        }
      }
      @media (min-width: 1280px) {
        .site-footer {
          --site-container-x: 3.5rem;
        }
      }
      .site-footer__inner {
        width: 100%;
        max-width: var(--site-container-max);
        margin: 0 auto;
        padding: var(--footer-inner-padding-y) var(--site-container-x);
        padding-bottom: max(var(--footer-inner-padding-y), env(safe-area-inset-bottom, 0px));
      }
      @media (min-width: 768px) {
        .site-footer__inner {
          padding-block: var(--footer-inner-padding-y);
          padding-bottom: max(var(--footer-inner-padding-y), env(safe-area-inset-bottom, 0px));
        }
      }
      .site-footer__row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        width: 100%;
      }
      .site-footer__center {
        flex: 0 1 auto;
        order: 1;
      }
      .site-footer__row:not(:has(.site-footer__social)) {
        justify-content: flex-start;
      }
      .site-footer__copy {
        display: block;
        direction: rtl;
        width: auto;
        flex: 0 1 auto;
        margin: 0;
        padding: 0;
        border: 0;
        text-align: right;
        font-size: var(--footer-copy-font);
        line-height: var(--footer-copy-line-height);
        color: #8e8e93;
      }
      .site-footer__copy-line {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.35em;
        width: auto;
        max-width: 100%;
        text-align: right;
        direction: rtl;
        white-space: nowrap;
      }
      .site-footer__copy-link {
        color: inherit;
        text-decoration: underline;
        text-underline-offset: 0.15em;
        text-decoration-thickness: 1px;
      }
      .site-footer__copy-link:hover {
        color: inherit;
        text-decoration: underline;
      }
      .site-footer__copy-mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
        font-size: 1em;
        font-weight: 400;
        line-height: 1;
        color: inherit;
      }
      .site-footer__wordmark {
        display: block;
        text-decoration: none;
        color: #a3a3a3;
        font-size: 1.0625rem;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
      }
      .site-footer__social {
        flex: 0 1 auto;
        order: 2;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
      .site-footer__social-list {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 0.55rem 0.9rem;
        margin: 0;
        padding: 0;
        list-style: none;
        width: max-content;
        max-width: 100%;
      }
      .site-footer__social-list > li {
        display: flex;
        align-items: center;
      }
      .site-footer__social-link {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        text-decoration: none;
        font-size: var(--footer-social-font);
        font-weight: var(--footer-social-font-weight);
        line-height: var(--footer-social-line-height);
        color: #8e8e93;
        transition: color 0.2s ease;
      }
      .site-footer__social-link:hover {
        color: #a3a3a3;
      }
      .site-footer__social-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: var(--footer-social-icon-size);
        height: var(--footer-social-icon-size);
        line-height: 0;
      }
      .site-footer__social-link img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        opacity: 0.65;
      }
      .site-footer__social-link:hover img {
        opacity: 0.85;
      }
      .site-footer__social-label {
        display: block;
        line-height: var(--footer-social-line-height);
        white-space: nowrap;
        color: inherit;
      }
      @media (max-width: 767px) {
        .site-footer {
          --footer-copy-font: 0.6875rem;
        }
        .site-footer__row {
          flex-direction: column;
          align-items: stretch;
          gap: 0.75rem;
        }
        .site-footer__center {
          order: 1;
          align-self: flex-start;
          width: auto;
          max-width: 100%;
        }
        .site-footer__social {
          order: 2;
          align-self: flex-end;
          width: 100%;
        }
        .site-footer__social-list {
          gap: 0.45rem 0.75rem;
        }
        .site-footer__copy {
          font-size: var(--footer-copy-font);
        }
      }
      .site-social__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 1.35rem;
        height: 1.35rem;
        line-height: 0;
      }
      .site-social__icon img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
      }
      .header-links {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.65rem;
      }
      .header-links > a {
        color: var(--muted);
        text-decoration: none;
        font-size: 0.9rem;
      }
      .header-links > a:hover {
        color: var(--text);
      }
      /* نوار فیلتر شبیه فیلیمو */
      .filter-bar-wrap {
        padding-bottom: 0.25rem;
      }
      .filter-bar {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        align-items: center;
        gap: 0.65rem;
        background: var(--bar);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 0.85rem 1rem;
      }
      .filter-select-wrap {
        position: relative;
        flex-shrink: 0;
      }
      .filter-select {
        appearance: none;
        -webkit-appearance: none;
        min-width: 7.5rem;
        max-width: 9.5rem;
        padding: 0.55rem 2rem 0.55rem 0.85rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--field);
        color: var(--text);
        font-size: 0.75rem;
        font-family: inherit;
        font-weight: 400;
        cursor: pointer;
        text-align: right;
        direction: rtl;
      }
      .filter-select:hover {
        border-color: #606060;
      }
      .filter-select:focus {
        outline: none;
        border-color: #737373;
      }
      .filter-select-wrap::after {
        content: "▾";
        position: absolute;
        left: 0.65rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        pointer-events: none;
        font-size: 0.75rem;
      }
      .orientation-switch {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        box-sizing: border-box;
        height: 2.35rem;
        min-width: 7.5rem;
        padding: 0 0.9rem;
        border-radius: 0.65rem;
        border: 1px solid var(--border);
        background: var(--field);
        cursor: pointer;
        user-select: none;
        direction: rtl;
      }
      .orientation-switch__label {
        font-size: 0.75rem;
        font-weight: 400;
        color: var(--text);
        line-height: 1;
        white-space: nowrap;
      }
      .orientation-switch__label.is-interactive {
        cursor: pointer;
      }
      .orientation-switch__input {
        appearance: none;
        -webkit-appearance: none;
        flex-shrink: 0;
        width: 2.65rem;
        height: 1.55rem;
        margin: 0;
        border: none;
        border-radius: 999px;
        background: #48484a;
        cursor: pointer;
        position: relative;
        transition: background 0.2s ease;
      }
      .orientation-switch__input::before {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 1.2rem;
        height: 1.2rem;
        border-radius: 50%;
        background: #aeaeb2;
        transition: transform 0.2s ease, background 0.2s ease;
      }
      .orientation-switch__input:checked {
        background: #48484a;
      }
      .orientation-switch__input:checked::before {
        transform: translateX(1.1rem);
        background: #aeaeb2;
      }
      .orientation-switch__input:focus-visible {
        outline: 2px solid #737373;
        outline-offset: 2px;
      }
      .apply-btn {
        flex-shrink: 0;
        padding: 0.6rem 1.35rem;
        border: none;
        border-radius: 8px;
        background: var(--btn);
        color: var(--text);
        font-size: 0.88rem;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        white-space: nowrap;
        transition: background 0.15s;
      }
      .apply-btn--primary {
        background: var(--accent);
        color: #fff;
        font-weight: 700;
      }
      .apply-btn:hover {
        background: var(--btn-hover);
      }
      .apply-btn--primary:hover {
        background: #f40612;
      }
      .apply-btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
      }
      .main {
        padding: 1.25rem 3rem 2.5rem;
      }
      .results-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.25rem;
        font-size: 0.9rem;
        color: var(--muted);
      }
      .clear-link {
        background: none;
        border: none;
        color: var(--muted);
        font-family: inherit;
        font-size: 0.85rem;
        cursor: pointer;
        text-decoration: underline;
        padding: 0;
      }
      .clear-link:hover {
        color: var(--text);
      }
      .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
      }
      @media (min-width: 540px) {
        .grid {
          grid-template-columns: repeat(3, 1fr);
        }
      }
      @media (min-width: 900px) {
        .grid {
          grid-template-columns: repeat(4, 1fr);
          gap: 14px;
        }
      }
      @media (min-width: 1200px) {
        .grid {
          grid-template-columns: repeat(5, 1fr);
        }
      }
      .card {
        display: block;
        position: relative;
        border-radius: 10px;
        overflow: hidden;
        text-decoration: none;
        color: inherit;
        aspect-ratio: 16 / 9;
        background: #111;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
      }
      .card:hover {
        transform: scale(1.04);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
        z-index: 2;
      }
      .card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
      }
      .badge {
        position: absolute;
        top: 8px;
        right: 8px;
        font-size: 0.68rem;
        padding: 0.2rem 0.45rem;
        border-radius: 4px;
        background: rgba(0, 0, 0, 0.72);
        color: #fff;
        pointer-events: none;
      }
      .card-title-overlay {
        position: absolute;
        inset: auto 0 0 0;
        padding: 2rem 0.65rem 0.55rem;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
        font-size: 0.78rem;
        font-weight: 600;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 0;
        transition: opacity 0.2s;
        pointer-events: none;
      }
      .card:hover .card-title-overlay {
        opacity: 1;
      }
      .load-more-wrap {
        display: flex;
        justify-content: center;
        margin-top: 2rem;
      }
      .load-more-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.65rem 1.75rem;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 999px;
        background: transparent;
        color: var(--text);
        font-size: 0.9rem;
        font-family: inherit;
        cursor: pointer;
        transition: border-color 0.15s, background 0.15s;
      }
      .load-more-btn:hover:not(:disabled) {
        border-color: rgba(255, 255, 255, 0.65);
        background: rgba(255, 255, 255, 0.06);
      }
      .load-more-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
      }
      .load-more-btn .arrow {
        font-size: 0.75rem;
        opacity: 0.8;
      }
      .status {
        text-align: center;
        color: var(--muted);
        padding: 2rem 1rem;
      }
      .err {
        color: #f87171;
      }
      .load-sentinel {
        display: none;
      }
      .hidden {
        display: none !important;
      }
      /* جستجو — صفحهٔ اصلی */
      .search-wrap {
        margin-bottom: 1rem;
      }
      .search-bar {
        display: flex;
        align-items: stretch;
        gap: 0.65rem;
        background: var(--bar);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 0.85rem 1rem;
      }
      .search-input {
        flex: 1;
        min-width: 0;
        padding: 0.6rem 0.85rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--field);
        color: var(--text);
        font-size: 0.9rem;
        font-family: inherit;
        text-align: right;
        direction: rtl;
      }
      .search-input::placeholder {
        color: var(--muted);
      }
      .search-input:focus {
        outline: none;
        border-color: #737373;
      }
      .search-live {
        margin-top: 1rem;
      }
      .search-live-status {
        margin: 0 0 0.85rem;
        font-size: 0.85rem;
        color: var(--muted);
        text-align: right;
      }
      .search-live-grid {
        display: grid;
        grid-template-columns: minmax(0, 280px);
        justify-content: start;
        gap: 12px;
      }
      .search-more-wrap {
        margin-top: 1rem;
        display: flex;
        justify-content: flex-start;
      }
      .search-more-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.65rem 1.75rem;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 999px;
        background: transparent;
        color: var(--text);
        font-size: 0.9rem;
        font-family: inherit;
        text-decoration: none;
        cursor: pointer;
        transition: border-color 0.15s, background 0.15s;
      }
      .search-more-btn:hover {
        border-color: rgba(255, 255, 255, 0.65);
        background: rgba(255, 255, 255, 0.06);
      }
      .search-query-label {
        color: var(--text);
        font-weight: 600;
      }
      .filter-select-wrap--custom .filter-select {
        max-width: none;
      }
      @media (max-width: 768px) {
        .header,
        .main {
          padding-left: 1rem;
          padding-right: 1rem;
        }
        .filter-select {
          min-width: 6.5rem;
          max-width: 7.5rem;
          font-size: 0.75rem;
        }
        .filter-select-wrap--custom .filter-select {
          max-width: none;
        }
      }