/* ============================================================================
   BASE COLORS
============================================================================ */
:root {
    --bg-main: #020617;
    --bg-secondary: #0f172a;
    --bg-card: #111827;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --accent: #6366f1;
    --accent2: #8b5cf6;
    --accent3: #22c55e;
}

/* RESET */
html,
body {
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

/* ============================================================================
   PAGE WRAPPER
============================================================================ */
.cl-login-page {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================================================
   FIXED HERO BACKGROUND (BEHIND EVERYTHING)
============================================================================ */
.cl-login-hero {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle at top, rgba(99, 102, 241, 0.20), transparent 60%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.15), transparent 60%),
        var(--bg-secondary);
}

/* ============================================================================
   CENTER LAYOUT
============================================================================ */
.cl-login-center {
    position: relative;
    z-index: 2;
    /* content is ABOVE background */
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* ============================================================================
   LOGIN CARD (VISIBLE NOW)
============================================================================ */
.cl-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    /* FIX: Visible card */
    padding: 40px 35px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    position: relative;
}

/* ============================================================================
   LOGO
============================================================================ */
.cl-login-logo-box {
    text-align: center;
}

.cl-login-logo {
    width: 110px;
    filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.55));
}

/* ============================================================================
   TITLES
============================================================================ */
.cl-login-title {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 800;
}

.cl-login-sub {
    text-align: center;
    font-size: .95rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ============================================================================
   BUTTONS
============================================================================ */
.cl-login-buttons {
    margin-top: 25px;
}

.cl-btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    border: none;
    margin-bottom: 12px;
    transition: .2s;
}

/* Primary (Login) */
.cl-btn-primary {
    background: linear-gradient(135deg, var(--accent3), var(--accent), var(--accent2));
    color: #0f172a;
}

.cl-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Bridge */
.cl-btn-accent {
    background: rgba(129, 140, 248, .25);
    border: 1px solid rgba(129, 140, 248, .45);
    color: var(--text-main);
}

.cl-btn-accent:hover {
    background: rgba(129, 140, 248, .35);
}

/* Guest */
.cl-btn-secondary {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: var(--text-main);
}

.cl-btn-secondary:hover {
    background: rgba(55, 65, 81, 0.85);
}

/* ============================================================================
   REGISTER
============================================================================ */
.cl-register-box {
    margin-top: 15px;
    text-align: center;
}

.cl-register-text {
    font-size: .85rem;
    color: var(--text-muted);
}

.cl-register-link {
    font-size: .95rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.cl-register-link:hover {
    color: var(--accent2);
}

/* ============================================================================
   LANGUAGE SELECTOR
============================================================================ */
.cl-lang-select {
    margin-top: 25px;
    padding-top: 15px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    cursor: pointer;
}

.cl-lang-flag {
    width: 28px;
    border-radius: 4px;
}
/* ============================================================================
   SEO SECTION
============================================================================ */
.cl-login-seo {
    padding: 50px 20px;
    position: relative;
    z-index: 2;
    /* Visible above background */
}

.cl-login-seo-inner {
    max-width: 820px;
    margin: 0 auto;
}

.cl-seo-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.cl-seo-subtitle {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.cl-seo-text {
    font-size: .95rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 14px;
}

.cl-seo-list li {
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ============================================================================
   ANIMATION (NOW DEFAULTS TO VISIBLE)
============================================================================ */
.reveal {
    opacity: 1 !important;
    /* FIX: No invisible content */
    transform: none !important;
}
/* ============================================================================
   CHATLEGEND MEMBER BAR — HORIZONTAL AVATAR STRIP
   Fully compatible with iokchat theme
   ========================================================================== */

.cl-member-bar {
    width: 100%;
    padding: 40px 16px 45px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.cl-member-bar-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 22px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.88); /* deep translucent dark */
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.48);
    position: relative;
}

/* ===========================
   Header & Counter
   =========================== */
.cl-member-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.cl-member-bar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f9fafb;
    letter-spacing: 0.02em;
}

.cl-member-count {
    font-size: 0.9rem;
    color: #a5b4fc; /* soft purple */
    font-weight: 600;
}

/* ===========================
   Avatar Scroller
   =========================== */
.cl-member-avatar-scroll {
    height: 70px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.cl-member-avatar-track {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

/* ===========================
   Avatars
   =========================== */
.cl-member-avatar {
    display: inline-flex;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.cl-member-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.95);
    object-fit: cover;
    background: #111827;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.cl-member-avatar img:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.9);
}

/* ===========================
   No Members
   =========================== */
.cl-member-none {
    color: #9ca3af;
    font-size: 0.92rem;
    padding: 10px 0;
}

/* ===========================
   Mobile Tweaks
   =========================== */
@media (max-width: 600px) {
    .cl-member-avatar {
        width: 46px;
        height: 46px;
    }

    .cl-member-avatar img {
        width: 46px;
        height: 46px;
    }

    .cl-member-bar-inner {
        padding: 22px 16px;
    }

    .cl-member-bar-header h3 {
        font-size: 1.05rem;
    }

    .cl-member-count {
        font-size: 0.82rem;
    }
}
/* ============================================================================
   CHATLEGEND / IOKCHAT USER LIST SYSTEM
   Modern avatar-focused, dark-mode friendly
   ========================================================================== */

/* --- Container --- */
#container_user {
    width: 100%;
    padding: 14px;
    margin: 0 auto;
    color: #e5e7eb;
    position: relative;
    z-index: 3;
}

/* --- Section titles (OnAir, Online, Offline) --- */
.user_count {
    margin: 10px 0 6px 0;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #a5b4fc;
    display: flex;
    align-items: center;
}

.user_count .ucount {
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(120deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- User list container --- */
.online_user,
.offline_user {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* --- Single user row (from createUserlist) --- */
.user_item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.60);
    border: 1px solid rgba(148, 163, 184, 0.20);
    transition: background 0.15s ease-out, border-color 0.15s ease-out;
}

.user_item:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(129, 140, 248, 0.45);
}

/* --- Avatar --- */
.user_item_avatar,
.user_avatar,
.user_tumb {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0;
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.9);
    object-fit: cover;
    margin-right: 10px;
    background: #111827;
}

.user_item_avatar:hover {
    transform: scale(1.05);
}

/* --- Username --- */
.user_item_name {
    flex-grow: 1;
    font-size: 0.90rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.02em;
}

/* --- Mood / Additional text --- */
.user_item_mood {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* --- Rank / Role Icons --- */
.user_item_icon {
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
}

.user_item_icon img {
    width: 18px;
    height: 18px;
    opacity: 0.85;
}

/* Ghost / Invisible icon */
.list_ghost {
    width: 18px !important;
    height: 18px !important;
    opacity: 0.55;
}

/* --- Offline state (greyed out) --- */
.offline_user .user_item {
    opacity: 0.65;
    background: rgba(15, 23, 42, 0.35);
    border-color: rgba(148, 163, 184, 0.15);
}

.offline_user .user_item:hover {
    opacity: 0.85;
}

/* --- OnAir highlight --- */
.online_user .user_item.onair_user {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(129, 140, 248, 0.45);
}

/* --- Responsive adjustments --- */
@media (max-width: 600px) {
    .user_item {
        padding: 6px 8px;
    }

    .user_item_avatar,
    .user_avatar,
    .user_tumb {
        width: 38px !important;
        height: 38px !important;
    }

    .user_item_name {
        font-size: 0.85rem;
    }
}