:root {
    --logo-splash:   500px;
    --logo-nav:      122px;
    --nav-height:     62px;
    --nav-margin:      2rem;
    --dark-bg:       rgb(20, 21, 28);
    --accent:        #ff1fa5;
    --text:          #f0ece4;
}


/* ── Reset & Base ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: 'DM Sans', sans-serif;
    background-color: #111219;
    background-image: url('/assets/img/noise.png');
    background-repeat: repeat;
    color: var(--text);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.content { flex: 1; }


/* ── Splash & Intro Animation ─────────────────────────────── */

#splash-overlay {
    position: fixed; inset: 0;
    z-index: 1050;
    background-color: #111219;
    background-image: url('/assets/img/noise.png');
    pointer-events: none;
    opacity: 1;
}

#fireflies {
    position: fixed; inset: 0;
    z-index: 1099;
    pointer-events: none;
}

#logo {
    position: fixed;
    z-index: 1100;
    width:  var(--logo-splash);
    height: var(--logo-splash);
    object-fit: contain;
    pointer-events: none;
    top:  50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
    filter: drop-shadow(0 0 32px rgba(255,31,165,0.85));
}


/* ── Navigation ───────────────────────────────────────────── */

#navbar {
    position: fixed;
    top:   var(--nav-margin);
    left:  var(--nav-margin);
    right: var(--nav-margin);
    z-index: 900;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    overflow: visible;
}

.nav-inner {
    width: 100%; max-width: 1200px;
    padding: 0 20px;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: visible; z-index: 2;
}

#logo-slot {
    width:  var(--logo-nav);
    height: var(--logo-nav);
    flex-shrink: 0;
}

/* Clip-path trick: links grow outward from the center logo */
.nav-links {
    display: flex; align-items: center;
    list-style: none; overflow: hidden;
}
.nav-links.left  { justify-content: flex-end;  flex: 1; clip-path: inset(0 0 0 100%); }
.nav-links.right { justify-content: flex-start; flex: 1; clip-path: inset(0 100% 0 0); }

.nav-links li a {
    display: block; padding: 8px 16px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.55rem; letter-spacing: 0.08em;
    color: rgba(240,236,228,0.65);
    text-decoration: none; white-space: nowrap;
    transition: color 0.2s, letter-spacing 0.2s;
}
.nav-links li a:hover  { color: var(--accent); letter-spacing: 0.14em; text-shadow: 0 0 10px var(--accent); }
.nav-links li a.active { color: var(--accent); text-shadow: 0 0 10px var(--accent); }

.nav-links.left.grow  { animation: growLeft  3.5s cubic-bezier(0.03, 0.7, 0.15, 1) forwards; }
.nav-links.right.grow { animation: growRight 3.5s cubic-bezier(0.03, 0.7, 0.15, 1) forwards; }
@keyframes growLeft  { to { clip-path: inset(0 0  0 0%); } }
@keyframes growRight { to { clip-path: inset(0 0% 0 0);  } }

#hamburger {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 8px;
    position: absolute; right: 12px;
    background: none; border: none; z-index: 3;
}
#hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
#hamburger.open span:nth-child(1) { transform: translateY(7px)  rotate(45deg);  }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobile-menu {
    display: none;
    position: fixed;
    top: calc(var(--nav-margin) + var(--nav-height) + 20px);
    left: var(--nav-margin);
    right: var(--nav-margin);
    background: rgba(17, 18, 25, 0.8);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 31, 165, 0.6);
    padding: 12px 0;
    z-index: 850;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 8px 32px rgba(17, 18, 25, 0.5);
    text-align: center;
    width: calc(100vw - 30%);
    margin: 0 auto;
    border-radius: .5rem;
    pointer-events: none;
}

#mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu a {
    display: block;
    padding: 11px 28px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    color: rgba(240,236,228,0.8);
    text-decoration: none;
    border-radius: .5rem;
}
#mobile-menu a:hover { color: var(--accent); }

