/* =====================================================================
   Respect.sa Clone â€” Theme v1.2
   Dark purple gaming aesthetic, Arabic RTL
   Inspired-by-design system: deep purple-black + violet accent +
   decorative crosshairs + section numbers + map pattern
   ===================================================================== */

:root {
    /* surfaces — dark charcoal */
    --bg-1: #141414;
    --bg-2: #1A1A1A;
    --bg-3: #1F1F1F;
    --bg-card: #1A1A1A;
    --bg-elevated: #222222;

    /* borders — metallic grey */
    --border-1: rgba(74, 74, 74, 0.30);
    --border-2: rgba(74, 74, 74, 0.55);
    --border-strong: rgba(140, 17, 17, 0.60);

    /* brand — crimson red */
    --primary: #8C1111;          /* crimson red */
    --primary-bright: #D91616;   /* bright red accent */
    --primary-dark: #5C0A0A;     /* deeper crimson */
    --primary-glow: rgba(217, 22, 22, 0.45);

    /* secondary brand */
    --silver: #EAEAEA;
    --bronze: #cd7f32;
    --discord: #5865f2;
    --twitch: #9146ff;
    --red: #D91616;
    --red-glow: rgba(217, 22, 22, 0.40);

    /* text — silver / off-white */
    --text-1: #EAEAEA;
    --text-2: #B0B0B0;        /* secondary text */
    --text-3: #4A4A4A;        /* metallic grey muted */

    /* depth */
    --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.45);
    --shadow-md:    0 8px 24px rgba(0, 0, 0, 0.55);
    --shadow-lg:    0 20px 60px rgba(0, 0, 0, 0.65);
    --shadow-glow:  0 0 32px rgba(140, 17, 17, 0.30);
    --glow-strong:  0 0 44px rgba(217, 22, 22, 0.45);
    --glow-red:     0 0 24px rgba(217, 22, 22, 0.40);

    /* motion */
    --ease-out:     cubic-bezier(0.20, 0.80, 0.20, 1.00);
    --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1.00);
    --ease-snap:    cubic-bezier(0.65, 0.00, 0.35, 1.00);
    --motion-fast:  150ms;
    --motion-base:  250ms;
    --motion-slow:  400ms;

    /* radii */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-pill: 999px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
html { scroll-behavior: smooth; }

* { box-sizing: border-box; }

html, body {
    background: var(--bg-1);
    color: var(--text-1);
    font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    direction: rtl;
}

body {
    background-image:
        /* subtle gradient pools */
        radial-gradient(ellipse 800px 400px at 80% -10%, rgb(from var(--primary) r g b / 0.18), transparent 60%),
        radial-gradient(ellipse 600px 300px at 10% 100%, rgb(from var(--primary-dark) r g b / 0.12), transparent 60%),
        /* dotted grid pattern */
        radial-gradient(circle at 1px 1px, rgb(from var(--primary-bright) r g b / 0.06) 1px, transparent 0);
    background-size: auto, auto, 32px 32px;
    background-attachment: fixed, fixed, fixed;
    min-height: 100vh;
    /* Sticky footer: body is a flex column so <main> can grow and push the
       footer to the viewport bottom even when the page content is short.
       Position:fixed siblings (.back-to-top, .profile-drawer) are out of
       flow and unaffected. */
    display: flex;
    flex-direction: column;
}

/* Sticky footer: main grows to fill remaining vertical space */
body > main {
    flex: 1 0 auto;
}
body > .site-footer,
body > footer {
    flex-shrink: 0;
}

.bg-dark-1 { background: var(--bg-1) !important; }
.bg-dark-2 { background: var(--bg-2) !important; }

a { color: var(--primary-bright); text-decoration: none; transition: color var(--motion-fast); }
a:hover { color: var(--text-2); }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 900;
    color: var(--text-1);
    letter-spacing: -0.01em;
}

.text-primary, .text-gold { color: var(--primary-bright) !important; }
.text-muted { color: var(--text-2) !important; }

::selection { background: var(--primary); color: #fff; }

/* Themed scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary-dark), var(--primary));
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-bright); }

/* =====================================================================
   NAV â€” pill-style with central logo highlight
   ===================================================================== */

.site-nav {
    background: rgb(from var(--bg-1) r g b / 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-1);
    padding: 14px 0;
    transition: background var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
}
.site-nav.scrolled {
    background: rgb(from var(--bg-1) r g b / 0.94);
    box-shadow: var(--shadow-sm);
}

.site-nav .navbar-brand .brand-text {
    font-family: 'Cairo', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-bright), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: filter var(--motion-slow);
}
.navbar-brand:hover .brand-text { filter: drop-shadow(0 0 12px var(--primary-glow)); }

/* Pill nav links */
.site-nav .navbar-nav .nav-link {
    color: var(--text-2) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    margin: 0 4px;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    transition: all var(--motion-base) var(--ease-out);
    position: relative;
}
.site-nav .navbar-nav .nav-link:hover {
    color: var(--text-1) !important;
    background: rgb(from var(--primary) r g b / 0.12);
    border-color: var(--border-2);
}
.site-nav .navbar-nav .nav-link.active {
    color: var(--text-1) !important;
    background: rgb(from var(--primary) r g b / 0.20);
    border-color: var(--border-2);
    box-shadow: 0 0 24px rgb(from var(--primary) r g b / 0.20);
}

.dropdown-menu {
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    box-shadow: var(--shadow-md);
    border-radius: var(--r-md);
    padding: 0.5rem;
}
.dropdown-item {
    color: var(--text-2);
    border-radius: var(--r-sm);
    transition: all var(--motion-fast);
}
.dropdown-item:hover, .dropdown-item:focus {
    background: rgb(from var(--primary) r g b / 0.15);
    color: var(--text-1);
}

.nav-spacer { height: 80px; }

/* =====================================================================
   BUTTONS â€” solid violet (no gradient)
   ===================================================================== */

.btn {
    border-radius: var(--r-pill);
    font-weight: 700;
    padding: 0.65rem 1.5rem;
    transition:
        transform var(--motion-base) var(--ease-spring),
        box-shadow var(--motion-base) var(--ease-out),
        background var(--motion-base) var(--ease-out),
        color var(--motion-base) var(--ease-out),
        border-color var(--motion-base) var(--ease-out);
    will-change: transform;
}
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

.btn-warning,
.btn-gold,
.btn-primary {
    background: var(--primary-dark);
    border: 1px solid var(--primary-dark);
    color: #fff;
    box-shadow: 0 6px 18px rgb(from var(--primary-dark) r g b / 0.35);
}
.btn-warning:hover,
.btn-gold:hover,
.btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--glow-strong);
}
.btn-warning:active,
.btn-gold:active,
.btn-primary:active {
    transform: translateY(0) scale(0.98);
    transition-duration: var(--motion-fast);
}

.btn-outline-warning,
.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--border-2);
    color: var(--primary-bright);
}
.btn-outline-warning:hover,
.btn-outline-primary:hover {
    background: rgb(from var(--primary) r g b / 0.12);
    border-color: var(--primary);
    color: var(--text-1);
}

.btn-discord {
    background: var(--discord);
    border: none;
    color: #fff;
    font-weight: 700;
}
.btn-discord:hover {
    background: #4752c4;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.45);
}
.btn-discord:active { transform: translateY(0) scale(0.98); }

/* Loading spinner */
.btn[data-loading].is-loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
    color: transparent !important;
}
.btn[data-loading].is-loading > * { visibility: hidden; }
.btn[data-loading].is-loading::after {
    content: "";
    position: absolute; inset: 0; margin: auto;
    width: 1.2em; height: 1.2em;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-spin 600ms linear infinite;
    visibility: visible;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* =====================================================================
   HERO â€” cinematic background photo + violet wash + watermark + crosshairs
   The bg image lives in a dedicated .hero-bg layer so we can mask its
   bottom edge to fade smoothly into the page bg (no visible cutoff line).
   ===================================================================== */

.hero {
    padding: 130px 0 110px;
    position: relative;
    overflow: hidden;
    text-align: center;
    isolation: isolate;
    background: var(--bg-1);
}

/* Video layer (z=0) — looping cinematic background.
   Replaces the previous static .hero-bg image. Keeps the same masking +
   filter values so the violet wash, watermark, and crosshair overlays all
   still composite correctly. */
.hero .hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
    filter: brightness(0.85) saturate(1.10) contrast(1.05);
    opacity: 0.35;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 1.00) 18%,
        rgba(0, 0, 0, 0.95) 50%,
        rgba(0, 0, 0, 0.50) 80%,
        rgba(0, 0, 0, 0.00) 100%
    );
    mask-image: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 1.00) 18%,
        rgba(0, 0, 0, 0.95) 50%,
        rgba(0, 0, 0, 0.50) 80%,
        rgba(0, 0, 0, 0.00) 100%
    );
}

/* Violet pool over the center of hero (z=1) */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 1200px 600px at 50% 30%, rgb(from var(--primary) r g b / 0.35) 0%, transparent 65%);
    pointer-events: none;
}

/* Big brand watermark "RP" bleeding through (z=2) */
.hero::after {
    content: "RP";
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: clamp(18rem, 38vw, 32rem);
    line-height: 1;
    color: rgb(from var(--primary-bright) r g b / 0.08);
    letter-spacing: -0.02em;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 0 80px rgb(from var(--primary) r g b / 0.10);
}

