/* --- 1. الإعدادات العامة --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif !important;
}

a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

a,
button {
    touch-action: manipulation;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

:root {
    --beam-color: #d4af37;
    /* الأساس ذهبي */
}

body {
    background-color: #09090b;
    color: #fff;
    direction: ltr;
    overflow-x: hidden;
}

/* =========================================================
   PREMIUM HEADER
========================================================= */

/* =========================================================
   APF NEW HEADER
========================================================= */

#apf-header-placeholder {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 50000;
}

.apf-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 50000;
}

/* =========================================
   TOP BAR
========================================= */

.apf-topbar {
    position: relative;
    z-index: 20;

    width: 100%;

    background:
        linear-gradient(180deg,
            #101014 0%,
            #09090b 100%);

    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    border-bottom: none;

    box-shadow: none;
}

.apf-topbar-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 8px 28px;

    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(420px, 540px) minmax(260px, 1fr);
    align-items: center;
    gap: 18px;

    direction: ltr;
}

.apf-topbar-right,
.apf-topbar-center,
.apf-topbar-left {
    display: flex;
    align-items: center;

    min-width: 0;
}

.apf-topbar-right {
    grid-column: 1;
    justify-content: flex-start;
    gap: 14px;
}

.apf-topbar-center {
    grid-column: 2;
    justify-content: center;
}

.apf-topbar-left {
    grid-column: 3;
    justify-content: flex-end;
    gap: 10px;
}

.apf-topbar-center .apf-search {
    width: 100%;
    max-width: 540px;
}

.apf-auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.apf-search {
    width: 100%;
    max-width: 540px;
}

/* =========================================
   BRAND
========================================= */

.apf-brand {
    display: flex;
    align-items: center;

    gap: 14px;

    text-decoration: none;

    flex-shrink: 0;

    transition: all 0.3s ease;
}

.apf-brand:hover {
    transform: translateY(-2px);
}

.dynamic-logo {
    width: 50px !important;
    height: 50px !important;

    transition: all 0.4s ease;

    filter: drop-shadow(0 0 12px color-mix(in srgb, var(--beam-color) 35%, transparent));
}

.dynamic-logo > use {
    fill: var(--beam-color);
}

.apf-brand-name {
    font-size: 23px;
    font-weight: 900;

    color: #fff;

    letter-spacing: 0.5px;

    white-space: nowrap;
}

.apf-brand-name span {
    color: var(--beam-color);
}

/* =========================================
   APP LAUNCHER
========================================= */

.apf-app-launcher {
    position: relative;

    flex-shrink: 0;
}

.apf-app-btn {
    width: 44px;
    height: 44px;

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

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.035);

    cursor: pointer;

    flex-shrink: 0;

    transition: all 0.28s ease;
}


.apf-grid-icon {
    width: 24px;
    height: 24px;

    display: block;

    fill: #f4f4f5;

    opacity: 0.95;

    transition: all 0.28s ease;
}

.apf-app-btn:hover {
    border-color: color-mix(in srgb, var(--beam-color) 50%, transparent);
    background: color-mix(in srgb, var(--beam-color) 10%, transparent);
    box-shadow: 0 0 24px color-mix(in srgb, var(--beam-color) 14%, transparent);
    transform: translateY(-1px);
}

.apf-app-btn:hover .apf-grid-icon,
.apf-app-launcher.active .apf-grid-icon {
    fill: var(--beam-color);
}


/* Dropdown */

.apf-app-dropdown {
    position: absolute;

    top: calc(100% + 16px);
    right: auto;
    left: 0;

    width: 352px;

    padding: 12px;

    border-radius: 24px;

    background: rgba(13, 13, 16, 0.96);

    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.55),
        0 0 40px color-mix(in srgb, var(--beam-color) 12%, transparent);

    opacity: 0;
    visibility: hidden;

    transform: translateY(12px) scale(0.96);

    transition: all 0.28s ease;

    z-index: 30;
}

.apf-app-launcher.active .apf-app-dropdown {
    opacity: 1;
    visibility: visible;

    transform: translateY(0) scale(1);
}

.apf-app-dropdown::before {
    content: "";

    position: absolute;

    top: -7px;
    right: auto;
    left: 18px;

    width: 14px;
    height: 14px;

    background: rgba(13, 13, 16, 0.96);

    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);

    transform: rotate(45deg);
}

.apf-app-card {
    --app-accent: var(--beam-color);

    position: relative;

    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 13px;

    min-height: 84px;

    padding: 13px 14px;

    border-radius: 17px;

    text-decoration: none;

    overflow: hidden;

    background:
        radial-gradient(circle at 94% 8%,
            color-mix(in srgb, var(--app-accent) 14%, transparent),
            transparent 46%),
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.018));

    border: 1px solid rgba(255, 255, 255, 0.07);

    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease,
        box-shadow 0.28s ease;
}

.apf-app-card--arab {
    --app-accent: #e1ba32;
}

.apf-app-card--prop {
    --app-accent: #16c79a;
}

.apf-app-card--brokers {
    --app-accent: #3c91ff;
}

.apf-app-card[aria-current="page"] {
    border-color: color-mix(
        in srgb,
        var(--app-accent) 44%,
        rgba(255, 255, 255, 0.08)
    );
}

