body {
    margin: 0;
    background-color: #050816;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-menu-dropdown {
    inset-inline-end: 0;
}

.landing-page-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(-1 * clamp(2.5rem, 6vw, 4rem));
    background-image: url('../assets/hero/background.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    z-index: 0;
}

#hero {
    overflow: hidden;
}

#hero .landing-page-bg {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - clamp(2.5rem, 6vw, 4rem) - 6rem), transparent calc(100% - clamp(2.5rem, 6vw, 4rem)));
    mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - clamp(2.5rem, 6vw, 4rem) - 6rem), transparent calc(100% - clamp(2.5rem, 6vw, 4rem)));
}

@keyframes fade-rise {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-rise {
    animation: fade-rise 0.8s ease-out forwards;
}
.animate-fade-rise-delay {
    animation: fade-rise 0.8s ease-out 0.2s forwards;
    opacity: 0;
}
.animate-fade-rise-delay-2 {
    animation: fade-rise 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

#mobileMenu {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#mobileMenu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}
#mobileMenu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.liquid-glass-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.liquid-glass-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(79, 101, 255, 0.30) 0%, rgba(255, 255, 255, 0.10) 40%, transparent 70%);
    transform: rotate(25deg) translateX(-100%);
    animation: liquidShimmer 8s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.liquid-glass-btn span {
    position: relative;
    z-index: 2;
    color: #1a1a2e;
}

.liquid-glass-btn:hover {
    box-shadow: 0 12px 40px rgba(79, 101, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.80);
}

@keyframes liquidShimmer {
    0% {
        transform: rotate(25deg) translateX(-100%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: rotate(25deg) translateX(50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: rotate(25deg) translateX(200%) scale(1);
        opacity: 0.6;
    }
}

#langDropdown {
    transform-origin: top center;
    /* Logical-end anchor: aligns with the button's "end" side,
       which keeps the dropdown inside the viewport in both RTL and LTR */
    inset-inline-end: 0;
    inset-inline-start: auto;
    max-width: min(12rem, calc(100vw - 1rem));
}
#langDropdown:not(.hidden) {
    display: block;
    animation: dropdownFade 0.2s ease-out forwards;
}
@keyframes dropdownFade {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.lang-option {
    transition: background 0.2s;
}
.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}
#langDropdown {
    padding-inline: 0.25rem;
}
#langToggle svg {
    display: inline-block;
}

.hero-glow {
    background: radial-gradient(
        circle at center 45%,
        rgba(79, 101, 255, 0.40) 0%,
        rgba(47, 73, 255, 0.18) 35%,
        transparent 75%
    );
    animation: glowPulse 10s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.85;
        transform: scale(1);
    }
    50% {
        opacity: 1.15;
        transform: scale(1.04);
    }
}

.liquid-glass-btn,
.hero-cta-secondary {
    filter: drop-shadow(0 0 30px rgba(79, 101, 255, 0.15));
    transition: filter 0.4s ease;
}
.liquid-glass-btn:hover,
.hero-cta-secondary:hover {
    filter: drop-shadow(0 0 50px rgba(79, 101, 255, 0.30));
}

@keyframes bannerEntrance {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(4px);
    }
    60% {
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.animate-banner-entrance {
    animation: bannerEntrance 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
    opacity: 0;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 0 40px rgba(79, 101, 255, 0.12);
    transition: box-shadow 0.3s ease;
}

.stat-badge:hover {
    box-shadow: 0 0 60px rgba(79, 101, 255, 0.20);
}

.stat-badge-text {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9BA3C7;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

@media (max-width: 420px) {
    .stat-badge-text {
        white-space: normal;
        font-size: 0.75rem;
    }
    .stat-badge {
        padding: 0.4rem 1rem;
    }
}

@keyframes statBadgeEntrance {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-stat-badge {
    animation: statBadgeEntrance 0.8s ease-out 0.1s forwards;
    opacity: 0;
}

/* ============================================================
   FEATURES SECTION – Premium, Dynamic, Glassmorphic Grid
   ============================================================ */

#features {
    background-color: #050816;
}

#features.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.feature-card {
    position: relative;
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease,
                background-color 0.3s ease,
                box-shadow 0.3s ease;
    will-change: transform, opacity;
}

@media (min-width: 640px) {
    .feature-card {
        padding: 1.5rem;
    }
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 20px 40px -15px rgba(65, 86, 189, 0.15);
}

.feature-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0e24;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.feature-media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 0.875rem;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.feature-card:hover .feature-media img {
    transform: scale(1.03);
}

.feature-media-overlay {
    position: absolute;
    inset: 0;
    border-radius: 0.875rem;
    background: linear-gradient(180deg, rgba(5, 8, 22, 0) 30%, rgba(5, 8, 22, 0.6) 100%);
    pointer-events: none;
}

.feature-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #F5F7FF;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0;
}