/* Hero content sits above the overlays */
.hero > .container { position: relative; z-index: 4; }

/* Decorative crosshair "+" markers â€” kept as floating elements */
.hero-cross {
    position: absolute;
    z-index: 3;
    width: 22px; height: 22px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'><path stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' d='M11 2v18M2 11h18'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    opacity: 0.5;
    animation: crosshair-pulse 3s var(--ease-snap) infinite;
}
.hero-cross.hero-cross-tr  { top: 12%; inset-inline-end: 6%; }
.hero-cross.hero-cross-bl  { bottom: 18%; inset-inline-start: 8%; animation-delay: 0.6s; }
.hero-cross.hero-cross-tl  { top: 22%; inset-inline-start: 10%; animation-delay: 1.2s; width: 16px; height: 16px; }
.hero-cross.hero-cross-br  { bottom: 12%; inset-inline-end: 12%; animation-delay: 1.8s; width: 18px; height: 18px; }
@keyframes crosshair-pulse {
    0%, 100% { opacity: 0.25; transform: rotate(45deg); }
    50%      { opacity: 0.65; transform: rotate(45deg) scale(1.15); }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-1);
    text-shadow: 0 0 60px rgb(from var(--primary) r g b / 0.30);
}
.hero p.lead {
    color: var(--text-2);
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 0.5rem;
    line-height: 1.8;
}
.hero .btn-warning { min-width: 200px; }

/* Hero stats strip */
.hero-stats {
    margin-top: 4rem;
    padding: 2rem 1rem;
    background: linear-gradient(90deg, transparent, rgb(from var(--primary) r g b / 0.08), transparent);
    border-block: 1px solid var(--border-1);
    border-radius: var(--r-lg);
}
.hero-stats .stat { text-align: center; color: var(--text-1); }
.hero-stats .stat-value {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-bright), var(--primary));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    line-height: 1.1;
}
.hero-stats .stat-value::after {
    content: attr(data-suffix);
    -webkit-text-fill-color: var(--primary-bright);
    color: var(--primary-bright);
    margin-inline-start: 4px;
    font-size: 0.7em;
}
.hero-stats .stat-label {
    color: var(--text-2);
    font-size: 0.95rem;
    margin-top: 0.4rem;
}

/* =====================================================================
   SECTION HEADINGS â€” eyebrow + display title
   ===================================================================== */

.section-heading {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}
.section-heading .eyebrow {
    display: inline-block;
    color: var(--primary-bright);
    font-family: monospace, system-ui;
    font-size: 0.78rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    padding: 0.3em 1em;
    background: rgb(from var(--primary) r g b / 0.10);
    border: 1px solid var(--border-2);
    border-radius: var(--r-pill);
}
.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    margin: 0;
}
.section-heading h2::after {
    content: "";
    display: block;
    width: 80px; height: 3px;
    margin: 1rem auto 0;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 999px;
}

/* =====================================================================
   HOW TO CONNECT â€” 3-step guide with side character art
   ===================================================================== */

.connect-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    margin-block: 1rem;
}

/* Big background watermark "HOW TO CONNECT" */
.connect-watermark {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: clamp(5rem, 11vw, 12rem);
    line-height: 1;
    color: rgb(from var(--primary-bright) r g b / 0.045);
    letter-spacing: 0.02em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    text-transform: uppercase;
}

.connect-section .container { position: relative; z-index: 1; }

/* Steps column */
.connect-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: center;
}

.connect-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgb(from var(--bg-card) r g b / 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-2);
    border-radius: var(--r-lg);
    padding: 1.5rem 1.75rem;
    transition: all var(--motion-base) var(--ease-out);
}
.connect-card:hover {
    border-color: var(--border-strong);
    transform: translateX(4px);          /* slides toward visual-right (toward content in RTL) */
    box-shadow: var(--shadow-glow);
    background: rgb(from var(--bg-elevated) r g b / 0.80);
}
.connect-card-body { flex: 1; }

.connect-num {
    font-family: 'JetBrains Mono', Consolas, ui-monospace, monospace;
    color: var(--primary-bright);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}
.connect-desc {
    color: var(--text-2);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.connect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 0.65rem 1.5rem;
    background: #fff;
    color: var(--bg-3);
    border-radius: var(--r-pill);
    font-weight: 800;
    text-decoration: none;
    border: 2px solid #fff;
    transition: all var(--motion-base) var(--ease-out);
    flex-shrink: 0;
}
.connect-btn:hover {
    background: var(--primary-bright);
    color: #fff;
    border-color: var(--primary-bright);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgb(from var(--primary-bright) r g b / 0.40);
}

/* Character art column */
.connect-art {
    position: relative;
    text-align: center;
    transform: translateX(-140px); /* nudge 140px to the left */
}
.connect-art img {
    width: 100%;
    height: 100%;
    min-height: 560px;
    max-height: 760px;
    object-fit: cover;          /* crop transparent edges â†’ fills column */
    object-position: center 30%;/* keep head + torso visible */
    opacity: 0.25;              /* -75% clarity (very subtle background presence) */
    /* Edge-fade vignette so the character blends with the section bg */
    -webkit-mask-image:
        linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
        linear-gradient(90deg,  transparent 0%, #000 12%, #000 88%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
        linear-gradient(90deg,  transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-composite: intersect;
}

@media (max-width: 991.98px) {
    .connect-watermark { font-size: clamp(3rem, 9vw, 6rem); }
}

/* =====================================================================
   LIVE STREAMS â€” decorative side character art
   Fills the empty grid cell (visual-left) when only 1-2 live cards exist.
   ===================================================================== */

.live-streams-section { position: relative; }

.live-side-art {
    position: relative;
    text-align: center;
    align-self: stretch;
    min-height: 100%;
    /* No violet halo â€” image blends directly with page bg */
}
.live-side-art img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 760px;
    max-height: 920px;
    object-fit: cover;
    object-position: 60% 35%;     /* drequan: figure is right-of-center, head upper */
    opacity: 0.25;                /* -75% clarity (very subtle background presence) */
    /* Same treatment as .connect-art: full color + edge-vignette mask (all sides fade) */
    -webkit-mask-image:
        linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
        linear-gradient(90deg,  transparent 0%, #000 12%, #000 88%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
        linear-gradient(90deg,  transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-composite: intersect;
    /* Static â€” no transition, no animation, no hover effect */
}

/* =====================================================================
   CARDS
   ===================================================================== */

.gaming-card {
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    overflow: hidden;
    height: 100%;
    position: relative;
    transition:
        transform var(--motion-slow) var(--ease-spring),
        box-shadow var(--motion-base) var(--ease-out),
        border-color var(--motion-base) var(--ease-out);
    will-change: transform;
}
.gaming-card::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, transparent 60%, rgb(from var(--primary) r g b / 0.08));
    opacity: 0;
    transition: opacity var(--motion-slow);
    pointer-events: none;
}
.gaming-card:hover {
    transform: perspective(1200px) translateY(-6px) rotateX(2deg);
    border-color: var(--border-2);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}
.gaming-card:hover::before { opacity: 1; }

.gaming-card .card-body { padding: 1.75rem; color: var(--text-1); }
.gaming-card .card-img-top {
    object-fit: cover;
    height: 220px;
    border-bottom: 1px solid var(--border-1);
}

/* =====================================================================
   SERVER CARDS â€” Arena/RP feature blocks
   ===================================================================== */

.server-card {
    background:
        linear-gradient(135deg, rgb(from var(--primary) r g b / 0.12), transparent 60%),
        linear-gradient(180deg, var(--bg-2), var(--bg-3));
    border: 1px solid var(--border-2);
    border-radius: var(--r-xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    transition:
        transform var(--motion-slow) var(--ease-spring),
        box-shadow var(--motion-base) var(--ease-out),
        border-color var(--motion-base) var(--ease-out);
}
.server-card::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, transparent 40%, rgb(from var(--primary-bright) r g b / 0.10) 50%, transparent 60%);
    background-size: 250% 250%;
    background-position: 100% 0%;
    opacity: 0;
    transition: opacity var(--motion-slow), background-position var(--motion-slow);
    pointer-events: none;
}
.server-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}
.server-card:hover::after {
    opacity: 1;
    background-position: 0% 100%;
}
.server-card .badge-server {
    position: absolute;
    top: 1.25rem;
    inset-inline-start: 1.25rem;
    background: var(--primary-dark);
    color: #fff;
    padding: 0.4em 1em;
    border-radius: var(--r-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: 0 4px 14px rgb(from var(--primary-dark) r g b / 0.40);
}
.server-card h3 {
    font-size: 2rem;
    margin-top: 1rem;
    color: var(--text-1);
}
.server-card .text-gold { color: var(--primary-bright) !important; }
.server-card .server-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: var(--r-md);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-1);
}

/* =====================================================================
   COMMUNITY SECTION â€” big 01/02/03 numbers
   ===================================================================== */