.apf-app-card:not(:last-child) {
    margin-bottom: 9px;
}

.apf-app-card::after {
    content: "";

    position: absolute;

    width: 92px;
    height: 92px;

    right: -50px;
    top: -52px;

    border-radius: 50%;

    background: color-mix(
        in srgb,
        var(--app-accent) 13%,
        transparent
    );
    filter: blur(12px);
}

.apf-app-card-mark {
    position: relative;
    z-index: 2;

    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    color: var(--app-accent);

    border: 1px solid color-mix(
        in srgb,
        var(--app-accent) 34%,
        rgba(255, 255, 255, 0.06)
    );
    border-radius: 14px;

    background: color-mix(
        in srgb,
        var(--app-accent) 8%,
        rgba(8, 8, 10, 0.92)
    );

    box-shadow:
        inset 0 0 18px color-mix(
            in srgb,
            var(--app-accent) 6%,
            transparent
        ),
        0 8px 24px rgba(0, 0, 0, 0.22);
}

.apf-app-card-mark svg {
    width: 29px;
    height: 29px;
    display: block;
    fill: currentColor;
}

.apf-app-card-copy {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    min-width: 0;

    text-align: left;
}

.apf-app-card strong {
    overflow: hidden;

    font-size: 17px;
    font-weight: 900;

    color: #fff;

    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.apf-app-card small {
    overflow: hidden;

    margin-top: 3px;

    font-size: 11px;
    font-weight: 700;

    color: #a1a1aa;

    line-height: 1.55;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.apf-app-card:hover {
    transform: translateY(-2px);

    border-color: color-mix(
        in srgb,
        var(--app-accent) 62%,
        transparent
    );

    background:
        radial-gradient(circle at 94% 8%,
            color-mix(in srgb, var(--app-accent) 20%, transparent),
            transparent 48%),
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.07),
            rgba(255, 255, 255, 0.022));

    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.32),
        0 0 22px color-mix(
            in srgb,
            var(--app-accent) 8%,
            transparent
        );
}

/* =========================================
   SEARCH
========================================= */

.apf-search {
    flex: 1;

    max-width: 540px;
    height: 44px;

    display: flex;
    align-items: center;

    padding: 0 16px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.03);

    border: 1px solid rgba(255, 255, 255, 0.08);

    transition: all 0.28s ease;
}

.apf-search:focus-within {
    border-color: color-mix(in srgb, var(--beam-color) 50%, transparent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 26px color-mix(in srgb, var(--beam-color) 10%, transparent);
}

.apf-search-submit {
    width: 34px;
    height: 34px;

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

    border: none;
    outline: none;

    background: transparent;

    cursor: pointer;

    margin-right: 10px;

    flex-shrink: 0;
}

.apf-search-icon {
    width: 21px;
    height: 21px;

    display: block;

    fill: none;
    stroke: #f4f4f5;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;

    opacity: 0.95;

    transition: all 0.28s ease;
}

.apf-search-submit:hover .apf-search-icon,
.apf-search:focus-within .apf-search-icon {
    stroke: var(--beam-color);
}

.apf-search input {
    width: 100%;

    border: none;
    outline: none;

    background: transparent;

    color: #fff;

    font-size: 14px;
    font-weight: 700;
}

.apf-search input::placeholder {
    color: #71717a;
}

/* =========================================
   AUTH BUTTONS - COMING SOON
========================================= */

.apf-auth-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 10px;

    flex-shrink: 0;
}

.apf-auth-btn {
    height: 44px;
    text-decoration: none !important;

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

    border: none;
    outline: none;

    border-radius: 999px;

    padding: 0 20px;

    font-size: 14px;
    font-weight: 900;

    cursor: pointer;

    white-space: nowrap;

    transition: all 0.28s ease;
}

.apf-auth-login {
    color: #fff;

    background: rgba(255, 255, 255, 0.045);

    border: 1px solid rgba(255, 255, 255, 0.09);
}

.apf-auth-register {
    color: #09090b;

    background: var(--beam-color);

    box-shadow: 0 0 22px color-mix(in srgb, var(--beam-color) 18%, transparent);
}

.apf-auth-btn:hover {
    transform: translateY(-2px);
}

.apf-auth-login:hover {
    color: var(--beam-color);

    border-color: color-mix(in srgb, var(--beam-color) 45%, transparent);

    background: color-mix(in srgb, var(--beam-color) 10%, transparent);
}

.apf-auth-register:hover {
    box-shadow: 0 12px 32px color-mix(in srgb, var(--beam-color) 26%, transparent);
}

.apf-member-menu {
    position: relative;
}

.apf-member-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 5px 16px 5px 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    cursor: pointer;
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.apf-member-trigger:hover,
.apf-member-menu.active .apf-member-trigger {
    border-color: color-mix(
        in srgb,
        var(--beam-color) 48%,
        transparent
    );
    background: color-mix(
        in srgb,
        var(--beam-color) 10%,
        rgba(255, 255, 255, 0.045)
    );
    transform: translateY(-1px);
}

.apf-member-avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #09090b;
    background: var(--beam-color);
    font-size: 14px;
    font-weight: 900;
}