@media (max-width: 767px) {
    .nav-links   { display: none; }
    #hamburger   { display: flex; }
    #mobile-menu { display: block; }
}


/* ── Page Sections ────────────────────────────────────────── */

.content #home {
    position: relative; z-index: 2;
    padding-top: calc(var(--nav-margin) + var(--nav-height) + 80px);
    text-align: center;
}
.content #home h1,
.errorheading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(6rem, 8vw, 7rem);
    letter-spacing: 0.04em; line-height: 1;
    text-shadow: 2px 2px 5px var(--accent);
}
.content #home h1 span {
    color: var(--accent);
    text-shadow: 2px 2px 5px var(--text);
}
.content #home p {
    margin-top: 20px; font-size: 1.1rem;
    color: rgba(240,236,228,0.5);
    max-width: 520px; margin-inline: auto; line-height: 1.7;
}

.content #about h1,
.content #leaderboard h1,
.content #team h1 {
    font-family: 'Bebas Neue', sans-serif;
    color: rgb(216, 216, 216);
    font-size: clamp(2rem, 6vw, 4rem);
    letter-spacing: 0.04em; line-height: 1;
    text-shadow: 2px 2px 5px var(--accent);
}


/* ── About Cards ──────────────────────────────────────────── */

.about-card, .form-control {
    border-radius: .5rem;
    border: 1px solid rgba(255, 31, 165, 0.25);
    background: rgba(255, 31, 165, 0.04);
    padding: 1.5rem 1.25rem;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
    height: 100%;
}

.form-control,
.form-control:focus {
    color: var(--text);
}

.about-card:hover,
.card,
.form-control:focus {
    border-color: rgba(255, 31, 165, 0.6);
    background: rgba(255, 31, 165, 0.08);
}

.form-control:focus { box-shadow: 0 0 10px var(--accent); }

.about-icon {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 6px var(--accent));
}

.about-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.about-desc {
    font-size: 0.9rem;
    color: rgba(240, 236, 228, 0.55);
    line-height: 1.6;
}


/* ── Team Cards ───────────────────────────────────────────── */

.team-card {
    height: 120px;
    overflow: hidden;
    border-radius: .5rem;
    transition: all 0.3s;
    position: relative;
    border: 1px solid rgba(255, 31, 165, 0.25);
}
.team-card:hover { border-color: rgba(255, 31, 165, 0.6); }

.team-card .background {
    position: absolute; inset: 0;
    overflow: hidden;
    filter: blur(10px) brightness(40%);
    z-index: 0;
}
.team-card .background img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transform: scale(1.2);
}

.team-card > img {
    margin: 10px;
    float: left;
    width: 100px;
    position: relative; z-index: 1;
    border-radius: .3rem;
}

.team-card > .name,
.team-card > .description {
    display: block;
    position: relative;
    line-height: 50px;
    height: 50px;
    color: rgba(240,236,228,0.95);
}

.team-card .name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 1.5rem;
    padding-top: 20px;
}


/* ── Server Carousel ──────────────────────────────────────── */

#server {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%; height: 100%;
}

.item {
    position: absolute;
    top: 50%; left: 50%;
    width: 600px;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.8s ease, opacity 0.8s ease, filter 0.8s ease;
    opacity: 0;
    z-index: 0;
    cursor: pointer;
    box-shadow: 0 0 2px 1px var(--accent);
    border-radius: .5rem;
    overflow: hidden;
    background-color: #111219;
    background-image: url('/assets/img/noise.png');
}

.item .info-bar {
    background-color: var(--dark-bg);
    border-top: 2px solid rgba(255, 31, 165, 0.57);
    background-image: url("/assets/img/noise.png");
}

.item .info-bar .btn {
    font-family: 'Bebas Neue', sans-serif;
}

