:root {
    --apex-bg: #071116;
    --apex-panel: #0d171d;
    --apex-panel-2: #101d24;
    --apex-line: rgba(92, 139, 145, 0.22);
    --apex-text: #edf5f3;
    --apex-muted: #94a8ad;
    --apex-accent: #00b98b;
    --apex-accent-soft: rgba(0, 185, 139, 0.14);
    --apex-gold: #f4c45c;
}

body.apex-body {
    margin: 0;
    min-height: 100vh;
    color: var(--apex-text);
    background:
        radial-gradient(circle at 75% 0%, rgba(0, 185, 139, 0.12), transparent 32%),
        radial-gradient(circle at 15% 15%, rgba(42, 107, 112, 0.16), transparent 24%),
        var(--apex-bg);
}

.apex-topbar {
    position: fixed;
    z-index: 90;
    top: 0;
    right: 0;
    left: 248px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 22px;
    border-bottom: 1px solid var(--apex-line);
    background: rgba(7, 17, 22, 0.88);
    backdrop-filter: blur(18px);
}

.apex-brand {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--apex-text);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.apex-brand img,
.apex-sidebar-brand img {
    width: 160px;
    max-height: 42px;
    object-fit: contain;
}

.apex-search {
    width: min(380px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border: 1px solid var(--apex-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    padding: 0 14px;
    color: var(--apex-muted);
}

.apex-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--apex-text);
}

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

.apex-chip,
.apex-wallet,
.apex-link-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--apex-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--apex-text);
    padding: 0 14px;
    font-weight: 700;
}

.apex-wallet {
    border-color: rgba(244, 196, 92, 0.28);
    color: #ffe5a7;
}

.apex-link-btn.primary {
    border-color: rgba(0, 185, 139, 0.35);
    background: linear-gradient(135deg, #00c18f, #008e78);
    color: #041410;
}

.apex-mobile-toggle {
    display: none;
}

.apex-sidebar {
    position: fixed;
    z-index: 95;
    inset: 0 auto 0 0;
    width: 248px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px;
    border-right: 1px solid var(--apex-line);
    background: rgba(8, 18, 24, 0.97);
}

.apex-sidebar-brand {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.apex-nav,
.apex-support {
    display: grid;
    gap: 7px;
}

.apex-nav a,
.apex-support a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    border-radius: 14px;
    color: var(--apex-muted);
    padding: 0 12px;
    font-weight: 600;
}

.apex-nav a:hover,
.apex-nav a.active,
.apex-support a:hover {
    color: var(--apex-text);
    background: var(--apex-accent-soft);
}

.apex-sidebar-card {
    border: 1px solid var(--apex-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    padding: 14px;
}

.apex-sidebar-card strong {
    display: block;
    color: var(--apex-text);
}

.apex-sidebar-card span {
    color: var(--apex-muted);
}

.apex-online {
    color: var(--apex-accent);
}

.apex-content {
    min-height: 100vh;
    margin-left: 248px;
    padding: 88px 18px 28px;
}

.apex-ticker {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    overflow: hidden;
    border: 1px solid rgba(0, 185, 139, 0.22);
    border-radius: 16px;
    background: rgba(0, 185, 139, 0.05);
    padding: 0 14px;
    margin-bottom: 18px;
}

.apex-ticker strong {
    color: var(--apex-accent);
    white-space: nowrap;
}

.apex-ticker-track {
    display: flex;
    gap: 18px;
    min-width: max-content;
    color: var(--apex-muted);
    animation: apex-scroll 28s linear infinite;
}

.apex-ticker-track b {
    color: var(--apex-text);
}

.apex-ticker-track em {
    color: var(--apex-accent);
    font-style: normal;
    font-weight: 700;
}

.apex-hero {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    border: 1px solid var(--apex-line);
    border-radius: 26px;
    background:
        linear-gradient(115deg, rgba(5, 15, 18, 0.94), rgba(7, 29, 28, 0.78)),
        radial-gradient(circle at 78% 18%, rgba(0, 185, 139, 0.3), transparent 28%),
        linear-gradient(135deg, #101317, #102521);
    padding: 34px;
}

.apex-hero small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--apex-accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.apex-hero h1 {
    max-width: 640px;
    margin: 18px 0 8px;
    color: var(--apex-text);
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800;
}

.apex-hero p {
    max-width: 560px;
    color: var(--apex-muted);
    font-size: 16px;
}

.apex-cta-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.apex-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.apex-stat {
    border: 1px solid var(--apex-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    padding: 18px;
}

.apex-stat b {
    display: block;
    color: var(--apex-text);
    font-size: 26px;
}

.apex-stat span {
    color: var(--apex-muted);
}

.apex-section {
    margin-top: 22px;
}

.apex-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.apex-section-head h2 {
    margin: 0;
    color: var(--apex-text);
}

.apex-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.apex-game-card {
    overflow: hidden;
    border: 1px solid var(--apex-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.025);
}

.apex-game-card img,
.apex-game-art {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.apex-game-art {
    display: grid;
    align-content: end;
    background:
        radial-gradient(circle at 80% 10%, rgba(244, 196, 92, 0.24), transparent 28%),
        radial-gradient(circle at 18% 80%, rgba(0, 185, 139, 0.24), transparent 30%),
        #0c151b;
    padding: 16px;
    font-size: 24px;
    font-weight: 800;
}

.apex-game-meta {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.apex-footer {
    margin-top: 32px;
    border-top: 1px solid var(--apex-line);
    color: var(--apex-muted);
    padding-top: 18px;
}

@keyframes apex-scroll {
    to { transform: translateX(-45%); }
}

@media (max-width: 980px) {
    .apex-topbar {
        left: 0;
        height: 64px;
        padding: 0 14px;
    }

    .apex-brand {
        display: flex;
    }

    .apex-search {
        display: none;
    }

    .apex-sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    body.apex-menu-open .apex-sidebar {
        transform: translateX(0);
    }

    .apex-mobile-toggle {
        display: inline-flex;
    }

    .apex-content {
        margin-left: 0;
        padding: 82px 12px 24px;
    }

    .apex-stat-grid {
        grid-template-columns: 1fr;
    }
}