.apf-member-name {
    max-width: 125px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apf-member-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    z-index: 80;
    width: 270px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.97);
    transform-origin: top right;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: rgba(13, 13, 16, 0.98);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.55),
        0 0 32px color-mix(
            in srgb,
            var(--beam-color) 9%,
            transparent
        );
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        transform 0.22s ease;
}

.apf-member-menu.active .apf-member-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.apf-member-summary {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.apf-member-summary strong {
    color: #fff;
    font-size: 14px;
}

.apf-member-summary small {
    overflow: hidden;
    color: #8f8f98;
    font-size: 11px;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: left;
}

.apf-member-dropdown > a,
.apf-member-dropdown form button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    color: #d4d4d8;
    background: transparent;
    border: 0;
    border-radius: 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.apf-member-dropdown > a:hover,
.apf-member-dropdown form button:hover {
    color: var(--beam-color);
    background: color-mix(
        in srgb,
        var(--beam-color) 10%,
        transparent
    );
}

.apf-member-dropdown form {
    margin: 0;
}

.apf-app-card--account {
    border-color: color-mix(
        in srgb,
        var(--beam-color) 38%,
        rgba(255, 255, 255, 0.07)
    );
}

/* =========================================
   MOBILE ACCOUNT
========================================= */

.apf-mobile-account {
    position: relative;
    display: none;
    flex: 0 0 auto;
}

.apf-mobile-account-trigger {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #f4f4f5;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    cursor: pointer;
    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.apf-mobile-account.active .apf-mobile-account-trigger {
    color: var(--beam-color);
    background: color-mix(
        in srgb,
        var(--beam-color) 10%,
        rgba(255, 255, 255, 0.035)
    );
    border-color: color-mix(
        in srgb,
        var(--beam-color) 55%,
        transparent
    );
    box-shadow: 0 0 22px color-mix(
        in srgb,
        var(--beam-color) 14%,
        transparent
    );
}

.apf-mobile-account-icon {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.apf-mobile-account-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    left: auto;
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    color: #08080a;
    background: var(--beam-color);
    border: 2px solid #08080a;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.apf-mobile-account-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    z-index: 90;
    width: 300px;
    padding: 11px;
    color: #f4f4f5;
    background: rgba(13, 13, 16, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.58),
        0 0 34px color-mix(
            in srgb,
            var(--beam-color) 10%,
            transparent
        );
    opacity: 0;
    visibility: hidden;
    transform: translateY(9px) scale(0.97);
    transform-origin: top right;
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        transform 0.22s ease;
}

.apf-mobile-account.active .apf-mobile-account-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.apf-mobile-account-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 11px 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.apf-mobile-account-summary strong {
    color: #fff;
    font-size: 15px;
}

.apf-mobile-account-summary small {
    overflow: hidden;
    color: #8f8f98;
    font-size: 11px;
    line-height: 1.7;
    text-overflow: ellipsis;
}

.apf-mobile-account-dropdown > a,
.apf-mobile-account-dropdown > form button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 51px;
    padding: 9px 12px;
    color: #d4d4d8;
    background: transparent;
    border: 0;
    border-radius: 12px;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.apf-mobile-account-dropdown > a:hover,
.apf-mobile-account-dropdown > form button:hover {
    color: var(--beam-color);
    background: color-mix(
        in srgb,
        var(--beam-color) 9%,
        transparent
    );
}

.apf-mobile-account-dropdown > a span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.apf-mobile-account-dropdown > a strong {
    color: inherit;
    font-size: 13px;
}

.apf-mobile-account-dropdown > a small {
    color: #7f7f89;
    font-size: 10px;
}

.apf-mobile-account-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    color: #08080a;
    background: var(--beam-color);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.apf-mobile-account-count[hidden],
.apf-mobile-account-badge[hidden] {
    display: none;
}

.apf-mobile-account-dropdown > form {
    margin: 3px 0 0;
    padding-top: 3px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.apf-mobile-account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 0 0;
}

.apf-mobile-account-actions a {
    display: grid;
    place-items: center;
    min-height: 43px;
    color: #fff;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.apf-mobile-account-actions a.is-primary {
    color: #08080a;
    background: var(--beam-color);
    border-color: var(--beam-color);
}

/* Coming Soon Toast */

.apf-soon-toast {
    position: fixed;

    top: 92px;
    left: 50%;

    transform: translateX(-50%) translateY(-12px);

    min-width: 280px;
    max-width: calc(100% - 30px);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;

    padding: 16px 22px;

    border-radius: 18px;

    background:
        linear-gradient(180deg,
            #111114 0%,
            #09090b 100%);

    border: 1px solid color-mix(in srgb, var(--beam-color) 35%, rgba(255, 255, 255, 0.08));

    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.5),
        0 0 35px color-mix(in srgb, var(--beam-color) 14%, transparent);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    z-index: 999999;

    transition: all 0.32s ease;
}

.apf-soon-toast.show {
    opacity: 1;
    visibility: visible;

    transform: translateX(-50%) translateY(0);
}

.apf-soon-toast strong {
    color: var(--beam-color);

    font-size: 16px;
    font-weight: 900;
}

.apf-soon-toast span {
    color: #d4d4d8;

    font-size: 13px;
    font-weight: 700;

    text-align: center;
    line-height: 1.7;
}

/* =========================================
   BOTTOM NAVBAR
========================================= */

.main-nav {
    position: relative;

    width: 100%;

    z-index: 10;

    margin-top: 0;

    background:
        linear-gradient(180deg,
            #09090b 0%,
            #070708 100%);

    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);

    transition: all 0.4s ease;
}

.nav-container {
    max-width: 1350px;

    margin: 0 auto;

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

    padding: 5px 28px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;

    list-style: none;

    gap: 10px;

    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;

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

    padding: 10px 20px;

    border-radius: 14px;

    color: #d4d4d8;

    text-decoration: none;

    font-size: 15px;
    font-weight: 800;

    transition: all 0.3s ease;
}

.nav-links a:hover,
.active-link {
    color: #fff !important;

    background: color-mix(in srgb, var(--beam-color) 14%, transparent);

    box-shadow: 0 8px 25px color-mix(in srgb, var(--beam-color) 15%, transparent);
}

/* =========================================
   CATEGORY NAV - يبقى كما هو
========================================= */

#nav-wrapper {
    position: sticky;

    top: var(--apf-sticky-header-height, 123px);

    z-index: 30000;

    padding-top: 8px;

    background: #09090b;
}

#apf-category-nav {
    background: transparent !important;

    border: none;
}