.community-card {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--r-xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    transition:
        transform var(--motion-slow) var(--ease-spring),
        border-color var(--motion-base),
        box-shadow var(--motion-base);
}
.community-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}
.community-card .step-number {
    position: absolute;
    top: 0.5rem;
    inset-inline-end: 1rem;
    font-family: 'Cairo', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(180deg, rgb(from var(--primary) r g b / 0.30), rgb(from var(--primary) r g b / 0));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    pointer-events: none;
    line-height: 1;
}
.community-card .community-icon {
    display: inline-flex;
    width: 88px; height: 88px;
    align-items: center; justify-content: center;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow);
    position: relative;
    z-index: 1;
}
.community-card h4 {
    color: var(--text-1);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}
.community-card p {
    color: var(--text-2);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* =====================================================================
   CREATOR CARD â€” tall portrait (used for featured streamers / creators grid)
   ===================================================================== */

.creator-card {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--border-2);
    transition:
        transform var(--motion-slow) var(--ease-spring),
        border-color var(--motion-base) var(--ease-out),
        box-shadow var(--motion-base) var(--ease-out);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.creator-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

/* Portrait fills the card; cover ensures aspect-ratio fit */
.creator-card .creator-portrait {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform var(--motion-slow) var(--ease-out);
}
.creator-card:hover .creator-portrait {
    transform: scale(1.04);
}

/* Bottom-to-top dark gradient for legibility */
.creator-card::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline: 0;
    height: 60%;
    background: linear-gradient(180deg, transparent 0%, rgb(from var(--bg-1) r g b / 0.65) 50%, rgb(from var(--bg-1) r g b / 0.95) 100%);
    pointer-events: none;
    z-index: 1;
}

/* FEATURED badge â€” top-start corner */
.creator-card .featured-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.3em 0.85em;
    background: rgba(15, 10, 30, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-2);
    border-radius: var(--r-pill);
    color: var(--primary-bright);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.creator-card .featured-badge i { font-size: 0.75em; }

/* Bottom info strip */
.creator-card .creator-info {
    position: absolute;
    inset-block-end: 0;
    inset-inline: 0;
    z-index: 2;
    padding: 1rem 1.1rem 1.1rem;
    color: #fff;
}
.creator-card .creator-name {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #fff;
    line-height: 1.2;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.creator-card .creator-platforms {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.creator-card .creator-platforms a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    transition: color var(--motion-fast), transform var(--motion-fast) var(--ease-spring);
    display: inline-block;
}
.creator-card .creator-platforms a:hover {
    color: var(--primary-bright);
    transform: translateY(-2px);
}
.creator-card .creator-platforms .platform-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    font-weight: 500;
    margin-inline-end: 0.25rem;
}

/* Team variant: monospace member-code under the name (A-01, A-02, ...) */
.creator-card .team-code {
    display: inline-block;
    color: var(--primary-bright);
    font-family: 'JetBrains Mono', Consolas, ui-monospace, monospace;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    font-weight: 700;
    padding: 0.18em 0.6em;
    border-radius: var(--r-pill);
    background: rgb(from var(--primary) r g b / 0.18);
    border: 1px solid var(--border-2);
    margin-inline-end: 0.4rem;
}
.creator-card .team-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
}

/* OFFLINE/LIVE indicator strip â€” top-end corner */
.creator-card .creator-status {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25em 0.7em;
    background: rgba(15, 10, 30, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.creator-card .creator-status.offline { color: var(--text-3); }
.creator-card .creator-status.live    { color: #fff; background: rgba(239, 68, 68, 0.85); border-color: var(--red); animation: live-glow 2s var(--ease-snap) infinite; }
.creator-card .creator-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* =====================================================================
   PROFILE PANEL â€” streamer detail page (drawer-style centered card)
   ===================================================================== */

.profile-page { min-height: calc(100vh - 200px); }
.profile-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4em 0.9em;
    border-radius: var(--r-pill);
    border: 1px solid var(--border-1);
    transition: all var(--motion-fast);
}
.profile-back-link:hover {
    color: var(--text-1);
    background: rgb(from var(--primary) r g b / 0.10);
    border-color: var(--border-2);
}

.profile-panel {
    max-width: 460px;
    margin: 1.5rem auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 100px rgb(from var(--primary) r g b / 0.18);
    position: relative;
}

/* Cover banner */
.profile-cover {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--bg-3) 100%);
}
.profile-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 200%;            /* show only top portion of avatar */
    object-fit: cover;
    object-position: center 25%;
    filter: blur(2px) brightness(0.85);
    transform: scale(1.05);  /* mask blur edge */
    opacity: 0.85;
}
.profile-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(from var(--bg-1) r g b / 0.10) 0%, rgb(from var(--bg-1) r g b / 0.90) 100%);
    pointer-events: none;
}

.profile-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 10, 30, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-1);
    color: var(--text-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--motion-fast);
}
.profile-close:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    transform: scale(1.05);
}

.profile-body {
    padding: 0 1.75rem 1.75rem;
    text-align: center;
}

/* Avatar overlapping cover */
.profile-avatar-wrap {
    margin-top: -56px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}
.profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: 0 0 32px rgb(from var(--primary) r g b / 0.45), 0 0 0 2px var(--primary);
    object-fit: cover;
    background: var(--bg-2);
}
.profile-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bright);
    font-size: 2.5rem;
}

.profile-name {
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text-1);
    margin: 0 0 0.6rem;
    letter-spacing: 0.5px;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.profile-status .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}
.profile-status--offline { color: var(--text-3); }
.profile-status--live    {
    color: var(--red);
    animation: status-pulse 1.8s var(--ease-snap) infinite;
}

.profile-bio {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    padding: 1rem 1.15rem;
    color: var(--text-2);
    font-size: 0.93rem;
    line-height: 1.7;
    text-align: start;
    margin-bottom: 1.25rem;
}
.profile-bio--empty {
    color: var(--text-3);
    text-align: center;
    font-style: italic;
}

.profile-section { margin-bottom: 1.25rem; }
.profile-section-title {
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: end;
    margin-bottom: 0.6rem;
    letter-spacing: 1px;
}

.profile-platforms {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.profile-platform-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text-1);
    font-weight: 700;
    transition: all var(--motion-base) var(--ease-out);
}
.profile-platform-link:hover {
    background: var(--bg-3);
    border-color: var(--border-2);
    color: var(--text-1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
.profile-platform-name {
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 600;
}
.profile-platform-icon {
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid var(--border-1);
}

.profile-cta {
    display: block;
    width: 100%;
    padding: 0.85rem 1.5rem;
    margin-top: 0.5rem;
    text-align: center;
}

@media (max-width: 480px) {
    .profile-panel { margin: 1rem; max-width: none; }
    .profile-body  { padding: 0 1.25rem 1.5rem; }
    .profile-cover { height: 140px; }
    .profile-avatar-wrap { margin-top: -48px; }
    .profile-avatar { width: 96px; height: 96px; }
}

/* =====================================================================
   PROFILE DRAWER â€” slides in from right (visual right in both LTR/RTL)
   Used to show a streamer profile without leaving /streamers
   ===================================================================== */

.profile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
    direction: rtl;
}
.profile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 4, 12, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity var(--motion-base) var(--ease-out);
    cursor: pointer;
}
.profile-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;                      /* anchored to visual right */
    bottom: 0;
    width: min(460px, 100%);
    background: var(--bg-card);
    border-inline-start: 1px solid var(--border-2);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6), 0 0 80px rgb(from var(--primary) r g b / 0.15);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--motion-slow) var(--ease-out);
    will-change: transform;
}

.profile-drawer.open {
    pointer-events: auto;
}
.profile-drawer.open .profile-drawer-backdrop {
    opacity: 1;
}
.profile-drawer.open .profile-drawer-panel {
    transform: translateX(0);
}

/* Close button â€” top-start corner of the drawer panel */
.profile-drawer-close {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 10, 30, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-1);
    color: var(--text-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--motion-fast);
}
.profile-drawer-close:hover {
    background: var(--red);
    border-color: var(--red);
    transform: scale(1.05);
}

.profile-drawer-content {
    /* The injected panel partial uses the existing .profile-cover/.profile-body styles */
    min-height: 100%;
}

.profile-drawer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    color: var(--primary-bright);
    font-size: 2rem;
}

/* Lock body scroll when drawer is open */
body.drawer-open {
    overflow: hidden;
}

/* Inside the drawer, the .profile-cover doesn't need extra spacing â€” it fills the top */
.profile-drawer-content .profile-cover {
    height: 200px;
    border-radius: 0;
}
.profile-drawer-content .profile-body {
    padding: 0 1.5rem 1.75rem;
}

/* Mobile: full width drawer */
@media (max-width: 540px) {
    .profile-drawer-panel { width: 100%; }
    .profile-drawer-panel { box-shadow: none; }
}

/* =====================================================================
   MEMBER (team) â€” circular avatar card, kept for /staff page
   ===================================================================== */

.member-card {
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    text-align: center;
    transition:
        transform var(--motion-base) var(--ease-spring),
        border-color var(--motion-base),
        box-shadow var(--motion-base);
}
.member-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-2);
    box-shadow: var(--shadow-glow);
}
.member-card .avatar {
    width: 110px; height: 110px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 0 24px rgb(from var(--primary) r g b / 0.35);
    transition: transform var(--motion-slow) var(--ease-spring), box-shadow var(--motion-base);
}
.member-card:hover .avatar {
    transform: scale(1.06);
    box-shadow: 0 0 36px rgb(from var(--primary-bright) r g b / 0.55);
}
.member-card .role { color: var(--primary-bright); font-size: 0.85rem; font-weight: 600; }
.member-card .social a {
    color: var(--text-2); margin: 0 6px; font-size: 1.1rem;
    transition: color var(--motion-fast), transform var(--motion-fast) var(--ease-spring);
    display: inline-block;
}
.member-card .social a:hover {
    color: var(--primary-bright);
    transform: translateY(-2px);
}