.item img {
    width: 100%;
    display: block;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.item:not(.active) .info-bar { display: none; }

.item.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1; z-index: 50;
    box-shadow: 0 0 15px 0px var(--accent);
}
.item.next1 { transform: translate(0%,    -50%) scale(.8); opacity: 1;   z-index: 40; filter: blur(1px); }
.item.next2 { transform: translate(40%,   -50%) scale(.6); opacity: 0.7; z-index: 30; filter: blur(2px); }
.item.prev1 { transform: translate(-100%, -50%) scale(.8); opacity: 1;   z-index: 40; filter: blur(1px); }
.item.prev2 { transform: translate(-140%, -50%) scale(.6); opacity: 0.7; z-index: 30; filter: blur(2px); }


/* ── Filter Bar ───────────────────────────────────────────── */

#server-filter-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.filter-btn {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255,31,165,0.25);
    background: rgba(255,31,165,0.04);
    color: rgba(240,236,228,0.5);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter-btn:hover {
    border-color: rgba(255,31,165,0.5);
    color: var(--text);
}
.filter-btn.active {
    background: rgba(255,31,165,0.15);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(255,31,165,0.2);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.wipe-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.75rem;
    color: rgba(240,236,228,0.4);
    opacity: 0.4;
}

.wipe-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wipe-legend-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.wipe-legend-dot.wipe-legend-urgent   { background: rgba(255,180,0,0.8);  box-shadow: 0 0 6px rgba(255,180,0,0.6);  }
.wipe-legend-dot.wipe-legend-critical { background: rgba(255,60,60,0.8);  box-shadow: 0 0 6px rgba(255,60,60,0.6);  }

.item.wipe-urgent   { box-shadow: 0 0 12px rgba(255,180,0,0.5);  border-color: rgba(255,180,0,0.6)  !important; }
.item.wipe-critical { box-shadow: 0 0 16px rgba(255,60,60,0.6);  border-color: rgba(255,60,60,0.7)  !important; }


/* ── Player Count Bar ─────────────────────────────────────── */

.player-bar-wrap {
    display: inline-block;
    vertical-align: middle;
    width: 48px; height: 4px;
    background: rgba(240,236,228,0.12);
    border-radius: 2px;
    margin: 0 6px;
    overflow: hidden;
}
.player-bar-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s ease;
    min-width: 2px;
}


/* ── Skeleton Loader ──────────────────────────────────────── */

#server-skeleton {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.skeleton-item {
    position: absolute;
    top: 50%; left: 50%;
    width: 600px;
    height: 350px;
    transform: translate(-50%, -50%) scale(1);
    transition: all 0.8s ease;
    opacity: 0.7; z-index: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 0 2px 1px var(--accent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    display: flex;
    flex-direction: column;
    background-color: #111219;
    background-image: url('/assets/img/noise.png');
}