.nav-inner-box {
    display: flex;
    justify-content: center;

    padding: 0 20px;
}

#apf-nav-container {
    position: relative;

    width: 100%;
    max-width: 560px;

    display: flex;

    padding: 3px;

    border-radius: 999px;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.04);

    backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.06);

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);

    animation: breathing-glow 6s ease-in-out infinite;
}

#apf-nav-container::before {
    content: "";

    position: absolute;

    width: 200%;
    height: 500%;

    top: -200%;
    left: -50%;

    background:
        conic-gradient(
            from 0deg,
            transparent 150deg,
            color-mix(in srgb, var(--beam-color) 60%, transparent) 180deg,
            transparent 210deg
        );

    animation: snake-rotate 10s linear infinite;

    z-index: -1;
}

#apf-nav-container::after {
    content: "";

    position: absolute;

    inset: 2px;

    background: #09090b;

    border-radius: 999px;

    z-index: -1;
}

.apf-nav-item {
    flex: 1;

    height: 49px;

    border: none;
    background: transparent;

    color: #a1a1aa;

    font-size: 15px;
    font-weight: 900;

    border-radius: 999px;

    cursor: pointer;

    z-index: 10;

    transition: all 0.3s ease;
}

.apf-nav-item:hover {
    color: #fff;
}

#nav-indicator {
    position: absolute;

    height: 85%;

    top: 7.5%;
    left: 0;

    border-radius: 9999px;

    z-index: 0;

    will-change: transform, width;

    transition:
    transform 0.48s cubic-bezier(0.22, 0.8, 0.2, 1),
    width 0.48s cubic-bezier(0.22, 0.8, 0.2, 1),
    background 0.42s ease,
    box-shadow 0.42s ease,
    opacity 0.3s ease;
}

.glow-forex,
.glow-futures,
.glow-crypto {
    box-shadow: 0 0 12px
        color-mix(in srgb, var(--beam-color) 55%, transparent);

    opacity: 0.84;
}

/* =========================================
   COMPACT DESKTOP / TABLET LANDSCAPE
   Keeps the desktop header layout fluid before the mobile breakpoint.
   Mobile styles at 768px and below remain untouched.
========================================= */