.feature-desc {
    font-size: 0.875rem;
    color: #9BA3C7;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
}

/* ============================================================
   PARTNER SERVERS – Ultra‑compact, ticker style
   ============================================================ */

#partners.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
#partners.visible .text-center.opacity-0 {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
#partners.visible .text-center.opacity-0:last-child {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ----- Ticker track – seamless marquee ----- */
.server-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-width: max-content;
    will-change: transform;
    animation: scrollTicker var(--ticker-duration, 40s) linear infinite;
}

.server-ticker-wrapper:hover .server-ticker-track {
    animation-play-state: paused;
}

@keyframes scrollTickerLTR {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes scrollTickerRTL {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(50%, 0, 0);
    }
}

.server-ticker-track {
    animation: scrollTickerLTR 45s linear infinite;
}

html[dir="rtl"] .server-ticker-track {
    animation: scrollTickerRTL 45s linear infinite;
}

/* ----- Server item – inline, lightweight ----- */
.server-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    transition: background 0.3s ease;
    background: transparent;
    border: none;
}

.server-item:hover {
    background: rgba(255,255,255,0.03);
}

.server-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.3s ease, border-color 0.3s ease;
    background: rgba(255,255,255,0.03);
}

.server-item:hover .server-icon {
    transform: scale(1.05);
    border-color: rgba(47,73,255,0.15);
}

.server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.server-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    min-width: 0;
}

.server-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #F5F7FF;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    letter-spacing: 0.2px;
}

.server-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.55rem;
    color: #9BA3C7;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    opacity: 0.7;
    white-space: nowrap;
}

.server-stats span {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.server-stats .online-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #34D399;
    animation: pulseDot 2.5s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ----- Responsive adjustments ----- */
@media (max-width: 640px) {
    .server-icon {
        width: 36px;
        height: 36px;
    }
    .server-name {
        font-size: 0.65rem;
        max-width: 70px;
    }
    .server-stats {
        font-size: 0.45rem;
        gap: 0.3rem;
    }
    .server-ticker-track {
        gap: 1rem;
    }
    #partners {
        padding-top: 1.25rem;
        padding-bottom: 2rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .server-icon {
        width: 40px;
        height: 40px;
    }
    .server-name {
        max-width: 90px;
    }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    #partners {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .server-ticker-wrapper:hover .server-ticker-track {
        animation-play-state: running !important;
    }
}

/* ============================================================
   COMMUNITY STATISTICS SECTION – Premium Glassmorphic Stats
   ============================================================ */

#stats {
    background-color: #050816;
}

#stats.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.stat-card {
    position: relative;
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease,
                background-color 0.3s ease,
                box-shadow 0.3s ease;
    will-change: transform, opacity;
}

.stat-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 20px 40px -15px rgba(65, 86, 189, 0.15);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    background: rgba(65, 86, 189, 0.15);
    border: 1px solid rgba(102, 121, 216, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6679D8;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover .stat-icon {
    color: #F5F7FF;
    background: rgba(65, 86, 189, 0.25);
    border-color: rgba(102, 121, 216, 0.45);
}

.stat-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.stat-number-display {
    direction: ltr;
    display: inline-flex;
    align-items: baseline;
    gap: 0.1rem;
    font-size: 2rem;
    font-weight: 700;
    color: #F5F7FF;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

@media (min-width: 640px) {
    .stat-number-display {
        font-size: 2.25rem;
    }
}

.stat-suffix {
    color: #6679D8;
    font-size: 1.25rem;
    font-weight: 600;
}

.stat-label {
    font-size: 0.875rem;
    color: #9BA3C7;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
}

/* ============================================================
   CTA SECTION – Clean, minimal call to action
   ============================================================ */

#cta {
    background-color: #050816;
}

#cta.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    #stats,
    #cta {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .stat-card {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .stat-card:hover {
        transform: none !important;
    }
}

/*حل مؤقت*/
@media (max-width: 767px) {
    #desktopLoginButton {
        display: none !important;
    }
}


/* Main Hero Title Typography - Clean, elegant light weight */
h1[data-i18n="hero.title"],
.hero-title {
    font-weight: 300 !important;
}

/* Navbar transparency & scroll behavior */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                -webkit-backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.nav-scrolled {
    background-color: rgba(10, 14, 31, 0.8) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/*إصلاح المساحة الزائدة أسفل الهيرو على الموبايل فقط*/
@media (max-width: 767px) {
    #hero {
        min-height: 0 !important;
    }

    #hero .landing-page-bg {
        bottom: auto;
        height: calc(100vh + clamp(2.5rem, 6vw, 4rem));
    }

    #hero section {
        padding-top: 8rem !important;
    }
}