/* === NEW RUNETOPIC HEADER TEST CSS (FIXED + CLEAN + MOBILE FRIENDLY) === */

/* Header Container */
.site-header {
    position: fixed;           /* keep header on top */
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 10050;            /* above IPS mobile bars */
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Purple glow line under header */
.site-header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #8956ff;
    box-shadow: 0 0 12px #8956ff;
    z-index: 3;
}

/* Background Image Layer */
.header-bg {
    position: absolute;
    inset: 0;
    background: url('/assets/images/header-bg.jpg') center/cover no-repeat;
    opacity: 0.18;
    z-index: 1;
    pointer-events: none;
}

/* Header Inner Content */
.header-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;     /* single source of truth */
    margin: 0 auto;
    padding: 0 20px;       /* single source of truth */
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Logo */
.logo img {
    height: 55px;
    width: auto;
    display: block;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
}

/* nav text */
.main-nav ul li a {
    color: #e8e8e8 !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.25s ease;
}

.main-nav ul li a:hover {
    color: #b590ff !important;
}

/* Hover underline */
.main-nav a:hover::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 4px;
    background: #8956ff;
    border-radius: 2px;
}

/* Right Side Buttons */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.login {
    color: #e8e8e8 !important;
    text-decoration: none;
}

.register {
    background: #8956ff;
    padding: 8px 16px;
    color: #fff !important;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
}

.icon-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.icon-btn:hover {
    opacity: 0.7;
}

/* Fix for toplist spacing — force columns to fill the screen */
#serverList .col-12,
#serverList .col-xl-9,
#serverList .col-lg-9,
#serverList .col-md-12,
#serverList .col-sm-12 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
}

/* === CRITICAL FIX === */
/* Push site content below the new fixed header */
body {
    padding-top: 90px !important; /* header height */
}

/* =========================
   MOBILE FIX (CLEAN WEBSITE-STYLE TOP)
   - header becomes compact
   - hide username + logout button
   - keep only the 3-dot icon on the right
   - keep IPS purple mobile icon bar under the header
   ========================= */
@media screen and (max-width: 900px) {

    html, body {
        overflow-x: hidden !important;
    }

    /* Make header compact on mobile */
    .site-header {
        height: 60px !important;
    }

    .header-inner {
        padding: 0 14px !important;
        max-width: 100% !important;
        height: 60px !important;
    }

    .logo img {
        height: 40px !important;
    }

    /* Hide desktop nav links row on mobile */
    .site-header .main-nav,
    html body header.site-header nav.main-nav,
    html body header.site-header nav.main-nav * {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hide username + logout/register on the top row (clean header) */
    .site-header .header-right .login,
    .site-header .header-right .register {
        display: none !important;
    }

    /* Keep only ONE icon button (the 3 dots) */
    .site-header .header-right .icon-btn:first-of-type {
        display: none !important; /* hides magnifier */
    }

    .site-header .header-right {
        gap: 6px !important;
    }

    .site-header .icon-btn {
        font-size: 20px !important;
        padding: 6px 8px !important;
    }

    /* IPS mobile icon bar sits under your fixed header */
    .ipsMobileNavBar,
    #elMobileNav,
    html body .ipsMobileNavBar,
    html body #elMobileNav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: 60px !important;
        z-index: 10040 !important;
    }

    /* page offset: header(60) + mobilebar(~56) */
    body,
    html body {
        padding-top: 116px !important;
    }
}