/* =====================================================================
   LEADERBOARD â€” pill tabs + premium top-3 rows + rank badges
   ===================================================================== */

.leaderboard-section .section-heading h2 {
    margin-top: 8px;
}

/* --- Pill tabs (Ø¥Ø¬Ù…Ø§Ù„ÙŠ / Ø£Ø³Ø¨ÙˆØ¹ÙŠ / Ø´Ù‡Ø±ÙŠ) --- */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 28px auto 32px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-sm);
    width: max-content;
    max-width: 100%;
}
.lb-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--r-pill);
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color var(--motion-fast) var(--ease-out),
                background var(--motion-fast) var(--ease-out),
                box-shadow var(--motion-fast) var(--ease-out);
    white-space: nowrap;
}
.lb-tab:hover {
    color: var(--text-1);
    background: rgb(from var(--primary) r g b / 0.10);
}
.lb-tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 16px rgb(from var(--primary) r g b / 0.40);
}

/* --- Card-wrapped table --- */
.leaderboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.leaderboard-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    color: var(--text-1);
}
.leaderboard-table thead th {
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    color: var(--primary-bright);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 20px;
    border: none;
    text-align: start;
}
.leaderboard-table .lb-th-rank   { width: 110px; text-align: center; }
.leaderboard-table .lb-th-score  { width: 160px; text-align: end; }
.leaderboard-table .lb-th-period { width: 130px; text-align: end; }

.leaderboard-table tbody tr {
    transition: background var(--motion-fast) var(--ease-out);
}
.leaderboard-table tbody tr + tr td {
    border-top: 1px solid var(--border-1);
}
.leaderboard-table tbody tr:hover {
    background: rgb(from var(--primary) r g b / 0.06);
}
.leaderboard-table td {
    padding: 16px 20px;
    vertical-align: middle;
    border: none;
}
.lb-td-rank   { text-align: center; }
.lb-td-score  { text-align: end; }
.lb-td-period { text-align: end; color: var(--text-3); font-size: 0.875rem; }

/* --- Top 3 row treatment (gradient tint + colored side border on first td) ---
   Side accent uses td:first-child border-inline-start so it's contained within
   the cell's box (no risk of pseudo-element overflowing the table card).
   Gradient uses `to left` to work correctly in RTL: tint near the rank cell
   (right side in RTL) fading toward the period cell (left side). */
.lb-row-1 { background: linear-gradient(to left, rgba(255, 215, 0, 0.12), transparent 70%); }
.lb-row-1 td:first-child { border-inline-start: 4px solid #ffd700; box-shadow: inset 4px 0 12px rgba(255, 215, 0, 0.18); }
.lb-row-2 { background: linear-gradient(to left, rgba(192, 192, 192, 0.10), transparent 70%); }
.lb-row-2 td:first-child { border-inline-start: 4px solid var(--silver); }
.lb-row-3 { background: linear-gradient(to left, rgba(205, 127, 50, 0.12), transparent 70%); }
.lb-row-3 td:first-child { border-inline-start: 4px solid var(--bronze); }

/* --- Rank badge â€” uniform circular shape for all ranks --- */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
    flex: 0 0 auto;
}
.rank-badge .rank-num {
    color: var(--text-2);
    font-size: 0.92rem;
    line-height: 1;
}
.rank-badge-other {
    background: var(--bg-3);
    border: 1px solid var(--border-1);
}
.rank-badge-1 {
    background: radial-gradient(circle at 30% 30%, #ffe871, #f5b800 60%, #c98a00 100%);
    color: #4a2e00;
    box-shadow: 0 4px 14px rgba(255, 200, 0, 0.45), inset 0 -2px 6px rgba(0, 0, 0, 0.20);
    animation: rank-pulse-gold 3s var(--ease-out) infinite;
}
.rank-badge-2 {
    background: radial-gradient(circle at 30% 30%, #f0f0f0, #c0c0c0 60%, #888 100%);
    color: #2c2c2c;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.35), inset 0 -2px 6px rgba(0, 0, 0, 0.20);
}
.rank-badge-3 {
    background: radial-gradient(circle at 30% 30%, #e8a973, #cd7f32 60%, #8b5a1f 100%);
    color: #2a1605;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.35), inset 0 -2px 6px rgba(0, 0, 0, 0.20);
}
.rank-badge-1 i, .rank-badge-2 i, .rank-badge-3 i { font-size: 1.15rem; }
@keyframes rank-pulse-gold {
    0%, 100% { box-shadow: 0 4px 14px rgba(255, 200, 0, 0.45), inset 0 -2px 6px rgba(0, 0, 0, 0.20); }
    50%      { box-shadow: 0 4px 22px rgba(255, 200, 0, 0.70), inset 0 -2px 6px rgba(0, 0, 0, 0.20); }
}

/* --- Player cell (avatar + name) --- */
.player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-1);
    flex: 0 0 auto;
}
.player-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid var(--border-1);
}
.player-name {
    font-weight: 600;
    color: var(--text-1);
}

/* --- Score pill --- */
.score-pill {
    display: inline-block;
    padding: 6px 14px;
    background: rgb(from var(--primary) r g b / 0.12);
    border: 1px solid rgb(from var(--primary) r g b / 0.28);
    border-radius: var(--r-pill);
    color: var(--primary-bright);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
}
.lb-row-1 .score-pill {
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.35);
    color: #ffd700;
}
.lb-row-2 .score-pill {
    background: rgba(192, 192, 192, 0.10);
    border-color: rgba(192, 192, 192, 0.30);
    color: #e6e6e6;
}
.lb-row-3 .score-pill {
    background: rgba(205, 127, 50, 0.12);
    border-color: rgba(205, 127, 50, 0.35);
    color: #e8a973;
}

@media (prefers-reduced-motion: reduce) {
    .rank-badge-1 { animation: none; }
}
@media (max-width: 640px) {
    .leaderboard-table thead th,
    .leaderboard-table td { padding: 12px 10px; }
    .leaderboard-table .lb-th-rank { width: 70px; }
    .rank-badge { width: 40px; height: 40px; }
    .player-avatar, .player-avatar-fallback { width: 34px; height: 34px; }
    .player-name { font-size: 0.92rem; }
    .lb-tab { padding: 8px 16px; font-size: 0.88rem; }
}

/* =====================================================================
   FORMS
   ===================================================================== */

.form-control,
.form-select {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    color: var(--text-1);
    padding: 0.7rem 0.95rem;
    border-radius: var(--r-md);
    transition:
        border-color var(--motion-base) var(--ease-out),
        box-shadow var(--motion-base) var(--ease-out),
        transform var(--motion-fast),
        background var(--motion-base);
}
.form-control:hover,
.form-select:hover { border-color: rgb(from var(--primary) r g b / 0.45); }
.form-control:focus,
.form-select:focus {
    background: var(--bg-2);
    color: var(--text-1);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 0 0 0.22rem rgb(from var(--primary) r g b / 0.20), var(--shadow-sm);
}
.form-label { color: var(--text-2); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; }

/* =====================================================================
   ACCORDION (rules)
   ===================================================================== */