@media (min-width: 769px) and (max-width: 1180px) {
    .apf-topbar-container {
        max-width: 100%;
        padding: 8px 16px;
        grid-template-columns:
            minmax(205px, 255px)
            minmax(190px, 1fr)
            max-content;
        gap: 10px;
    }

    .apf-topbar-right {
        gap: 9px;
    }

    .apf-brand {
        gap: 9px;
        min-width: 0;
    }

    .dynamic-logo {
        width: 42px !important;
        height: 42px !important;
        flex: 0 0 42px;
    }

    .apf-brand-name {
        min-width: 0;
        font-size: clamp(16px, 1.75vw, 19px);
        letter-spacing: 0.15px;
    }

    .apf-app-btn {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .apf-grid-icon {
        width: 21px;
        height: 21px;
    }

    .apf-topbar-center {
        min-width: 0;
    }

    .apf-topbar-center .apf-search,
    .apf-search {
        min-width: 0;
        max-width: 100%;
        height: 40px;
        padding: 0 12px;
    }

    .apf-search-submit {
        width: 30px;
        height: 30px;
        margin-right: 7px;
    }

    .apf-search-icon {
        width: 19px;
        height: 19px;
    }

    .apf-search input {
        min-width: 0;
        font-size: 12px;
    }

    .apf-search input::placeholder {
        font-size: 11px;
    }

    .apf-topbar-left {
        gap: 7px;
    }

    .apf-auth-actions {
        gap: 7px;
    }

    .apf-auth-btn {
        height: 40px;
        padding: 0 13px;
        font-size: 12px;
    }

    .apf-member-trigger {
        min-height: 40px;
        gap: 7px;
        padding: 4px 11px 4px 6px;
    }

    .apf-member-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .apf-member-name {
        max-width: 88px;
        font-size: 12px;
    }

    .apf-notification-trigger {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 769px) and (max-width: 920px) {
    .apf-topbar-container {
        padding-inline: 12px;
        grid-template-columns:
            minmax(185px, 218px)
            minmax(150px, 1fr)
            max-content;
        gap: 8px;
    }

    .apf-brand-name {
        font-size: 16px;
    }

    .dynamic-logo {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px;
    }

    .apf-app-btn {
        width: 38px;
        height: 38px;
    }

    .apf-search {
        height: 38px;
        padding-inline: 10px;
    }

    .apf-search input {
        font-size: 11px;
    }

    .apf-search input::placeholder {
        color: transparent;
    }

    .apf-auth-btn {
        height: 38px;
        padding-inline: 10px;
        font-size: 11px;
    }

    .apf-member-trigger {
        min-height: 38px;
        padding-right: 9px;
    }

    .apf-member-name {
        max-width: 68px;
        font-size: 11px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .apf-topbar-container {
        display: flex;
        align-items: center;

        max-width: 100%;
        margin: 0;

        padding: 8px 10px;

        gap: 8px;
    }

    .apf-topbar-right {
        display: flex;
        align-items: center;

        gap: 10px;

        flex-shrink: 0;
    }

    .apf-topbar-center {
        display: flex;
        align-items: center;

        flex: 1 1 0;

        min-width: 0;
    }

    .apf-topbar-left {
        display: none;
    }

    .dynamic-logo {
        width: 38px !important;
        height: 38px !important;
    }

    .apf-brand {
        gap: 0;
        flex-shrink: 0;
    }

    .apf-brand-name {
        display: none;
    }

    .apf-app-btn {
        width: 38px;
        height: 38px;

        border-radius: 13px;
    }

    .apf-grid-icon {
        width: 21px;
        height: 21px;
    }

    .apf-search {
        width: 100%;
        max-width: none;
        min-width: 76px;

        height: 38px;

        padding: 0 10px;
    }

    .apf-search-submit {
        width: 30px;
        height: 30px;

        margin-right: 6px;
    }

    .apf-search-icon {
        width: 18px;
        height: 18px;
    }

    .apf-search input {
        font-size: 12px;

        min-width: 0;
    }

    .apf-search input::placeholder {
        font-size: 0;
    }

    .apf-app-dropdown {
        position: fixed;

        top: 62px;
        right: 12px;
        left: 12px;

        width: auto;

        padding: 11px;

        border-radius: 20px;
    }

    .apf-app-dropdown::before {
        display: none;
    }

    .apf-app-card {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 11px;

        min-height: 74px;

        padding: 11px 12px;
        border-radius: 15px;
    }

    .apf-app-card:not(:last-child) {
        margin-bottom: 8px;
    }

    .apf-app-card-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .apf-app-card-mark svg {
        width: 26px;
        height: 26px;
    }

    .apf-app-card strong {
        font-size: 15px;
    }

    .apf-app-card small {
        margin-top: 2px;
        font-size: 10px;
    }

    .apf-auth-actions {
        display: none;
    }

    .apf-member-menu {
        display: none;
    }

    .apf-mobile-account {
        display: block;
    }

    .apf-mobile-account-trigger {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .apf-mobile-account-icon {
        width: 20px;
        height: 20px;
    }

    .apf-mobile-account-dropdown {
        position: fixed;
        top: 62px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 20px;
    }

    .apf-soon-toast {
        top: 82px;

        min-width: auto;

        width: calc(100% - 24px);

        padding: 14px 16px;
    }

    .apf-soon-toast strong {
        font-size: 15px;
    }

    .apf-soon-toast span {
        font-size: 12px;
    }

    .nav-container {
        padding: 7px 8px;

        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav-container::-webkit-scrollbar {
        display: none;
    }

    .nav-links {
        width: 100%;
        gap: 2px;

        flex-wrap: nowrap;
    }

    .nav-links li {
        flex: 1 1 0;
        min-width: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 7px 5px;

        font-size: 11.5px;

        border-radius: 9px;

        white-space: nowrap;
    }

    #nav-wrapper {
        top: var(--apf-sticky-header-height, 104px);

        z-index: 30000;

        padding-top: 6px;

        background: #09090b;
    }

    #apf-nav-container {
        max-width: 100%;
    }

    .apf-nav-item {
        height: 46px;

        font-size: 13px;
    }
}

/* --- 6. الكروت --- */
.card {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: 0.4s;
}

.card:hover {
    border-color: var(--beam-color);
    transform: translateY(-8px);
    box-shadow: 0 10px 40px -15px var(--beam-color);
}

/* =========================================================
   APEX PLATFORM HEADER
========================================================= */

.apf-app-btn,
.apf-app-btn:hover {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.apf-app-btn {
    border: 0;
    border-radius: 0;
}

.apf-topbar-container {
    max-width: 1420px;
    grid-template-columns:
        minmax(250px, max-content)
        minmax(220px, 1fr)
        minmax(290px, 360px)
        max-content
        46px;
    grid-template-areas: "brand search markets account menu";
    gap: 14px;
    padding: 9px 22px;
}

.apf-topbar-right {
    grid-area: brand;
    grid-column: auto;
    justify-self: start;
    justify-content: flex-start;
}

.apf-topbar-center {
    grid-area: search;
    grid-column: auto;
}

.apf-topbar-left {
    grid-area: account;
    grid-column: auto;
    justify-self: end;
}

.apf-market-switcher {
    grid-area: markets;
    min-width: 0;
    height: 42px;
    padding: 3px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 2px;
    border: 1px solid color-mix(in srgb, var(--apf-market-accent) 70%, #34343b);
    border-radius: 999px;
    background: #111115;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.02),
        0 8px 24px rgba(0, 0, 0, 0.22);
}

.apf-market-tab {
    position: relative;
    min-width: 0;
    height: 34px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #e4e4e7;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    transition:
        color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.apf-market-tab:hover {
    color: #fff;
}

.apf-market-tab.is-active {
    color: #09090b;
    background: var(--apf-market-accent);
    box-shadow: 0 7px 20px color-mix(in srgb, var(--apf-market-accent) 30%, transparent);
}

.apf-market-tab[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
}

.apf-menu-trigger {
    grid-area: menu;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
    cursor: pointer;
    transition:
        color 0.22s ease,
        transform 0.22s ease;
}

.apf-menu-trigger:hover,
.apf-header.menu-open .apf-menu-trigger {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--apf-market-accent);
}

.apf-menu-trigger span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition:
        transform 0.24s ease,
        opacity 0.18s ease;
}

.apf-header.menu-open .apf-menu-trigger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.apf-header.menu-open .apf-menu-trigger span:nth-child(2) {
    opacity: 0;
}

.apf-header.menu-open .apf-menu-trigger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
    position: relative;
    z-index: 18;
    background: #0a0a0d;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.nav-container {
    max-width: 1420px;
    padding: 0 22px;
}

.nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 0;
}

.nav-links a {
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #a9a9b2;
    font-size: 13px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 18%;
    bottom: -1px;
    left: 18%;
    height: 2px;
    border-radius: 999px 999px 0 0;
    background: var(--apf-market-accent);
    box-shadow: 0 0 14px color-mix(in srgb, var(--apf-market-accent) 55%, transparent);
    opacity: 0;
    transform: scaleX(0.4);
    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

.nav-links a:hover,
.nav-links a.active-link {
    color: #fff !important;
    background: transparent;
    box-shadow: none;
}

.nav-links a:hover::after,
.nav-links a.active-link::after {
    opacity: 1;
    transform: scaleX(1);
}

.apf-mega-backdrop {
    position: fixed;
    z-index: 14;
    top: var(--apf-header-height, 120px);
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.24s ease,
        visibility 0.24s ease;
}

.apf-mega-menu {
    position: absolute;
    z-index: 16;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100vh - var(--apf-header-height, 120px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid color-mix(in srgb, var(--apf-market-accent) 38%, transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--apf-market-accent) 9%, transparent), transparent 34%),
        #0b0b0e;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.56);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
        opacity 0.24s ease,
        visibility 0.24s ease,
        transform 0.24s ease;
}

.apf-header.menu-open .apf-mega-backdrop,
.apf-header.menu-open .apf-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.apf-header.menu-open .apf-mega-menu {
    transform: translateY(0);
}

body.apf-menu-open {
    overflow: hidden;
}

.apf-mega-shell {
    width: min(1420px, 100%);
    margin: 0 auto;
    padding: 28px 22px 34px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    gap: 34px;
    direction: ltr;
}

.apf-mega-shortcuts {
    min-width: 0;
    padding-right: 30px;
    border-right: 1px solid rgba(255, 255, 255, 0.075);
}

.apf-mega-section-head {
    margin-bottom: 16px;
}

.apf-mega-section-head span {
    display: block;
    margin-bottom: 4px;
    color: var(--apf-market-accent);
    font-size: 11px;
    font-weight: 900;
}

.apf-mega-section-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(17px, 1.5vw, 22px);
    line-height: 1.55;
}

.apf-mega-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.apf-mega-shortcut {
    min-width: 0;
    min-height: 72px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    background: #151518;
    color: #fff;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.apf-mega-shortcut:hover,
.apf-mega-shortcut[aria-expanded="true"] {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--apf-market-accent) 54%, transparent);
    background: color-mix(in srgb, var(--apf-market-accent) 8%, #151518);
}

.apf-mega-shortcut i {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--apf-market-accent) 14%, transparent);
    color: var(--apf-market-accent);
    font-size: 16px;
    font-style: normal;
    font-weight: 900;
}

