/* =====================================================
   ENERGY-CS.NET COMMUNITY CHAT
===================================================== */

.energy-chat-section {
    --chat-blue: #00aaff;
    --chat-light: #38bdff;
    --chat-dark: #006fa8;

    max-width: 1200px;
    margin: 25px auto 65px;
    padding: 0 20px;
    color: #e4edf4;
}

/* HEADER */

.energy-chat-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.energy-chat-kicker {
    color: var(--chat-blue);
    font-family: Orbitron, Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.energy-chat-head h2 {
    margin: 10px 0;
    color: #fff;
    font-family: Orbitron, Arial, sans-serif;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
}

.energy-chat-head h2 span {
    color: var(--chat-blue);
    text-shadow: 0 0 15px rgba(0,170,255,.4);
}

.energy-chat-head p {
    margin: 0;
    color: #8295a5;
    font-size: 13px;
}

/* ONLINE USERS */

.energy-chat-online {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    color: #9eb2c1;
    background: #06121d;
    border: 1px solid rgba(0,170,255,.25);
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
}

.energy-chat-online strong {
    color: #fff;
    font-family: Orbitron, Arial, sans-serif;
}

.energy-live-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #20df8a;
    box-shadow: 0 0 10px #20df8a;
}

/* CHAT BOX */

.energy-chat-box {
    position: relative;
    overflow: visible;
    background: linear-gradient(
        145deg,
        #081725,
        #030a11
    );
    border: 1px solid rgba(0,170,255,.3);
    border-radius: 13px;
    box-shadow:
        0 15px 45px rgba(0,0,0,.35),
        0 0 25px rgba(0,170,255,.04);
}

.energy-chat-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: var(--chat-blue);
    box-shadow: 0 0 15px var(--chat-blue);
}

/* MESSAGES */

.energy-chat-messages {
    height: 390px;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    scrollbar-width: thin;
    scrollbar-color: #006fa8 #06111b;
}

.energy-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.energy-chat-messages::-webkit-scrollbar-track {
    background: #06111b;
}

.energy-chat-messages::-webkit-scrollbar-thumb {
    background: #006fa8;
    border-radius: 10px;
}

.chat-loading,
.chat-empty {
    margin: auto;
    color: #71899a;
    text-align: center;
    font-size: 13px;
}

/* MESSAGE CARD */

.chat-message {
    padding: 11px 13px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.055);
    border-radius: 9px;
    transition: background .2s, border-color .2s;
    overflow-wrap: anywhere;
}

.chat-message:hover {
    background: rgba(0,170,255,.035);
    border-color: rgba(0,170,255,.15);
}

.chat-message-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.chat-user {
    color: #dceefa;
    font-size: 13px;
    font-weight: 800;
}

.chat-user.vip {
    color: #ffd76a;
    text-shadow: 0 0 10px rgba(255,215,106,.2);
}

/* RANK BADGES */

.chat-role {
    padding: 3px 7px;
    border-radius: 4px;
    font-family: Orbitron, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
}

.chat-role.vip {
    color: #ffd76a;
    background: rgba(255,215,106,.08);
    border: 1px solid rgba(255,215,106,.35);
}

.chat-role.admin {
    color: #38bdff;
    background: rgba(0,170,255,.1);
    border: 1px solid rgba(0,170,255,.4);
}

.chat-role.owner {
    color: #ff7cbd;
    background: rgba(255,78,155,.1);
    border: 1px solid rgba(255,78,155,.4);
}

/* MESSAGE TIME */

.chat-time {
    margin-left: auto;
    color: #60798b;
    font-size: 10px;
}

/* MESSAGE TEXT */

.chat-message-text {
    color: #c7d7e2;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* MODERATION BUTTON */

.chat-mod {
    padding: 4px 8px;
    color: #ff9aa7;
    background: #31151b;
    border: 1px solid #8d3542;
    border-radius: 5px;
    font-size: 10px;
    cursor: pointer;
}

.chat-mod:hover {
    color: #fff;
    background: #8d3542;
}

/* CHAT INPUT AREA */

.energy-chat-form {
    padding: 14px 16px;
    border-top: 1px solid rgba(0,170,255,.2);
}

.chat-compose {
    display: flex;
    align-items: center;
    gap: 9px;
    position: relative;
}

.chat-compose input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    color: #eaf7ff;
    background: #020a11;
    border: 1px solid rgba(0,170,255,.35);
    border-radius: 8px;
    outline: none;
    font-family: Arial, sans-serif;
    font-size: 13px;
    transition: .2s;
}

.chat-compose input::placeholder {
    color: #61798b;
}

.chat-compose input:focus {
    border-color: var(--chat-blue);
    box-shadow: 0 0 0 3px rgba(0,170,255,.1);
}

/* SEND BUTTON */

.chat-send {
    width: 46px;
    height: 44px;
    flex-shrink: 0;
    color: #00131e;
    background: var(--chat-blue);
    border: 1px solid var(--chat-blue);
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: .2s;
}

.chat-send:hover {
    color: #00131e;
    background: var(--chat-light);
    box-shadow: 0 0 18px rgba(0,170,255,.3);
}

.chat-send:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* EMOJI BUTTON */

.chat-emoji-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-emoji-btn {
    width: 44px;
    height: 44px;
    color: var(--chat-light);
    background: #071b2a;
    border: 1px solid rgba(0,170,255,.35);
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: .2s;
}

.chat-emoji-btn:hover {
    background: rgba(0,170,255,.12);
    border-color: var(--chat-blue);
}

/* EMOJI MENU */

.chat-emoji-menu {
    position: absolute;
    z-index: 20;
    bottom: 51px;
    left: 0;
    width: 195px;
    padding: 9px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #071522;
    border: 1px solid rgba(0,170,255,.45);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.6);
}

.chat-emoji-menu button {
    padding: 9px;
    color: #fff;
    background: #0c2639;
    border: 0;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
}

.chat-emoji-menu button:hover {
    background: rgba(0,170,255,.2);
}

/* GUEST LOGIN */

.chat-login-note {
    padding: 12px;
    color: #93a9b9;
    text-align: center;
    font-size: 13px;
}

.chat-login-note a {
    color: var(--chat-light);
    font-weight: 700;
    text-decoration: none;
}

.chat-login-note a:hover {
    color: #fff;
}

/* FOOTER */

.chat-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    color: #526c7e;
    font-size: 10px;
}

.chat-foot i {
    color: var(--chat-blue);
}

/* HIDDEN */

.chat-emoji-menu[hidden] {
    display: none !important;
}

/* RESPONSIVE */

@media (max-width: 650px) {

    .energy-chat-section {
        margin: 20px auto 45px;
        padding: 0 15px;
    }

    .energy-chat-head {
        align-items: flex-start;
    }

    .energy-chat-head p {
        font-size: 11px;
    }

    .energy-chat-online {
        padding: 8px 10px;
        font-size: 10px;
    }

    .energy-chat-messages {
        height: 340px;
        padding: 12px;
    }

    .energy-chat-form {
        padding: 11px;
    }

    .chat-foot {
        font-size: 9px;
    }
}

@media (max-width: 420px) {

    .energy-chat-head {
        flex-direction: column;
    }

    .energy-chat-online {
        align-self: flex-start;
    }

    .chat-compose {
        gap: 6px;
    }

    .chat-compose input {
        padding: 0 9px;
        font-size: 12px;
    }

    .chat-emoji-btn {
        width: 38px;
    }

    .chat-send {
        width: 40px;
    }
}