.skeleton-item .skeleton-image {
    flex: 0 0 300px;
    background: linear-gradient(90deg, #2c2c2c 25%, #3a3a3a 50%, #2c2c2c 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-item .skeleton-info {
    flex: 0 0 50px;
    background-color: var(--dark-bg);
    border-top: 2px solid rgba(255, 31, 165, 0.57);
    background-image: url("/assets/img/noise.png");
}

.skeleton-item.active { transform: translate(-50%, -50%) scale(1); opacity: 1;   z-index: 50; box-shadow: 0 0 15px 0px var(--accent); }
.skeleton-item.next1  { transform: translate(0%,    -50%) scale(.8); opacity: 0.7; z-index: 40; filter: blur(1px); }
.skeleton-item.next2  { transform: translate(40%,   -50%) scale(.6); opacity: 0.5; z-index: 30; filter: blur(2px); }
.skeleton-item.prev1  { transform: translate(-100%, -50%) scale(.8); opacity: 0.7; z-index: 40; filter: blur(1px); }
.skeleton-item.prev2  { transform: translate(-140%, -50%) scale(.6); opacity: 0.5; z-index: 30; filter: blur(2px); }

.item .skeleton-text,
.item .skeleton-btn {
    display: inline-block;
    height: 12px;
    border-radius: 3px;
    background: linear-gradient(90deg, #2c2c2c 25%, #3a3a3a 50%, #2c2c2c 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}
.item .skeleton-btn { width: 50px; margin-left: 5px; }

@keyframes shimmer {
    0%   { background-position:  200% 0; }
    100% { background-position: -200% 0; }
}


/* ── Status Indicator ─────────────────────────────────────── */

.indicator-wrapper {
    position: absolute;
    right: 20px; top: 15px;
    width: 12px; height: 12px;
}

.indicator {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
}

.indicator.online  { background-color: #20bf60; box-shadow: 0 0 10px #20bf60; }
.indicator.away    { background-color: #ffdb64; box-shadow: 0 0 10px #ffdb64; }
.indicator.offline { background-color: #ff5757; box-shadow: 0 0 10px #ff5757; }

@keyframes ping {
    75%, 100% { opacity: 0; transform: scale(2); }
}
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.1, 1) infinite; }


/* ── Footer ───────────────────────────────────────────────── */

footer { opacity: 0.75; }
footer .link { color: var(--accent); }


/* ── Utilities ────────────────────────────────────────────── */

.text-accent   { color: var(--accent); }
.text-shadow   { text-shadow: 1px 1px 10px var(--text); }
.text-default  { color: var(--text); }
.bg-noise      { background-image: url('/assets/img/noise.png'); }
.bg-dark       { background-color: var(--dark-bg) !important; }
.border-accent { border-color: var(--accent); }
.shadow-accent { box-shadow: 0 0 20px 5px var(--accent); }
.opacity-70    { opacity: 0.7; }

.badge-accent {
    border-radius: 4px;
    border: 1px solid rgba(255, 31, 165, 0.25);
    background: rgba(255, 31, 165, 0.04);
}

.divider {
    margin-left: 10px; margin-right: 10px;
    border: 1px solid var(--text);
    opacity: 0.6;
}

.font-bebas { font-family: 'Bebas Neue', sans-serif; }

.heading {
    font-family: 'Bebas Neue', sans-serif;
    color: rgb(216, 216, 216);
    letter-spacing: 0.04em; line-height: 1;
    text-shadow: 2px 2px 5px var(--accent);
}

input::placeholder,
textarea::placeholder {
    color: var(--text) !important;
    opacity: .4;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}


/* ── Bootstrap Overrides ──────────────────────────────────── */

.btn-accent         { background-color: var(--accent); font-family: 'Bebas Neue', sans-serif; font-size: 1rem; letter-spacing: 0.08em; }
.btn-accent:hover         { color: var(--accent); border: 1px solid var(--accent);}
.btn-outline-accent { color: var(--accent); border-color: var(--accent); }
.btn-outline-accent:hover { color: #000; background-color: var(--accent); border-color: var(--accent); }
.btn-group-xs > .btn, .btn-xs { font-size: .975rem; line-height: 0.75; border-radius: .1rem; }


/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 720px) {
    .item, .skeleton-item { width: calc(100vw - 10%); }
}

@media (max-width: 767px) {
    .btn-connect { display: none; }

    .info-bar {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
        padding: 10px 6px;
    }
    .info-bar > span        { display: inline-block; font-size: 0.9rem; }
    .info-bar .divider      { display: none; }
    .info-bar .float-end {
        float: none !important;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 6px;
        width: 100%;
    }
    .info-bar .btn {
        flex: 1 1 auto;
        max-width: 120px;
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    .info-bar > span:first-child   { font-weight: 600; color: var(--text); }
    .info-bar > span:last-of-type  { opacity: 0.7; font-size: 0.8rem; }
}


/* ── Recruitment Toast ────────────────────────────────────── */

#recruit-toast-wrapper {
    z-index: 1010;
    position: fixed;
    bottom: 30px;
    right: 30px;
}

#recruit-toast {
    width: 300px;
    background: var(--dark-bg);
    background-image: url('/assets/img/noise.png');
    border: 1px solid rgba(255,31,165,0.45);
    border-radius: 10px;
    padding: 14px 16px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
    box-shadow: inset 0 0 40px rgba(255,31,165,0.04), 0 0 10px 0 var(--accent);
}
@keyframes toastIn  { to { transform: translateY(0); opacity: 1; } }
#recruit-toast.hiding { animation: toastOut 0.35s cubic-bezier(0.4,0,1,1) forwards; }
@keyframes toastOut { to { transform: translateY(16px); opacity: 0; pointer-events: none; } }

.toast-top   { display: flex; align-items: flex-start; gap: 10px; }
.toast-icon  {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px;
    background: rgba(255,31,165,0.12); border: 1px solid rgba(255,31,165,0.3);
    display: flex; align-items: center; justify-content: center; position: relative;
}
.toast-icon svg { width: 16px; height: 16px; fill: var(--accent); }

.ping-dot { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ping-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 1.4s cubic-bezier(0,0,0.1,1) infinite; }

.toast-body  { flex: 1; min-width: 0; }
.toast-label { font-family: 'Bebas Neue', sans-serif; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 2px; opacity: 0.85; }
.toast-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.15rem; letter-spacing: 0.05em; color: var(--text); line-height: 1.15; }
.toast-sub   { font-size: 0.78rem; color: rgba(240,236,228,0.5); margin-top: 2px; line-height: 1.4; }

.toast-close { flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 2px; color: rgba(240,236,228,0.3); font-size: 14px; transition: color 0.15s; margin-top: -2px; }
.toast-close:hover { color: rgba(240,236,228,0.8); }

.toast-cta   {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,31,165,0.08); border: 1px solid rgba(255,31,165,0.2);
    border-radius: 6px; padding: 8px 12px;
    text-decoration: none; transition: background 0.2s, border-color 0.2s;
}
.toast-cta:hover { background: rgba(255,31,165,0.16); border-color: rgba(255,31,165,0.5); }
.cta-text  { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; letter-spacing: 0.08em; color: var(--accent); }
.cta-arrow { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.toast-cta:hover .cta-arrow { transform: translateX(3px); }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}
.float { animation: float 4s ease-in-out infinite; }

@keyframes float-tilt {
    0%, 100% { transform: translateY(0px)   rotate(0deg); }
    50%       { transform: translateY(-12px) rotate(1deg); }
}
.float-tilt { animation: float-tilt 6s ease-in-out infinite; }


/* ── 404 Error Page ───────────────────────────────────────── */

.error-wrap {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-404-container {
    position: relative;
    display: inline-block;
}

.error-scanlines {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
            to bottom,
            transparent 0px, transparent 3px,
            rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
}

.error-404 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(8rem, 22vw, 16rem);
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--text);
    text-shadow: 2px 2px 5px var(--accent);
    animation: glitch404 4s infinite;
    user-select: none;
    position: relative;
}

