* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    background: #080b18;
}

/* Algemene achtergrond */
.chat-login-overlay,
.chat-page {
    min-height: 100vh;

    background-image:
        linear-gradient(
            rgba(4, 7, 22, 0.48),
            rgba(4, 7, 22, 0.72)
        ),
        url("verkantlogopp3g.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Loginpagina */
.chat-login-overlay {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Loginvenster */
.chat-login-box {
    width: 100%;
    max-width: 430px;
    padding: 42px 38px;
    position: relative;
    z-index: 1;
    text-align: center;

    background: rgba(9, 13, 35, 0.9);
    border: 1px solid rgba(0, 238, 255, 0.85);
    border-radius: 26px;

    box-shadow:
        0 0 8px rgba(0, 238, 255, 0.95),
        0 0 28px rgba(0, 238, 255, 0.55),
        0 0 65px rgba(255, 0, 200, 0.38),
        inset 0 0 28px rgba(0, 238, 255, 0.08);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.chat-login-box::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 28px;
    padding: 2px;

    background: linear-gradient(
        135deg,
        #00eaff,
        transparent 35%,
        #ff00c8 70%,
        #00eaff
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Logo login */
.chat-logo {
    display: block;
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin: 0 auto 20px;

    border-radius: 24px;

    filter:
        drop-shadow(0 0 8px #00eaff)
        drop-shadow(0 0 18px #ff00c8);
}

.neon-line {
    width: 80px;
    height: 3px;
    margin: 0 auto 22px;
    border-radius: 10px;

    background: linear-gradient(90deg, #00eaff, #ff00c8);

    box-shadow:
        0 0 8px #00eaff,
        0 0 15px #ff00c8;
}

.chat-login-box h1 {
    margin: 0 0 10px;
    font-size: 30px;

    text-shadow:
        0 0 8px rgba(0, 238, 255, 0.9),
        0 0 20px rgba(255, 0, 200, 0.5);
}

.chat-subtitle {
    margin: 0 0 28px;
    color: #c2cbe5;
    font-size: 15px;
}

/* Formulieren */
.chat-login-box form,
.chat-form {
    text-align: left;
}

.chat-login-box label {
    display: block;
    margin-bottom: 8px;
    color: #e2eaff;
    font-size: 14px;
    font-weight: bold;
}

.chat-login-box input,
.chat-input-row input {
    width: 100%;
    height: 52px;
    padding: 0 16px;

    color: #ffffff;
    background: rgba(2, 6, 23, 0.88);
    border: 1px solid rgba(0, 238, 255, 0.5);
    border-radius: 12px;
    outline: none;

    font-size: 16px;
    transition: 0.25s ease;
}

.chat-login-box input::placeholder,
.chat-input-row input::placeholder {
    color: #8290b5;
}

.chat-login-box input:focus,
.chat-input-row input:focus {
    border-color: #00eaff;

    box-shadow:
        0 0 8px rgba(0, 238, 255, 0.85),
        0 0 20px rgba(0, 238, 255, 0.4);
}

/* Knoppen */
.chat-login-box button,
.chat-input-row button {
    color: #ffffff;
    background: linear-gradient(
        100deg,
        #00bfe8,
        #7627dc,
        #f000a8
    );
    background-size: 200% auto;

    border: 0;
    border-radius: 12px;
    cursor: pointer;

    font-size: 16px;
    font-weight: bold;

    box-shadow:
        0 0 12px rgba(0, 238, 255, 0.7),
        0 0 25px rgba(255, 0, 200, 0.45);

    transition: 0.25s ease;
}

.chat-login-box button {
    width: 100%;
    height: 52px;
    margin-top: 20px;
}

.chat-login-box button strong {
    margin-left: 8px;
    font-size: 21px;
}

.chat-login-box button:hover,
.chat-input-row button:hover {
    background-position: right center;
    transform: translateY(-2px);

    box-shadow:
        0 0 18px rgba(0, 238, 255, 0.95),
        0 0 35px rgba(255, 0, 200, 0.7);
}

/* Foutmelding */
.chat-error {
    margin: 0 0 18px;
    padding: 11px 14px;

    color: #ffb8dc;
    background: rgba(255, 0, 128, 0.16);
    border: 1px solid rgba(255, 0, 150, 0.7);
    border-radius: 10px;
}

/* Chatpagina */
.chat-page {
    min-height: 100vh;
    padding: 25px;
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    width: 100%;
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 18px 22px;

    background: rgba(9, 13, 35, 0.9);
    border: 1px solid rgba(0, 238, 255, 0.7);
    border-radius: 18px;

    box-shadow:
        0 0 18px rgba(0, 238, 255, 0.35),
        0 0 30px rgba(255, 0, 200, 0.2);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 12px;

    filter:
        drop-shadow(0 0 6px #00eaff)
        drop-shadow(0 0 12px #ff00c8);
}

.chat-header h1 {
    margin: 0 0 5px;
    font-size: 24px;
}

.chat-header p {
    margin: 0;
    color: #aebbd9;
    font-size: 14px;
}

.chat-header p strong {
    color: #00eaff;
}

.logout-button {
    padding: 11px 16px;

    color: #ffffff;
    text-decoration: none;

    border: 1px solid rgba(255, 0, 180, 0.7);
    border-radius: 10px;
    background: rgba(255, 0, 160, 0.13);

    transition: 0.2s ease;
}

.logout-button:hover {
    background: rgba(255, 0, 160, 0.3);
    box-shadow: 0 0 15px rgba(255, 0, 180, 0.5);
}

/*
 * Hoofdindeling:
 * chatroom links en gebruikerslijst rechts.
 */
.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: start;
    gap: 20px;

    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Chatroom */
.chat-container {
    width: 100%;
    min-width: 0;
    padding: 22px;

    background: rgba(9, 13, 35, 0.9);
    border: 1px solid rgba(0, 238, 255, 0.6);
    border-radius: 18px;

    box-shadow:
        0 0 20px rgba(0, 238, 255, 0.28),
        0 0 35px rgba(255, 0, 200, 0.18);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Berichten */
.chat-messages {
    min-height: 350px;
    max-height: 58vh;
    overflow-y: auto;
    padding: 5px;
}

.chat-message {
    margin-bottom: 13px;
    padding: 13px 15px;

    background: rgba(20, 28, 65, 0.88);
    border-left: 3px solid #00eaff;
    border-radius: 10px;

    box-shadow: 0 0 10px rgba(0, 238, 255, 0.12);
}

.chat-message-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 7px;
}

.chat-message-top strong {
    color: #00eaff;
}

.chat-message-top time {
    color: #8794b7;
    font-size: 12px;
}

.chat-message-text {
    color: #f0f4ff;
    line-height: 1.5;
    word-break: break-word;
}

.no-messages {
    padding: 80px 20px;
    color: #aebbd9;
    text-align: center;
}

/* Berichtformulier */
.chat-form {
    margin-top: 20px;
}

.chat-input-row {
    display: flex;
    gap: 12px;
}

.chat-input-row input {
    flex: 1;
}

.chat-input-row button {
    min-width: 130px;
    padding: 0 20px;
}

/* Gebruikerslijst rechts */
.chat-userlist {
    width: 100%;
    min-width: 0;
    padding: 22px;

    background: rgba(9, 13, 35, 0.9);
    border: 1px solid rgba(255, 0, 200, 0.6);
    border-radius: 18px;

    box-shadow:
        0 0 20px rgba(255, 0, 200, 0.25),
        0 0 35px rgba(0, 238, 255, 0.15);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.chat-userlist h2 {
    margin: 0 0 18px;
    color: #00eaff;
    font-size: 20px;

    text-shadow:
        0 0 8px rgba(0, 238, 255, 0.8),
        0 0 15px rgba(255, 0, 200, 0.35);
}

.chat-userlist ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chat-userlist li {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 10px 0;
    color: #f0f4ff;
    border-bottom: 1px solid rgba(174, 187, 217, 0.18);
    word-break: break-word;
}

.chat-userlist li:last-child {
    border-bottom: 0;
}

.user-status {
    display: inline-block;
    width: 9px;
    height: 9px;
    min-width: 9px;

    background: #35e879;
    border-radius: 50%;

    box-shadow:
        0 0 6px #35e879,
        0 0 12px rgba(53, 232, 121, 0.7);
}

.no-users {
    margin: 0;
    color: #aebbd9;
    line-height: 1.5;
}

/* Mobiele weergave */
@media (max-width: 800px) {
    .chat-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chat-userlist {
        order: -1;
    }
}

@media (max-width: 600px) {
    .chat-login-overlay {
        padding: 16px;
        background-attachment: scroll;
    }

    .chat-login-box {
        padding: 32px 24px;
    }

    .chat-login-box h1 {
        font-size: 25px;
    }

    .chat-page {
        padding: 12px;
        background-attachment: scroll;
    }

    .chat-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .logout-button {
        width: 100%;
        text-align: center;
    }

    .chat-container {
        padding: 15px;
    }

    .chat-userlist {
        padding: 15px;
    }

    .chat-input-row {
        flex-direction: column;
    }

    .chat-input-row button {
        width: 100%;
        height: 50px;
    }
}