.apf-mega-shortcut span {
    min-width: 0;
    display: block;
}

.apf-mega-shortcut strong,
.apf-mega-shortcut small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apf-mega-shortcut strong {
    font-size: 13px;
}

.apf-mega-shortcut small {
    margin-top: 3px;
    color: #96969f;
    font-size: 10px;
    font-weight: 700;
}

.apf-mega-firm-lists {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 14px;
    background: #101013;
}

.apf-mega-firm-lists[hidden],
.apf-mega-firm-panel[hidden] {
    display: none;
}

.apf-mega-firm-panel-head {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.apf-mega-firm-panel-head strong {
    color: #fff;
    font-size: 13px;
}

.apf-mega-firm-panel-head span {
    color: var(--apf-market-accent);
    font-size: 10px;
    font-weight: 900;
}

.apf-mega-firm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.apf-mega-firm-grid a {
    min-width: 0;
    min-height: 42px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 9px;
    color: #d4d4d8;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    transition:
        color 0.18s ease,
        background 0.18s ease;
}

.apf-mega-firm-grid a:hover {
    color: #fff;
    background: color-mix(in srgb, var(--apf-market-accent) 10%, transparent);
}

.apf-mega-firm-grid img {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 7px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
}

.apf-mega-firm-grid span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apf-mega-firm-grid p {
    grid-column: 1 / -1;
    padding: 8px;
    color: #a1a1aa;
    font-size: 11px;
}

.apf-mega-columns {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 28px 22px;
}

.apf-mega-columns section {
    min-width: 0;
}

.apf-mega-columns h2 {
    margin: 0 0 13px;
    color: #fff;
    font-size: 13px;
}

.apf-mega-columns section > a {
    display: block;
    padding: 6px 0;
    color: #a8a8b0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: color 0.18s ease;
}

.apf-mega-columns section > a:hover {
    color: var(--apf-market-accent);
}

.apf-mega-community {
    grid-column: 1 / -1;
    padding-top: 4px;
}

.apf-mega-community p {
    margin: 0 0 12px;
    color: #8f8f98;
    font-size: 11px;
    line-height: 1.8;
}

.apf-mega-socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.apf-mega-social-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #b8b8c0;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 12px;
    text-decoration: none;
    transition:
        color 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease;
}