.error-404::before,
.error-404::after {
    content: '404';
    position: absolute; inset: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: inherit;
    letter-spacing: inherit;
}
.error-404::before {
    color: var(--accent);
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    animation: glitch404Before 4s infinite;
}
.error-404::after {
    color: #00f0ff;
    clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%);
    animation: glitch404After 4s infinite;
}

@keyframes glitch404 {
    0%, 90%, 100% { transform: none; }
    91% { transform: skewX(-1deg); }
    92% { transform: skewX(1deg); }
    93% { transform: none; }
    95% { transform: skewX(-0.5deg); }
    97% { transform: none; }
}
@keyframes glitch404Before {
    0%, 90%, 100% { transform: none; opacity: 0; }
    91% { transform: translate(-4px, 0); opacity: 0.8; }
    92% { transform: translate(4px, 0);  opacity: 0.8; }
    93% { transform: none; opacity: 0; }
    95% { transform: translate(-2px, 1px); opacity: 0.6; }
    97% { opacity: 0; transform: none; }
}
@keyframes glitch404After {
    0%, 90%, 100% { transform: none; opacity: 0; }
    91% { transform: translate(4px, 0);  opacity: 0.8; }
    92% { transform: translate(-4px, 0); opacity: 0.8; }
    93% { opacity: 0; transform: none; }
    95% { transform: translate(2px, -1px); opacity: 0.5; }
    97% { opacity: 0; transform: none; }
}

