:root {
    --bg: #0a0014;
    --bg2: #120024;
    --fg: #ffffff;
    --fg-dim: #9c84c6;
    --accent: #b158ff;
    --accent-glow: rgba(177, 88, 255, 0.8);
    --radius: 16px;
    font-family: "JetBrains Mono", monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: var(--bg);
    color: var(--fg);
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* default background overlay */
.bg-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #32005a 0%, #0a0014 70%);
    opacity: 0.55;
    z-index: -1;
}

/* GIF background ONLY on pages that have body.bg-gif (main index) */
body.bg-gif {
    background: #000;
}

body.bg-gif .bg-overlay {
    background-image: url("../sitebg.gif") !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    opacity: 1 !important;
}

/* HUD TOP LEFT */
.hud-top-left {
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 12px;
    background: rgba(0,0,0,0.6);
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--fg);
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
}

.hud-time {
    font-weight: bold;
}
.hud-note {
    font-size: 12px;
    color: var(--accent);
}

/* HUD TOP RIGHT (SERVER ICON) */
.hud-top-right {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 20;
}

.server-link {
    text-decoration: none;
}

.discord-badge {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px #ffffff33;
    overflow: hidden;
}

.discord-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* MAIN WRAPPER */
.main-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}

/* LOGO */
.logo {
    font-size: 44px;
    font-weight: 600;
    letter-spacing: 4px;
    text-shadow: 0 0 18px var(--accent-glow);
}

/* NAV TABS */
.top-tabs {
    margin-top: 20px;
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 32px;
    background: radial-gradient(circle at top, #2a0044 0, #090014 65%);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    color: var(--fg);
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05),
        0 0 16px rgba(0,0,0,0.9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tab-btn:hover {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.12),
        0 0 20px rgba(177,88,255,0.9);
}

.tab-btn-active {
    background: radial-gradient(circle at top, #ff4bff 0, #b158ff 40%, #090014 90%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.3),
        0 0 30px rgba(177,88,255,0.9);
}

/* SEARCH BAR */
.search-section {
    margin-top: 25px;
}

#user-search {
    width: 60%;
    max-width: 600px;
    background: rgba(12, 0, 30, 0.9);
    border: 1px solid rgba(255,255,255,0.14);
    padding: 14px 18px;
    border-radius: 999px;
    color: var(--fg);
    outline: none;
    text-align: center;
    font-size: 14px;
    transition: 0.25s;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.02),
        0 0 18px rgba(0,0,0,0.9);
}

#user-search:focus {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.18),
        0 0 18px var(--accent-glow);
}

/* DIVIDER */
.divider {
    width: 100%;
    height: 2px;
    margin: 30px 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    border-radius: 5px;
}

/* SECTION TITLES / USERS GRID */
.users-section .section-title {
    font-size: 22px;
    margin-bottom: 22px;
    color: #e8d2ff;
    text-shadow: 0 0 9px rgba(177,88,255,0.6);
    letter-spacing: 4px;
}

.users-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-top: 10px;
    padding-bottom: 40px;
}

/* RESET LINKS */
a, a:visited, a:hover, a:active {
    text-decoration: none;
    color: inherit;
}

/* USER PILLS (outer frame like reference) */
.user-pill {
    position: relative;
    border-radius: 20px;
    background: rgba(10,0,30,0.95);
    border: 1px solid rgba(162, 110, 255, 0.5);
    padding: 3px;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.5),
        0 0 18px rgba(0,0,0,0.9);
    overflow: hidden;
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.user-pill-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 10px 6px;
    background: radial-gradient(circle at top, rgba(80,0,140,0.3) 0, rgba(5,0,20,0.9) 70%);
    font-size: 13px;
    color: #f8e8ff;
}

.user-pill:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.2),
        0 0 22px rgba(177,88,255,0.8);
}

/* WHITE GLOW (default users) */
.user-pill.user-pill-white {
    border-color: rgba(200, 180, 255, 0.8);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.15),
        0 0 18px rgba(255,255,255,0.35);
}