.apf-mega-social-btn svg {
    width: 17px;
    height: 17px;
    display: block;
    fill: currentColor;
    pointer-events: none;
}

.apf-mega-social-btn:hover {
    color: #fff;
    background: color-mix(in srgb, var(--beam-color) 10%, transparent);
    border-color: color-mix(in srgb, var(--beam-color) 45%, transparent);
    transform: translateY(-2px);
}

.apf-mega-social-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--beam-color) 70%, #fff);
    outline-offset: 2px;
}

@media (min-width: 769px) and (max-width: 1180px) {
    .apf-topbar-container {
        grid-template-columns:
            max-content
            minmax(145px, 1fr)
            minmax(245px, 310px)
            max-content
            40px;
        grid-template-areas: "brand search markets account menu";
        gap: 8px;
        padding: 8px 12px;
    }

    .apf-brand-name {
        display: none;
    }

    .apf-topbar-right {
        gap: 7px;
    }

    .apf-menu-trigger {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .apf-market-switcher {
        height: 40px;
    }

    .apf-market-tab {
        height: 32px;
        padding-inline: 8px;
        font-size: 11px;
    }

    .nav-container {
        padding-inline: 12px;
    }

    .nav-links a {
        padding-inline: 8px;
        font-size: 11px;
    }

    .apf-mega-shell {
        padding-inline: 18px;
        grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .apf-topbar-container {
        display: grid;
        grid-template-columns: max-content minmax(76px, 1fr) 38px 38px;
        grid-template-areas:
            "markets markets markets markets"
            "brand search account menu";
        align-items: center;
        gap: 7px;
        padding: 0 9px 7px;
    }

    .apf-market-switcher {
        width: calc(100% + 18px);
        height: 45px;
        margin-left: -9px;
        padding: 0;
        gap: 0;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
        background: #0c0c0f;
        box-shadow: none;
    }

    .apf-market-tab {
        height: 45px;
        padding: 0 5px;
        border-radius: 0;
        color: #d4d4d8;
        font-size: 12px;
    }

    .apf-market-tab::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 2px;
        background: var(--apf-market-accent);
        opacity: 0;
    }

    .apf-market-tab.is-active {
        color: #fff;
        background: color-mix(in srgb, var(--apf-market-accent) 10%, #111115);
        box-shadow: none;
    }

    .apf-market-tab.is-active::before {
        opacity: 1;
    }

    .apf-topbar-right {
        grid-area: brand;
        gap: 7px;
        justify-self: start;
    }

    .apf-topbar-center {
        grid-area: search;
    }

    .apf-mobile-account {
        grid-area: account;
    }

    .apf-menu-trigger {
        grid-area: menu;
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .dynamic-logo {
        width: 38px !important;
        height: 38px !important;
    }

    .apf-app-btn {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .apf-search {
        height: 38px;
    }

    .apf-app-dropdown,
    .apf-mobile-account-dropdown {
        top: 96px;
    }

    .nav-container {
        padding: 0 12px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .nav-links {
        width: max-content;
        min-width: 100%;
        justify-content: flex-start;
        gap: 22px;
    }

    .nav-links li {
        flex: 0 0 auto;
        min-width: auto;
        scroll-snap-align: start;
    }

    .nav-links a {
        width: auto;
        min-height: 46px;
        padding: 11px 2px;
        font-size: 12px;
    }

    .nav-links a::after {
        right: 0;
        left: 0;
    }

    .apf-mega-backdrop {
        display: none;
    }

    .apf-mega-menu {
        position: fixed;
        top: var(--apf-header-height, 140px);
        bottom: 0;
        max-height: none;
        border-bottom: 0;
        transform: translateY(-6px);
    }

    .apf-mega-shell {
        width: 100%;
        padding: 20px 14px 34px;
        display: block;
    }

    .apf-mega-shortcuts {
        padding: 0;
        border: 0;
    }

    .apf-mega-section-head {
        margin-bottom: 13px;
    }

    .apf-mega-section-head h2 {
        font-size: 17px;
    }

    .apf-mega-shortcut-grid {
        gap: 7px;
    }

    .apf-mega-shortcut {
        min-height: 68px;
        padding: 10px;
        gap: 8px;
    }

    .apf-mega-shortcut i {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        border-radius: 8px;
        font-size: 14px;
    }

    .apf-mega-shortcut strong {
        font-size: 11px;
    }

    .apf-mega-shortcut small {
        font-size: 8.5px;
    }

    .apf-mega-firm-lists {
        padding: 11px;
    }

    .apf-mega-firm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apf-mega-columns {
        margin-top: 28px;
        padding-top: 24px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .apf-mega-community {
        grid-column: 1 / -1;
    }

    .apf-soon-toast {
        top: calc(var(--apf-header-height, 140px) + 12px);
    }
}

@media (max-width: 768px) and (hover: hover) and (pointer: fine) {
    .nav-container {
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }

    .nav-container::-webkit-scrollbar {
        height: 4px;
    }

    .nav-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .nav-container::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: transparent;
    }

    .nav-container:hover {
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }

    .nav-container:hover::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
    }

    .nav-container:hover::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.32);
    }
}

@media (max-width: 390px) {
    .apf-topbar-container {
        grid-template-columns: max-content minmax(62px, 1fr) 36px 36px;
        gap: 5px;
        padding-inline: 7px;
    }

    .apf-market-switcher {
        width: calc(100% + 14px);
        margin-left: -7px;
    }

    .dynamic-logo {
        width: 34px !important;
        height: 34px !important;
    }

    .apf-app-btn,
    .apf-menu-trigger,
    .apf-mobile-account-trigger {
        width: 36px;
        height: 36px;
    }

    .apf-search {
        min-width: 62px;
        padding-inline: 6px;
    }

    .apf-search-submit {
        margin-right: 2px;
    }

    .apf-mega-shortcut span small {
        display: none;
    }
}

.btn-gold {
    margin-top: 15px;
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid var(--beam-color);
    color: var(--beam-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-gold:hover {
    background: var(--beam-color);
    color: #000;
}

/* --- 7. الأنيميشن --- */
@keyframes snake-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes breathing-glow {
    0%,
    100% {
        box-shadow:
            0 10px 35px rgba(0, 0, 0, 0.35),
            0 0 4px color-mix(
                in srgb,
                var(--beam-color) 30%,
                transparent
            );
    }

    50% {
        box-shadow:
            0 12px 38px rgba(0, 0, 0, 0.42),
            0 0 9px color-mix(
                in srgb,
                var(--beam-color) 42%,
                transparent
            );
    }
}

.main-container {
    max-width: 1250px;
    margin: 40px auto;
    padding: 0 15px;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
    animation: fadeIn 0.32s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #555;
    border: 1px dashed #333;
    border-radius: 15px;
}

/* --- نظام الأشعة الجانبية (يتحرك مع السكرول) --- */
#beams-container {
    position: absolute;
    /* يخليهم يصعدون وية الصفحة وما يبقون ثابتين */
    top: 0;
    left: 0;
    width: 100%;
    height: 700px;
    /* يغطي فقط منطقة الهيدر والأزرار */
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.beam-effect {
    position: absolute;
    width: 600px;
    height: 600px;
    opacity: 0.25;
    filter: blur(120px);
    transition: all 1s ease-in-out;
    border-radius: 50%;
}

.beam-effect.left {
    top: 50px;
    left: -250px;
    background: radial-gradient(circle, var(--beam-color) 0%, transparent 80%);
}

.beam-effect.right {
    top: 50px;
    right: -250px;
    background: radial-gradient(circle, var(--beam-color) 0%, transparent 80%);
}

/* للموبايل: تقليل الحجم حتى ما يملي الشاشة */
@media (max-width: 768px) {
    .beam-effect {
        width: 300px;
        height: 300px;
        opacity: 0.12;
    }
}




/* --- التعديلات المطلوبة فقط على قسم الشعار --- */

.prop-logo-container {
    border-radius: 10px;
    /* الإطار بنفس نمط إطار الكرت (شعاع ذهبي باهت) */
    border: 2px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 125px;
    /* تكبير الحجم */
    height: 125px;
    /* ضمان الشكل المربع */
    overflow: hidden;
}

.prop-logo-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

@media (hover: none) and (pointer: coarse) {
    .apf-nav-item {
        user-select: none;
        -webkit-user-select: none;
    }

    .apf-nav-item:hover {
        color: #a1a1aa;
    }
}

@media (prefers-reduced-motion: reduce) {
    #nav-indicator,
    .page-content.active {
        transition: none;
        animation: none;
    }
}