.error-msg {
    color: rgba(240, 236, 228, 0.45);
    font-size: 0.95rem;
    max-width: 380px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.er-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--text);
    background: rgba(255,31,165,0.1);
    border: 1px solid rgba(255,31,165,0.4);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.er-btn:hover {
    background: rgba(255,31,165,0.2);
    border-color: rgba(255,31,165,0.8);
    box-shadow: 0 0 18px rgba(255,31,165,0.25);
    color: var(--text);
}
.er-btn svg {
    width: 14px; height: 14px;
    stroke: var(--accent); fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}


/* ── Scrollbar ────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }

::-webkit-scrollbar-thumb {
    background: url('/assets/img/noise.png') repeat, rgba(255,31,165,0.4);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: url('/assets/img/noise.png') repeat, rgba(255,31,165,0.8);
}
::-webkit-scrollbar-track {
    background: url('/assets/img/noise.png') repeat, #111219;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,31,165,0.4) #111219;
}


/* ── Leaderboard ──────────────────────────────────────────── */

.leaderboard-card {
    border-radius: .5rem;
    border: 1px solid rgba(255,31,165,0.25);
    background: rgba(255,31,165,0.04);
    padding: 1rem;
}

.leaderboard-header,
.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: .4rem;
}

.leaderboard-header {
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255,31,165,0.2);
    margin-bottom: 6px;
}

.leaderboard-row {
    margin-bottom: 6px;
    transition: all 0.2s ease;
}
.leaderboard-row:hover {
    background: rgba(255,31,165,0.08);
    transform: translateX(4px);
}

.lb-rank   { width: 40px; font-family: 'Bebas Neue', serif; }
.lb-avatar { width: 34px; height: 34px; border-radius: 0.5rem; margin-right: 10px; border: 1px solid rgba(255,31,165,0.4); }
.lb-name   { flex: 1; }
.lb-stat   { width: 80px; text-align: right; font-size: 0.9rem; }

.lb-top1 { background: rgba(255,31,165,0.15); }
.lb-top2 { background: rgba(255,31,165,0.1);  }
.lb-top3 { background: rgba(255,31,165,0.06); }

.leaderboard-search-input {
    width: 100%;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 31, 165, 0.25);
    background: rgba(255, 31, 165, 0.04);
    color: rgba(240, 236, 228, 0.5);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.leaderboard-search-input:focus,
.leaderboard-search-input:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 31, 165, 0.4);
}


/* ── Modal ────────────────────────────────────────────────── */

.modal-backdrop.show {
    background-image: url(/assets/img/noise.png);
    background-repeat: repeat;
}

.modal-content {
    background: rgba(17,18,25,0.85);
    border: 1px solid rgba(255,31,165,.4);
    border-radius: .5rem;
    box-shadow: 0 0 40px rgba(255,31,165,.25), 0 20px 60px rgba(0,0,0,.6);
}

.modal-body {
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
}


/* ── Player Modal ─────────────────────────────────────────── */

#player-avatar {
    border-radius: 10px;
    border: 1px solid rgba(255,31,165,.4);
}

#playerTab {
    border-bottom: none;
    justify-content: space-evenly;
    gap: 6px;
    padding-bottom: 1rem;
}