.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    margin-bottom: 0.85rem;
    border-radius: var(--r-md) !important;
    overflow: hidden;
}
.accordion-button {
    background: var(--bg-2) !important;
    color: var(--text-1) !important;
    font-weight: 700;
    padding: 1.1rem 1.25rem;
}
.accordion-button:not(.collapsed) {
    background: linear-gradient(90deg, rgb(from var(--primary) r g b / 0.15), var(--bg-3)) !important;
    color: var(--primary-bright) !important;
    box-shadow: none;
}
.accordion-button:focus { box-shadow: 0 0 0 0.18rem rgb(from var(--primary) r g b / 0.25); }
.accordion-button::after { filter: invert(50%) sepia(40%) saturate(2000%) hue-rotate(238deg) brightness(110%); }
.accordion-body {
    background: var(--bg-card);
    color: var(--text-1);
    padding: 1.25rem 1.5rem;
}
.rule-item {
    padding: 0.85rem 0;
    border-bottom: 1px dashed var(--border-1);
}
.rule-item:last-child { border-bottom: none; }
.rule-item .rule-no {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 0.2em 0.7em;
    border-radius: var(--r-sm);
    font-weight: 700;
    margin-inline-end: 0.5rem;
    font-size: 0.85rem;
    font-family: monospace, system-ui;
}
.rule-item .punishment {
    color: var(--red);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* =====================================================================
   STATUS PILLS + LIVE BADGE
   ===================================================================== */

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32em 0.95em;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    position: relative;
    padding-inline-start: 1.6em;
    white-space: nowrap;
    transition: filter var(--motion-base);
}
.status-pill::before {
    content: "";
    position: absolute;
    inset-inline-start: 0.6em;
    top: 50%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    transform: translateY(-50%);
}
.status-pending   { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.status-processing{ background: rgba(217, 22, 22, 0.18); color: #D91616; }
.status-approved  { background: rgba(34, 197, 94, 0.15);  color: #4ade80; }
.status-rejected  { background: rgba(239, 68, 68, 0.15);  color: #f87171; }
.status-interview { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.status-paid      { background: rgba(34, 197, 94, 0.15);  color: #4ade80; }
.status-delivered { background: rgba(102, 187, 106, 0.18); color: #66bb6a; }
.status-cancelled { background: rgba(120, 120, 120, 0.18); color: #9e9e9e; }
.status-refunded  { background: rgba(255, 152, 0, 0.18);  color: #ffa726; }
.status-failed    { background: rgba(239, 68, 68, 0.18);  color: #f87171; }

.status-pending::before,
.status-processing::before,
.status-interview::before {
    animation: status-pulse 1.8s var(--ease-snap) infinite;
}
@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 0 0    currentColor; opacity: 1; }
    70%      { box-shadow: 0 0 0 10px transparent;  opacity: 0.6; }
}

.badge.bg-danger {
    background: var(--red) !important;
    box-shadow: var(--glow-red);
    animation: live-glow 2s var(--ease-snap) infinite;
}
@keyframes live-glow {
    50% { box-shadow: 0 0 28px var(--red-glow); }
}

/* =====================================================================
   ALERTS
   ===================================================================== */

.alert {
    animation: alert-in var(--motion-slow) var(--ease-spring);
    border-radius: var(--r-md) !important;
    box-shadow: var(--shadow-md) !important;
    padding: 14px 18px !important;
    font-weight: 600 !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-inline-start-width: 4px !important;
}
/* Solid, brand-aligned alert colors that don't bleed to white on dark bg.
   Uses !important to beat Bootstrap's CSS-variable defaults. */
.alert-success {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.30), rgba(34, 197, 94, 0.18)) !important;
    border-color: rgba(34, 197, 94, 0.65) !important;
    border-inline-start-color: #22c55e !important;
}
.alert-danger {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.30), rgba(239, 68, 68, 0.18)) !important;
    border-color: rgba(239, 68, 68, 0.65) !important;
    border-inline-start-color: #ef4444 !important;
}
.alert-info {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgb(from var(--primary) r g b / 0.32), rgb(from var(--primary) r g b / 0.18)) !important;
    border-color: rgb(from var(--primary) r g b / 0.65) !important;
    border-inline-start-color: var(--primary) !important;
}
.alert-warning {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.32), rgba(245, 158, 11, 0.18)) !important;
    border-color: rgba(245, 158, 11, 0.65) !important;
    border-inline-start-color: #f59e0b !important;
}
@keyframes alert-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   STORE â€” product cards
   ===================================================================== */

.product-card .price {
    color: var(--primary-bright);
    font-size: 1.5rem;
    font-weight: 800;
}
.product-card .price-old {
    color: var(--text-3);
    text-decoration: line-through;
    font-size: 1rem;
    font-weight: 500;
    margin-inline-end: 0.5rem;
}
.product-card .badge-featured {
    background: var(--primary-dark);
    color: #fff;
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    padding: 0.35em 1em;
    border-radius: var(--r-pill);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgb(from var(--primary-dark) r g b / 0.30);
}

/* =====================================================================
   FOOTER â€” 4-column
   ===================================================================== */

.site-footer {
    background:
        radial-gradient(ellipse 600px 200px at 50% -50%, rgb(from var(--primary) r g b / 0.10), transparent),
        var(--bg-2);
    border-top: 1px solid var(--border-1);
    margin-top: 5rem;
    padding-top: 3rem;
    padding-bottom: 1.5rem;
}
.footer-title {
    color: var(--primary-bright);
    font-weight: 900;
    font-size: 1.4rem;
}
.footer-title-small {
    color: var(--text-3);
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: -4px;
}
.footer-subtitle {
    color: var(--text-1);
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.footer-links a {
    color: var(--text-2);
    display: block;
    padding: 5px 0;
    transition: color var(--motion-fast), transform var(--motion-fast);
}
.footer-links a:hover {
    color: var(--primary-bright);
    transform: translateX(-3px);
}
.social-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-3);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-2);
    transition:
        background var(--motion-base),
        color var(--motion-base),
        transform var(--motion-base) var(--ease-spring);
}
.social-icon:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* =====================================================================
   LOGIN
   ===================================================================== */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 20%, rgb(from var(--primary) r g b / 0.15), transparent 40%),
        radial-gradient(circle at 70% 80%, rgb(from var(--primary-dark) r g b / 0.10), transparent 40%),
        var(--bg-1);
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--r-xl);
    padding: 2.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg), 0 0 80px rgb(from var(--primary) r g b / 0.15);
}
.login-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-1);
}

/* =====================================================================
   EMPTY STATES + MISC
   ===================================================================== */

.empty-state {
    text-align: center;
    color: var(--text-3);
    padding: 3rem 1rem;
    background: rgb(from var(--primary) r g b / 0.03);
    border: 1px dashed var(--border-1);
    border-radius: var(--r-lg);
}
.empty-state-mini {
    color: var(--text-3);
    font-size: 0.95rem;
    text-align: center;
    padding: 1.25rem 1rem;
    border: 1px dashed var(--border-1);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.01);
}
.empty-state-mini i {
    margin-inline-end: 6px;
    color: var(--primary-bright);
    opacity: 0.7;
}

.divider { height: 1px; background: var(--border-1); margin: 4rem 0; }

/* Back-to-top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    inset-inline-start: 30px;
    z-index: 1000;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-2);
    background: rgba(15, 10, 30, 0.85);
    backdrop-filter: blur(12px);
    color: var(--primary-bright);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition:
        opacity var(--motion-base) var(--ease-out),
        transform var(--motion-base) var(--ease-spring),
        background var(--motion-base),
        color var(--motion-base);
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* New row flash (admin compatibility) */
.row-new { animation: row-flash 1.6s var(--ease-out); }
@keyframes row-flash {
    0%   { background: rgb(from var(--primary) r g b / 0.18); }
    100% { background: transparent; }
}

/* =====================================================================
   TEAM CARD â€” clean "About Us" layout: square photo + name + role + socials
   ===================================================================== */
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition:
        transform var(--motion-base) var(--ease-out),
        box-shadow var(--motion-base) var(--ease-out),
        border-color var(--motion-base) var(--ease-out);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.team-card:hover {
    transform: translateY(-4px);
    border-color: rgb(from var(--primary) r g b / 0.40);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgb(from var(--primary) r g b / 0.20);
}
.team-card-photo {
    aspect-ratio: 1 / 1;
    width: 100%;
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    overflow: hidden;
    position: relative;
}
.team-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform var(--motion-slow) var(--ease-out);
}
.team-card:hover .team-card-photo img { transform: scale(1.04); }
.team-card-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.25);
    font-size: 4rem;
}
.team-card-body {
    padding: 18px 16px 16px;
    text-align: center;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.team-card-name {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 4px;
    line-height: 1.3;
}
.team-card-role {
    color: var(--primary-bright);
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.team-card-bio {
    color: var(--text-2);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 14px;
    min-height: 0;
    flex: 1 1 auto;
}
.team-card-socials {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}
.team-social {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgb(from var(--primary) r g b / 0.12);
    color: var(--primary-bright);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background var(--motion-fast) var(--ease-out),
                transform var(--motion-fast) var(--ease-out),
                color var(--motion-fast) var(--ease-out);
}
.team-social:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}
.team-social-code {
    width: auto;
    padding: 0 10px;
    font-family: monospace, system-ui;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
    .team-card, .team-card-photo img, .team-social { transition: none; }
    .team-card:hover { transform: none; }
    .team-card:hover .team-card-photo img { transform: none; }
}

/* =====================================================================
   TEAM SUB-HEADING â€” sub-group title within a team category
   (e.g. inside "Ø§Ù„Ù…Ø´Ø±ÙÙˆÙ†", split into "Ù‡ÙŠØ¯ Ø£Ø¯Ù…Ù†" / "Ø£Ø¯Ù…Ù† Ø£ÙˆÙ„")
   ===================================================================== */
.team-subheading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 16px;
}
.team-subheading-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(from var(--primary) r g b / 0.35), transparent);
}
.team-subheading-text {
    color: var(--primary-bright);
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    padding: 4px 14px;
    background: rgb(from var(--primary) r g b / 0.10);
    border: 1px solid rgb(from var(--primary) r g b / 0.30);
    border-radius: 999px;
    white-space: nowrap;
}

/* =====================================================================
   WHITELIST APPLICATION â€” numbered Q01..Q10 question cards + wizard
   ===================================================================== */
.wl-form { position: relative; }

/* Progress bar + step pill */
.wl-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}
.wl-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-bright));
    border-radius: 999px;
    transition: width 0.4s var(--ease-out);
}
.wl-step-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--text-2);
    font-size: 0.9rem;
}
.wl-step-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgb(from var(--primary) r g b / 0.15);
    color: var(--primary-bright);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.wl-step-title { font-weight: 600; color: var(--text-1); }