/* RGB GLOW (special users) */
.user-pill.user-pill-rgb {
    animation: pillRgbBorder 4s linear infinite;
}

.user-pill.user-pill-rgb .user-pill-inner {
    background: linear-gradient(120deg,
        rgba(255,0,255,0.4),
        rgba(0,255,255,0.4),
        rgba(0,255,128,0.4),
        rgba(255,255,0,0.4),
        rgba(255,0,255,0.4));
    background-size: 300% 300%;
    animation: pillRgbInner 4s linear infinite;
    color: #ffffff;
    font-weight: 600;
}

@keyframes pillRgbBorder {
    0% {
        border-color: #ff00ff;
        box-shadow: 0 0 18px rgba(255,0,255,0.9), 0 0 28px rgba(255,0,255,0.7);
    }
    25% {
        border-color: #00ffff;
        box-shadow: 0 0 18px rgba(0,255,255,0.9), 0 0 28px rgba(0,255,255,0.7);
    }
    50% {
        border-color: #00ff80;
        box-shadow: 0 0 18px rgba(0,255,128,0.9), 0 0 28px rgba(0,255,128,0.7);
    }
    75% {
        border-color: #ffff00;
        box-shadow: 0 0 18px rgba(255,255,0,0.9), 0 0 28px rgba(255,255,0,0.7);
    }
    100% {
        border-color: #ff00ff;
        box-shadow: 0 0 18px rgba(255,0,255,0.9), 0 0 28px rgba(255,0,255,0.7);
    }
}

@keyframes pillRgbInner {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ARCHIVE LOGIN BUTTON (bottom-left) */
.archive-login-btn-fixed {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    background: #5865F2 !important;
    color: #ffffff !important;
    padding: 12px 26px !important;
    font-size: 14px !important;
    border-radius: 999px;
    box-shadow: 0 0 20px rgba(88,101,242,1) !important;
}
/* ===========================
   RGB TEXT FOR SPECIAL USERS
   =========================== */

.user-pill-rgb .user-pill-inner .rgb-text {
    animation: rgbText 2s linear infinite;
}

/* hue-shift text colour */
@keyframes rgbText {
    0%   { color: #ff004c; }
    16%  { color: #ff9900; }
    33%  { color: #ffff00; }
    50%  { color: #00ff80; }
    66%  { color: #00d0ff; }
    83%  { color: #c000ff; }
    100% { color: #ff004c; }
}

/* ===========================
   HALL OF AUTISM
   =========================== */

.hoa-title {
    margin-top: 10px;
    font-size: 36px;
    letter-spacing: 4px;
    color: #64ff64;
    text-shadow: 0 0 14px rgba(0,255,0,0.8);
}

.hoa-section {
    margin-top: 40px;
}

.hoa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.hoa-card {
    background: rgba(7, 0, 20, 0.9);
    border-radius: 18px;
    border: 1px solid rgba(170, 120, 255, 0.6);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.5),
        0 0 18px rgba(0,0,0,0.8);
    padding: 18px 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hoa-card-image-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    background: #050016;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.hoa-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hoa-card-image-placeholder {
    width: 100%;
    height: 100%;
    font-size: 12px;
    color: var(--fg-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hoa-card-name {
    font-size: 16px;
    margin-bottom: 8px;
    color: #64ff64;
    text-shadow: 0 0 10px rgba(0,255,0,0.7);
}

.hoa-card-bio {
    font-size: 12px;
    color: var(--fg-dim);
    line-height: 1.5;
    max-height: 170px;
    overflow-y: auto;
    width: 100%;
    padding-right: 4px;
}

/* thin scrollbar */
.hoa-card-bio::-webkit-scrollbar {
    width: 4px;
}
.hoa-card-bio::-webkit-scrollbar-track {
    background: transparent;
}
.hoa-card-bio::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 999px;
}

/* RESPONSIVE */
@media (max-width: 700px) {
    .hoa-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .main-wrapper {
        padding-top: 90px;
    }
    .logo {
        font-size: 32px;
    }
    #user-search {
        width: 90%;
    }
}