#playerTab .nav-link {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    color: rgba(240,236,228,0.5);
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
#playerTab .nav-link:hover {
    color: var(--text);
    background: rgba(255,31,165,0.08);
    box-shadow: 0 0 10px rgba(255,31,165,0.15);
}
#playerTab .nav-link.active {
    color: var(--accent);
    background: rgba(255,31,165,0.12);
    border: 1px solid rgba(255,31,165,0.4);
    box-shadow: 0 0 12px rgba(255,31,165,0.25), inset 0 0 10px rgba(255,31,165,0.15);
}

.stat-card {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 31, 165, 0.25);
    background: rgba(255, 31, 165, 0.04);
}

#tab-gathering.active,
#tab-farming.active,
#tab-explosives.active {
    display: flex;
    justify-content: space-evenly;
}

#player-name,
.player-trophy,
#player-rank {
    font-family: 'Bebas Neue', sans-serif;
    color: rgb(216, 216, 216);
    letter-spacing: 0.04em; line-height: 1;
    text-shadow: 2px 2px 5px var(--accent);
}


/* ── Player Table ─────────────────────────────────────────── */

.pm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pm-table thead th {
    text-align: center;
    padding: 8px 10px;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.08em;
    color: var(--accent);
    border-bottom: 1px solid rgba(255,31,165,0.4);
}

.pm-table tbody tr {
    border-bottom: none;
    transition: background 0.2s ease;
}
.pm-table tbody tr:hover { background: rgba(255,31,165,0.08); }

.pm-table td {
    padding: 8px 10px;
    text-align: center;
    color: rgba(240,236,228,0.75);
    font-size: 1rem;
    font-weight: 600;
}

.pm-weapon-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    border-radius: 6px;
    border: 1px solid rgba(255,31,165,0.3);
    background: rgba(255,31,165,0.05);
    font-size: 0.8rem;
    color: var(--text);
    transition: all 0.2s ease;
}
.pm-weapon-box img { display: block; }

.pm-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    border: 1px solid rgba(255,31,165,0.25);
    background: rgba(255,31,165,0.05);
    color: var(--text);
    transition: all 0.2s ease;
}
.pm-badge i { color: var(--accent); }

.rating-badge,
.time-badge {
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
    background: rgba(255,31,165,0.05);
    color: var(--text);
    border: 1px solid rgba(255,31,165,0.2);
    transition: all 0.2s ease;
}
.rating-badge i { color: var(--accent); }

/* ── Discord Buttons ──────────────────────────────────────── */
.discord-btn {
    background: rgba(255,31,165,0.05);
    border: 1px solid rgba(255,31,165,0.2);
    border-radius: 8px;
    padding: 8px;
    width: 220px;
    transition: all 0.2s ease;
    color: var(--text);
    letter-spacing: 0.04em; line-height: 1;
    text-shadow: 2px 2px 5px var(--accent);
}
.discord-btn:hover {
    background: rgba(255,31,165,0.15);
    border-color: var(--accent);
}
.discord-btn img { border-radius: 6px; }

/* ── Stats Modal ──────────────────────────────────────────────
   Append these rules to your existing stylesheet.
   ─────────────────────────────────────────────────────────── */

/* ── Stats Modal ──────────────────────────────────────────────
   Append these rules to your existing stylesheet.
   ─────────────────────────────────────────────────────────── */

/* Modal size */
.stats-modal-content {
    border: 1px solid rgba(255, 31, 165, 0.4);
}

.stats-modal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Loading / Error states ──────────────────────────────────*/

.stats-loading,
.stats-error,
.stats-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 2rem;
    color: rgba(240, 236, 228, 0.4);
    font-size: 0.9rem;
}

.stats-error {
    color: rgba(255, 80, 80, 0.8);
}


/* ── Section label ───────────────────────────────────────────*/

.stats-section-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    color: var(--accent);
    opacity: 0.8;
    text-transform: uppercase;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}