/* One step shown at a time */
.wl-step { display: none; }
.wl-step.is-active {
    display: block;
    animation: wl-fade-in 0.35s var(--ease-out);
}
@keyframes wl-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Nav buttons row */
.wl-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-1);
}
.wl-nav .btn[hidden] { display: none !important; }
.wl-nav [data-wl-prev]:disabled,
.wl-nav [data-wl-prev].is-disabled { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
    .wl-step.is-active { animation: none; }
    .wl-progress-bar { transition: none; }
}


.wl-q-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: rgb(from var(--primary) r g b / 0.05);
    border: 1px solid var(--border-1);
    border-radius: var(--r-sm);
    transition: border-color var(--motion-fast) var(--ease-out);
}
.wl-q-card:focus-within {
    border-color: var(--primary);
    background: rgb(from var(--primary) r g b / 0.09);
}
.wl-q-num {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.wl-q-body { min-width: 0; }
.wl-q-label {
    display: block;
    color: var(--text-1);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 6px;
    line-height: 1.5;
}
.wl-q-textarea {
    background: rgba(0, 0, 0, 0.20);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-1);
    line-height: 1.6;
    font-size: 0.92rem;
    padding: 8px 12px;
}

/* Read-only review variant â€” used in /profile/whitelist/{id} */
.wl-q-card-view {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    align-items: start;
    padding: 22px;
    margin-bottom: 16px;
}
.wl-q-card-view .wl-q-question {
    color: var(--primary-bright);
    font-weight: 700;
    font-size: 1.02rem;
    margin-bottom: 14px;
}
.wl-q-card-view .wl-q-answer {
    color: var(--text-1);
    background: rgba(0, 0, 0, 0.20);
    padding: 14px 18px;
    border-radius: var(--r-sm);
    line-height: 1.85;
    border-inline-start: 3px solid var(--primary);
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 640px) {
    .wl-q-card, .wl-q-card-view {
        grid-template-columns: 44px 1fr;
        gap: 12px;
        padding: 14px;
    }
    .wl-q-num { width: 38px; height: 38px; font-size: 0.85rem; }
}

/* =====================================================================
   FILE UPLOAD â€” custom styled drop zone replacing the native picker
   ===================================================================== */
.file-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 20px;
    border: 2px dashed rgb(from var(--primary) r g b / 0.35);
    border-radius: var(--r-md);
    background: rgb(from var(--primary) r g b / 0.04);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--motion-fast) var(--ease-out),
                background var(--motion-fast) var(--ease-out),
                transform var(--motion-fast) var(--ease-out);
    margin: 0;
}
.file-upload:hover,
.file-upload:focus-within,
.file-upload.is-dragover {
    border-color: var(--primary-bright);
    background: rgb(from var(--primary) r g b / 0.10);
}
.file-upload.is-filled {
    border-style: solid;
    border-color: rgba(74, 222, 128, 0.55);
    background: rgba(74, 222, 128, 0.08);
}
.file-upload input[type="file"] {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.file-upload-icon {
    font-size: 1.7rem;
    color: var(--primary-bright);
    line-height: 1;
}
.file-upload.is-filled .file-upload-icon {
    color: #4ade80;
}
.file-upload-text {
    color: var(--text-1);
    font-weight: 600;
    font-size: 0.95rem;
}
.file-upload-hint {
    color: var(--text-3);
    font-size: 0.78rem;
}

/* Read-only account number row (IBAN / STC Pay below the proof uploader).
   Block-level so the label sits ABOVE the input — same vertical rhythm as
   the buyer fields above it. */
.payment-account-row {
    display: block;
}
.payment-account-row .form-label {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin-bottom: 0.45rem;
    color: var(--primary-bright);
    font-weight: 700;
    font-size: 0.92rem;
}
.payment-account-row .form-label i {
    width: 1.25em; text-align: center;
}

/* Read-only account-number input — same look as a regular .form-control,
   but flagged visually (violet tint + monospace) so the buyer knows it's
   not editable and can be copied with a single click. */
.payment-account-input {
    font-family: 'JetBrains Mono', Consolas, ui-monospace, monospace;
    letter-spacing: 0.06em;
    color: var(--primary-bright) !important;
    background: rgb(from var(--primary) r g b / 0.06) !important;
    border-color: var(--border-2) !important;
    cursor: text;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.7rem 0.95rem;
}
.payment-account-input:focus,
.payment-account-input:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.2rem rgb(from var(--primary) r g b / 0.20) !important;
    background: rgb(from var(--primary) r g b / 0.10) !important;
}
.payment-account-input::selection {
    background: var(--primary);
    color: #fff;
}

/* =====================================================================
   PAYMENT METHOD CARDS — visual radio chooser at checkout
   ===================================================================== */

.payment-methods {
    margin-top: 0.25rem;
}

/* Make every payment-method column stretch to the tallest sibling so all
   cards in a row end up the same height regardless of label line count. */
.payment-methods.row { align-items: stretch; }
.payment-methods > [class*="col-"] { display: flex; }

.payment-methods .payment-method-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.15rem;
    min-height: 92px;
    height: 100%;
    width: 100%;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-2));
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin: 0;
    transition:
        border-color var(--motion-base) var(--ease-out),
        background   var(--motion-base) var(--ease-out),
        transform    var(--motion-base) var(--ease-spring),
        box-shadow   var(--motion-base) var(--ease-out);
}

/* Hide native radio entirely — the whole card is the affordance.
   Bullet-proof against Bootstrap form-control overrides via display:none. */
.payment-methods .payment-method-card input[type="radio"] {
    display: none !important;
}

/* Diagonal sheen — only visible when active. Mirrors .gaming-card / .server-card. */
.payment-methods .payment-method-card::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent 50%, rgb(from var(--primary-bright) r g b / 0.12) 80%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-slow) var(--ease-out);
}

/* Icon badge */
.payment-methods .payment-method-card .pm-icon {
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    display: inline-flex;
    align-items: center; justify-content: center;
    background: rgb(from var(--primary) r g b / 0.10);
    border: 1px solid var(--border-1);
    color: var(--primary-bright);
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all var(--motion-base) var(--ease-out);
}

/* Label */
.payment-methods .payment-method-card .pm-label {
    color: var(--text-1);
    font-weight: 700;
    font-size: 0.98rem;
    flex: 1;
    line-height: 1.3;
    letter-spacing: 0.2px;
    /* Ensure consistent visual weight even when label wraps (e.g. "تحويل بنكي (IBAN)") */
    display: flex;
    align-items: center;
    min-height: 2.6em;
}

/* Check — only visible when active. Spring-pop animation feels confirmed. */
.payment-methods .payment-method-card .pm-check {
    color: var(--primary-bright);
    font-size: 1.4rem;
    opacity: 0;
    transform: scale(0.4);
    transition: all var(--motion-base) var(--ease-spring);
    flex-shrink: 0;
    line-height: 1;
}

/* Hover — gentle lift, brighter border, icon pops */
.payment-methods .payment-method-card:hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
}
.payment-methods .payment-method-card:hover .pm-icon {
    background: rgb(from var(--primary) r g b / 0.18);
    border-color: var(--border-2);
    color: var(--text-1);
}

/* Active — pronounced violet ring + glow + filled icon + check pops in */
.payment-methods .payment-method-card.active {
    border-color: var(--primary);
    background:
        linear-gradient(135deg, rgb(from var(--primary) r g b / 0.18), rgb(from var(--primary-dark) r g b / 0.06) 60%),
        var(--bg-card);
    box-shadow:
        0 0 0 1px var(--primary),
        0 14px 32px rgb(from var(--primary) r g b / 0.28),
        var(--shadow-glow);
}
.payment-methods .payment-method-card.active::after {
    opacity: 1;
}
.payment-methods .payment-method-card.active .pm-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgb(from var(--primary) r g b / 0.45);
    transform: scale(1.05);
}
.payment-methods .payment-method-card.active .pm-label {
    color: #fff;
}
.payment-methods .payment-method-card.active .pm-check {
    opacity: 1;
    transform: scale(1);
}

/* Active state: clicking dampens slightly for tactile feedback */
.payment-methods .payment-method-card:active {
    transform: translateY(0) scale(0.98);
    transition-duration: var(--motion-fast);
}

/* Two columns on phones, three on tablets and up — denser than the
   default Bootstrap grid for this 5-card menu. */
@media (max-width: 575.98px) {
    .payment-methods .col-6,
    .payment-methods .col-md-6,
    .payment-methods .col-lg-4 {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* =====================================================================
   PAYMENT RESULT PAGE (success / cancel / error / processing)
   ===================================================================== */

.payment-result-card {
    background:
        linear-gradient(135deg, rgb(from var(--primary) r g b / 0.08), transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--r-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}
.payment-result-card::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, transparent 40%, rgb(from var(--primary-bright) r g b / 0.08) 50%, transparent 60%);
    pointer-events: none;
}
.payment-result-icon {
    font-size: 4.5rem;
    line-height: 1;
    display: inline-flex;
    width: 110px; height: 110px;
    border-radius: 50%;
    align-items: center; justify-content: center;
    background: rgb(from var(--bg-2) r g b / 0.6);
    border: 2px solid currentColor;
    box-shadow: 0 0 32px currentColor;
    animation: result-icon-pop 600ms var(--ease-spring);
}
@keyframes result-icon-pop {
    from { opacity: 0; transform: scale(0.4); }
    to   { opacity: 1; transform: scale(1); }
}
.payment-result-summary {
    background: rgb(from var(--bg-2) r g b / 0.6);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
}
.payment-result-summary code {
    color: var(--primary-bright);
    background: rgb(from var(--primary) r g b / 0.10);
    padding: 2px 8px;
    border-radius: var(--r-sm);
    font-size: 0.88rem;
    direction: ltr;
    unicode-bidi: bidi-override;
}

/* =====================================================================
   PARTNERS â€” dual-row marquee, opposite directions, infinite loop
   Markup:
     .partners-marquee
       .partners-track.partners-track-rtl  (top row, scrolls rightâ†’left)
       .partners-track.partners-track-ltr  (bottom row, scrolls leftâ†’right)
   Each track contains the partner list duplicated 2Ã— for seamless looping.
   ===================================================================== */
.partners-section {
    background: #000;
    overflow: hidden;
}
.partners-section .section-heading h2 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0;
}
.partners-marquee {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow: hidden;
    /* Edge fade so logos don't pop in/out abruptly */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.partners-track {
    display: flex;
    gap: 56px;
    align-items: center;
    width: max-content;
    will-change: transform;
}
/* Direction-explicit animations: track contains 2 copies, so -50% restarts seamlessly */
.partners-track-rtl { animation: partners-scroll-rtl 18s linear infinite; }
.partners-track-ltr { animation: partners-scroll-ltr 18s linear infinite; }
@keyframes partners-scroll-rtl {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes partners-scroll-ltr {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}
.partners-marquee:hover .partners-track {
    animation-play-state: paused;
}
.partner-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    min-width: 80px;
    text-decoration: none;
    color: #fff;
    transition: transform var(--motion-fast) var(--ease-out), opacity var(--motion-fast) var(--ease-out);
}
.partner-logo img {
    max-height: 100%;
    max-width: 180px;
    object-fit: contain;
}
.partner-logo:hover {
    transform: translateY(-3px);
}
.partner-name-text {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    color: #fff;
    white-space: nowrap;
}

/* Reduced-motion: stop marquee entirely */
@media (prefers-reduced-motion: reduce) {
    .partners-track-rtl,
    .partners-track-ltr { animation: none; transform: translateX(0); }
}

/* =====================================================================
   PROFILE PAGE â€” player profile with status cards + history
   Explicit RTL: every text reads right-to-left, anchored to the right edge.
   ===================================================================== */
.profile-page {
    min-height: calc(100vh - 200px);
    direction: rtl;
}
.profile-breadcrumb {
    color: var(--text-3);
    font-size: 0.85rem;
    margin-bottom: 24px;
    text-align: right;
}
.profile-breadcrumb a {
    color: var(--text-2);
    text-decoration: none;
    transition: color var(--motion-fast);
}
.profile-breadcrumb a:hover { color: var(--primary-bright); }
.profile-breadcrumb .sep { margin: 0 8px; opacity: 0.5; }
.profile-breadcrumb .current { color: var(--text-2); }

.profile-header {
    text-align: right;
    margin-bottom: 48px;
    position: relative;
}
.profile-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 0 30px rgb(from var(--primary) r g b / 0.25);
}
.profile-subtitle {
    color: var(--text-3);
    font-size: 0.95rem;
    margin: 8px 0 0;
    letter-spacing: 0.04em;
}
.profile-title::after {
    content: "";
    display: block;
    width: 90px; height: 3px;
    margin-top: 12px;
    margin-inline-start: auto;
    margin-inline-end: 0;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 999px;
}
.profile-identity {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
}
.profile-identity-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}
.profile-identity-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
}
.profile-identity-name {
    color: var(--text-1);
    font-weight: 600;
}
.profile-logout {
    color: var(--text-3);
    background: rgba(239, 68, 68, 0.10);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--motion-fast) var(--ease-out);
}
.profile-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--motion-fast) var(--ease-out);
}
.profile-card:hover { border-color: rgb(from var(--primary) r g b / 0.30); }
.profile-card-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    text-align: right;
}
.profile-card-head > .status-pill { margin-inline-start: auto; }
.profile-card-eyebrow {
    display: block;
    color: var(--text-3);
    font-family: monospace, system-ui;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    width: 100%;
}
.profile-card-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}
.profile-card-body {
    color: var(--text-2);
    text-align: right;
}
.profile-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--text-2);
}
.profile-msg-success { color: #4ade80; }
.profile-msg-error   { color: #f87171; }
.profile-msg-info    { color: #38bdf8; }
.profile-empty {
    color: var(--text-3);
    margin: 0 0 12px;
    font-style: italic;
}
.profile-cta-link {
    color: var(--primary-bright);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color var(--motion-fast);
}
.profile-cta-link:hover { color: #fff; }
.profile-notes {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.08);
    border-inline-start: 3px solid #f87171;
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-size: 0.92rem;
}
.dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.dot-pending   { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; animation: status-pulse 1.8s var(--ease-snap) infinite; }
.dot-approved  { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.dot-rejected  { background: #f87171; box-shadow: 0 0 8px #f87171; }
.dot-interview { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; animation: status-pulse 1.8s var(--ease-snap) infinite; }

.profile-history {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: rgb(from var(--primary) r g b / 0.06);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    transition: background var(--motion-fast);
}
.profile-history-item:hover { background: rgb(from var(--primary) r g b / 0.10); }
.profile-history-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}
.profile-history-main strong { color: #fff; font-size: 1rem; }
.profile-history-meta {
    color: var(--text-2);
    font-size: 0.88rem;
}
.profile-history-date {
    color: var(--text-3);
    font-size: 0.82rem;
}

/* Header player dropdown */
.nav-player-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    color: var(--text-1);
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--motion-fast), background var(--motion-fast);
}
.nav-player-btn:hover {
    border-color: var(--primary);
    background: rgb(from var(--primary) r g b / 0.10);
}
.nav-player-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.nav-player-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}
.nav-player-name {
    font-size: 0.9rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .site-nav .navbar-nav .nav-link { margin: 4px 0; padding: 0.5rem 1rem !important; }
    .nav-spacer { height: 64px; }
    .hero { padding: 70px 0 50px; }
    .hero h1 { font-size: clamp(2.25rem, 9vw, 4rem); }
    .community-card .step-number { font-size: 4rem; }
    .partner-logo { height: 44px; min-width: 60px; }
    .partner-logo img { max-width: 130px; }
    .partners-track { gap: 32px; }
    .profile-card { padding: 20px 18px; }
    .profile-card-head { flex-direction: column; align-items: flex-end; }
    .profile-history-item { padding: 12px 14px; }
}

/* =====================================================================
   PRODUCT GALLERY (store_product page)
   ===================================================================== */
.product-gallery-main {
    background: var(--bg-card, #141414);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-1, rgba(255,255,255,0.08));
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.18s ease;
}

.product-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.product-gallery-thumb {
    width: 70px;
    height: 70px;
    padding: 0;
    border: 2px solid var(--border-1, rgba(255,255,255,0.10));
    background: var(--bg-card, #141414);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    flex: 0 0 auto;
}
.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-gallery-thumb:hover {
    border-color: var(--primary-bright, #D91616);
    transform: translateY(-2px);
}
.product-gallery-thumb.active {
    border-color: var(--primary, #8C1111);
    box-shadow: 0 0 0 1px var(--primary, #8C1111),
                0 8px 18px rgba(140, 17, 17, 0.30);
}


/* =====================================================================
   .server-card--compact — used by the "أهم معالم مدينة الرين" 4-col grid
   on the home page. Tightens padding and shrinks the heading so 4 cards
   sit cleanly per row at the lg breakpoint.
   ===================================================================== */
.server-card--compact {
    padding: 1.5rem 1.25rem;
    text-align: center;
}
.server-card--compact h3 {
    font-size: 1.2rem;
    margin-top: 0.85rem;
    margin-bottom: 0.2rem;
}
.server-card--compact .text-gold {
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}
.server-card--compact .text-muted {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    min-height: 4.2em;
}
.server-card--compact .btn {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
}
.server-card--compact .badge-server {
    top: 0.85rem;
    inset-inline-start: 0.85rem;
    font-size: 0.65rem;
    padding: 0.3em 0.7em;
    letter-spacing: 1px;
}

/* Icon variant — FA glyph in a circular gradient pill */
.server-card-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg,
        rgb(from var(--primary)        r g b / 0.22),
        rgb(from var(--primary-bright) r g b / 0.10));
    border: 1px solid var(--border-2);
    color: var(--primary-bright);
    font-size: 1.7rem;
    transition: transform var(--motion-base) var(--ease-spring),
                color var(--motion-base) var(--ease-out);
}
.server-card--compact:hover .server-card-icon {
    transform: scale(1.08) rotate(-4deg);
    color: var(--text-1);
}


/* Compact card with image: smaller, fixed-height cover image */
.server-card--compact.server-card--has-image {
    padding-top: 0;
    overflow: hidden;
}
.server-card--compact .server-img {
    width: calc(100% + 2.5rem);
    margin-inline: -1.25rem;
    margin-top: -1.5rem;
    margin-bottom: 1rem;
    height: 150px;
    object-fit: cover;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-1);
    display: block;
}


/* =====================================================================
   R-4: utility classes replacing inline style="" attributes across views.
   Goal: remove `style-src 'unsafe-inline'` from CSP. Dynamic style values
   (depending on PHP variables) use data-* attributes + a tiny JS init in
   main.js that calls element.style.X = data-* — that path is NOT
   restricted by CSP (only attribute literals are).
   ===================================================================== */

/* Admin card max-widths (form layouts) */
.admin-card--w-700  { max-width: 700px; }
.admin-card--w-800  { max-width: 800px; }
.admin-card--w-900  { max-width: 900px; }

/* Thumbnail images shown next to file inputs in admin forms */
.thumb-preview        { max-height: 80px;  border-radius: 6px; }
.thumb-preview--lg    { max-height: 120px; border-radius: 8px; border: 1px solid var(--border-1); }
.thumb-preview--logo  { max-height: 60px;  background: #000; padding: 8px; border-radius: 6px; }

/* Table-row thumbnails */
.tr-thumb        { width: 80px; height: 50px; object-fit: cover; border-radius: 6px; }
.tr-thumb--video { width: 80px; height: 45px; object-fit: cover; border-radius: 6px; }
.tr-thumb--logo  { max-height: 40px; max-width: 120px; object-fit: contain; }
.tr-thumb--sq    { width: 50px;  height: 50px;  object-fit: cover; border-radius: 6px; }

/* Page-level layout containers */
.page-narrow-720    { max-width: 720px; }
.page-narrow-760    { max-width: 760px; }
.page-narrow-880    { max-width: 880px; }

/* Width helpers used in admin/security forms */
.field-w-140        { width: 140px; }
.field-w-200        { width: 200px; }
.field-w-220        { width: 220px; }

/* Inputs that show codes / serial-style content (LTR + monospace) */
.input-totp-code {
    width: 140px;
    font-family: monospace;
    letter-spacing: 0.2em;
    direction: ltr;
}
.input-totp-large {
    font-size: 1.3rem;
    letter-spacing: 0.4em;
    width: 200px;
    direction: ltr;
}

/* Generic flex row used in security + rate-limits cards */
.flex-fill-240 { flex: 1; min-width: 240px; }

/* Misc table tweaks */
.tbl-col-48           { width: 48%; }
.tbl-icon-cell        { min-width: 1.4em; text-align: center; }

/* Dashboard "icon-wrap" coloured backgrounds */
.icon-wrap--warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.icon-wrap--info    { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-wrap--success { background: rgba(34, 197, 94, 0.15); color: #4ade80; }

/* Misc UI bits */
.code-pill              { background: #000; padding: 2px 8px; border-radius: 6px; }
.cell-narrow-end-120    { width: 120px; text-align: end; }
.cell-y-tight           { padding: 0.25rem 0; }
.btn-as-link {
    background: none;
    border: 0;
    cursor: pointer;
}
.dropdown-item--logout {
    background: none;
    border: 0;
    width: 100%;
    text-align: inherit;
}
.social-icon--sm    { width: 36px; height: 36px; }
.disabled-link      { opacity: 0.5; pointer-events: none; }
.is-hidden          { display: none !important; }

/* Hero / placeholder cards */
.creator-portrait--placeholder {
    background: linear-gradient(180deg, var(--primary-dark), var(--bg-2));
    color: rgba(255, 255, 255, 0.4);
    font-size: 4rem;
}
.creator-stats {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-3);
    margin: 4px 0 6px;
}

/* Store product placeholder boxes */
.store-card-img--placeholder {
    height: 220px;
    font-size: 3rem;
}
.store-product-cover--placeholder {
    height: 360px;
    font-size: 5rem;
}

/* 2FA / login pages */
.login-2fa-shield { font-size: 3rem; color: var(--primary-bright); }
.input-2fa-code   {
    font-size: 1.4rem;
    letter-spacing: 0.4em;
    direction: ltr;
}

/* Pages 404 */
.page-404-num     { font-size: 6rem; color: var(--gold, var(--primary-bright)); }

/* Profile drawer panel platform-icon — dynamic colour via data-color attribute,
   wired by main.js. Keeps a static fallback. */
.profile-platform-icon { color: var(--text-1); }

/* Footer */
.footer-divider     { border-color: var(--border-1); }
.footer-disclaimer  { opacity: 0.7; }

/* Recovery codes display */
.recovery-codes-box {
    font-family: 'JetBrains Mono', Consolas, monospace;
    direction: ltr;
}
.recovery-codes-box .code-row {
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    padding: 4px 0;
}

/* Pages content gateway txn / RTL override on numeric IDs */
.bidi-ltr-override {
    direction: ltr;
    unicode-bidi: bidi-override;
}

/* Payment proof shown in admin store_order_view */
.payment-proof-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 1px solid var(--admin-border, var(--border-1));
}

/* Settings — hidden helper forms (POST refresh) */
.hidden-form { display: none; }

/* Page editor textarea — monospace for HTML editing */
.textarea-html-editor { font-family: monospace; }

/* Misc 2FA card highlight */
.card-2fa-warn {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.05);
}
.card-2fa-warn .card-title { color: #fbbf24; }

/* Payment result page — dynamic colour via data-color */
.payment-result-icon { color: inherit; }


/* R-4 final batch — utility classes for the last static styles */
.code-pill-note         { color: #888; font-size: 0.85em; }
.text-accent-link       { color: var(--primary-bright); }
.install-success-icon   { font-size: 4rem; color: var(--inst-success, var(--primary-bright)); }
.install-info-table     { width: 100%; color: #fff; }
.cell-w-140             { width: 140px; }
.hello-footer-note      { color: #888; font-size: 0.85em; margin-top: 3em; }

/* Dynamic-color targets: JS reads data-color and applies via element.style.color */
.payment-result-icon[data-color],
.profile-platform-icon[data-color] {
    /* color is set by main.js — the data-color attribute carries the value */
}


/* BH-4: hours pill on creator cards (homepage featured section). */
.creator-hours {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}
.creator-hours i { color: var(--primary-bright); font-size: 0.7em; }


/* =====================================================================
   Live broadcast cards — uniform sizing
   ---------------------------------------------------------------------
   The .gaming-card was variable-height when one card had no thumbnail.
   Now: every card has either a real thumbnail or a styled placeholder
   of identical aspect ratio, plus a min-height on the card-body so
   short titles don't shrink the card.
   ===================================================================== */

/* Force every live card to fill the grid row's height (bootstrap stretches
   columns by default but cards inside don't always fill). */
.live-streams-grid > [class*="col"] {
    display: flex;
}
.live-streams-grid > [class*="col"] > .gaming-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Standardize the thumbnail aspect ratio across all platforms. */
.gaming-card .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid var(--border-1);
    flex-shrink: 0;
}

/* Placeholder shown when no live thumbnail is available (e.g. TikTok
   age-restricted streams). Identical box size to a real thumbnail. */
.card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.35);
    background:
        radial-gradient(ellipse at center, rgb(from var(--primary-dark) r g b / 0.40) 0%, transparent 70%),
        linear-gradient(135deg, var(--bg-3), var(--bg-2));
}
.live-card-placeholder--youtube { background: linear-gradient(135deg, #240000, #0a0000); color: #ff0000; }
.live-card-placeholder--twitch  { background: linear-gradient(135deg, #1a0d40, #0c0420); color: #9146ff; }
.live-card-placeholder--kick    { background: linear-gradient(135deg, #003d1c, #001a0b); color: #53fc18; }
.live-card-placeholder--tiktok  { background: linear-gradient(135deg, #002a3a, #001218); color: #25f4ee; }
.live-card-placeholder--rumble  { background: linear-gradient(135deg, #2d1500, #140700); color: #85c742; }
.live-card-placeholder--dlive   { background: linear-gradient(135deg, #1c0033, #0a0014); color: #ffd700; }

/* Body grows to fill remaining space — cards line up vertically. */
.gaming-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.25rem;
    min-height: 140px;
}
.gaming-card .card-body h5 {
    /* Clamp titles to 2 lines so they don't blow out card heights */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;   /* reserve 2 lines */
    line-height: 1.4;
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
}
.gaming-card .card-body .btn-outline-warning {
    margin-top: auto;   /* anchor the "watch" button to the bottom */
    align-self: flex-start;
}

/* Tighter card padding at narrow widths */
@media (max-width: 575.98px) {
    .gaming-card .card-body  { padding: 1rem; }
    .gaming-card .card-img-top { height: 170px; }
    .card-img-placeholder    { font-size: 3rem; }
}


/* JL-3: per-job leaderboard cards */
.lb-job-title {
    color: var(--text-1);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-1);
}
.lb-job-title i { color: var(--primary-bright); }


/* JL-3: leaderboard tabs in jobs mode — many tabs, allow wrap + tighter spacing */
.leaderboard-tabs--jobs {
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    max-width: 920px;
    margin: 1.25rem auto 1.5rem;
}
.leaderboard-tabs--jobs .lb-tab {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
}
.leaderboard-tabs--jobs .lb-tab i {
    margin-inline-end: 0.35rem;
    font-size: 0.85em;
    color: var(--text-2);
}
.leaderboard-tabs--jobs .lb-tab.is-active i { color: #fff; }

.lb-active-job-title {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-1);
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid var(--border-1);
    background: linear-gradient(90deg, rgb(from var(--primary) r g b / 0.15), transparent 70%);
}
.lb-active-job-title i { color: var(--primary-bright); }