/* ── Stat cards row ──────────────────────────────────────────*/

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .stats-cards { grid-template-columns: repeat(2, 1fr); }
}

.stats-card {
    background: rgba(255, 31, 165, 0.04);
    border: 1px solid rgba(255, 31, 165, 0.18);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s, background 0.2s;
}

.stats-card:hover {
    border-color: rgba(255, 31, 165, 0.4);
    background: rgba(255, 31, 165, 0.08);
}

.stats-card-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(240, 236, 228, 0.4);
    text-transform: uppercase;
}

.stats-card-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

/* Status dot */
.stats-status-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stats-status-dot.online  { background: #20bf60; box-shadow: 0 0 6px #20bf60; }
.stats-status-dot.offline { background: #ff5757; box-shadow: 0 0 6px #ff5757; }
.stats-status-dot.small   { width: 6px; height: 6px; }

/* Uptime badge */
.stats-uptime-val        { color: var(--text); }
.stats-uptime-val.good   { color: #20bf60; text-shadow: 0 0 8px rgba(32,191,96,0.4); }
.stats-uptime-val.warn   { color: #ffdb64; text-shadow: 0 0 8px rgba(255,219,100,0.4); }
.stats-uptime-val.bad    { color: #ff5757; text-shadow: 0 0 8px rgba(255,87,87,0.4); }


/* ── Map info tags ───────────────────────────────────────────*/

.stats-map-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stats-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    font-size: 0.78rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 31, 165, 0.2);
    background: rgba(255, 31, 165, 0.04);
    color: rgba(240, 236, 228, 0.65);
}


/* ── Chart ───────────────────────────────────────────────────*/

.stats-chart-wrap {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 31, 165, 0.12);
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 4px 2px;
}

.stats-chart-wrap canvas {
    width: 100% !important;
    display: block;
}


/* ── Session log ─────────────────────────────────────────────*/

.stats-sessions {
    border: 1px solid rgba(255, 31, 165, 0.15);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.8rem;
}

.stats-session-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0.7;
    border-bottom: 1px solid rgba(255, 31, 165, 0.15);
    background: rgba(255, 31, 165, 0.04);
}

.stats-session-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
    color: rgba(240, 236, 228, 0.7);
    align-items: center;
}

.stats-session-row:last-child { border-bottom: none; }

.stats-session-row:hover { background: rgba(255, 31, 165, 0.06); }

.stats-session-row.online {
    background: rgba(32, 191, 96, 0.04);
}
.stats-session-row.online:hover {
    background: rgba(32, 191, 96, 0.08);
}

.stats-session-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-session-time {
    white-space: nowrap;
    color: rgba(240, 236, 228, 0.45);
    font-size: 0.75rem;
    text-align: right;
}

/* ── Chart toggle buttons ─────────────────────────────────────*/

.stats-chart-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.stats-toggle-btn {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 1px 8px;
    border-radius: 3px;
    border: 1px solid rgba(255, 31, 165, 0.25);
    background: transparent;
    color: rgba(240, 236, 228, 0.4);
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.6;
}

.stats-toggle-btn:hover:not(:disabled) {
    border-color: rgba(255, 31, 165, 0.5);
    color: var(--text);
}

.stats-toggle-btn.active {
    background: rgba(255, 31, 165, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.stats-toggle-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* ── Online players pill grid ────────────────────────────────*/

.stats-players-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

.stats-player-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 0.78rem;
    border-radius: 20px;
    border: 1px solid rgba(32, 191, 96, 0.2);
    background: rgba(32, 191, 96, 0.05);
    color: rgba(240, 236, 228, 0.75);
    transition: background 0.15s, border-color 0.15s;
}

.stats-player-pill:hover {
    background: rgba(32, 191, 96, 0.1);
    border-color: rgba(32, 191, 96, 0.4);
    color: var(--text);
}