/* =========================================================
   NEX TALK
   PROFESSIONAL UNIFIED UI
   MULTI USER VIDEO VERSION
   ========================================================= */


/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
}

body {
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(90, 80, 180, 0.16),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(40, 150, 180, 0.12),
            transparent 30%
        ),
        #080b14;

    color: #f4f7fb;
}


/* =========================================================
   LOBBY
   ========================================================= */

.lobby {
    min-height: 100vh;
    width: 100%;
    padding: 28px 5vw 20px;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(90, 80, 180, 0.14),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 70%,
            rgba(30, 140, 180, 0.10),
            transparent 30%
        ),
        #080b14;
}


/* =========================================================
   LOBBY HEADER
   ========================================================= */

.lobby-header {
    width: 100%;
    max-width: 1500px;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 28px;

    border-bottom:
        1px solid rgba(255,255,255,0.07);
}

.brand {
    display: flex;
    align-items: center;
}

.brand h1 {
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -0.7px;
}

.brand span {
    display: block;
    margin-top: 4px;

    font-size: 12px;
    color: #8f9aaf;
}

.secure-badge {
    padding: 9px 15px;

    border:
        1px solid rgba(255,255,255,0.08);

    border-radius: 999px;

    background:
        rgba(255,255,255,0.035);

    color: #b9c3d6;

    font-size: 12px;
}


/* =========================================================
   LOBBY CONTENT
   ========================================================= */

.lobby-content {
    width: 100%;
    max-width: 1500px;

    margin: 0 auto;

    padding: 60px 0 35px;
}

.welcome-section {
    max-width: 700px;
    margin-bottom: 35px;
}

.welcome-label {
    color: #8c8cf4;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2px;
}

.welcome-section h2 {
    margin-top: 12px;

    font-size: clamp(36px, 5vw, 58px);

    line-height: 1.05;

    letter-spacing: -2px;
}

.welcome-section p {
    margin-top: 18px;

    max-width: 620px;

    color: #8e99ad;

    font-size: 15px;

    line-height: 1.7;
}


/* =========================================================
   NAME SECTION
   ========================================================= */

.name-section {
    width: 100%;
    max-width: 700px;

    margin-bottom: 25px;
}

.name-section label,
.form-group label,
.join-modal label {
    display: block;

    margin-bottom: 8px;

    color: #aeb8ca;

    font-size: 12px;
    font-weight: 600;
}

.name-section input,
.form-group input,
.join-modal input {
    width: 100%;

    height: 48px;

    padding: 0 15px;

    border:
        1px solid rgba(255,255,255,0.09);

    border-radius: 12px;

    outline: none;

    background:
        rgba(255,255,255,0.045);

    color: #ffffff;

    font-size: 14px;

    transition: 0.2s ease;
}

.name-section input::placeholder,
.form-group input::placeholder,
.join-modal input::placeholder {
    color: #667188;
}

.name-section input:focus,
.form-group input:focus,
.join-modal input:focus {
    border-color:
        rgba(130,120,255,0.65);

    background:
        rgba(255,255,255,0.065);

    box-shadow:
        0 0 0 3px rgba(120,110,255,0.09);
}


/* =========================================================
   ROOM CARDS
   ========================================================= */

.room-actions {
    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 22px;
}

.room-card {
    position: relative;

    background:
        rgba(255,255,255,.08);

    backdrop-filter:
        blur(24px);

    -webkit-backdrop-filter:
        blur(24px);

    border:
        1px solid rgba(255,255,255,.15);

    border-radius:
        28px;

    padding:
        28px;

    overflow:
        hidden;

    box-shadow:
        0 12px 40px rgba(0,0,0,.35),
        inset 0 1px rgba(255,255,255,.18),
        inset 0 -1px rgba(255,255,255,.05);

    transform-style:
        preserve-3d;

    transition:
        transform .45s cubic-bezier(.22,1,.36,1),
        box-shadow .45s ease,
        border-color .35s ease;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-btn {
    width: 100%;

    height: 48px;

    margin-top: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 17px;

    border: 0;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #756cf5,
            #5950d8
        );

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 10px 25px rgba(90,80,220,0.22);

    transition: 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 14px 30px rgba(90,80,220,0.30);
}

.primary-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


/* =========================================================
   EXISTING ROOMS
   ========================================================= */

.existing-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.refresh-btn {
    width: 36px;
    height: 36px;

    border-radius: 10px;

    border:
        1px solid rgba(255,255,255,0.08);

    background:
        rgba(255,255,255,0.035);

    color: #aeb8ca;

    cursor: pointer;

    font-size: 18px;
}

.room-list {
    margin-top: 22px;

    display: flex;

    flex-direction: column;

    gap: 9px;
}

.room-item {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 13px 14px;

    border:
        1px solid rgba(255,255,255,0.06);

    border-radius: 12px;

    background:
        rgba(255,255,255,0.025);
}

.room-info {
    display: flex;

    align-items: center;

    gap: 12px;

    min-width: 0;
}

.room-lock {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background:
        rgba(255,255,255,0.05);
}

.room-info strong {
    display: block;

    font-size: 13px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.room-info small {
    display: block;

    margin-top: 3px;

    color: #68748a;

    font-size: 11px;
}

.room-join-btn {
    flex-shrink: 0;

    padding: 8px 13px;

    border:
        1px solid rgba(120,110,255,0.2);

    border-radius: 9px;

    background:
        rgba(120,110,255,0.08);

    color: #aaa5ff;

    cursor: pointer;

    font-size: 12px;
}


/* =========================================================
   LOBBY MESSAGE
   ========================================================= */

.form-message {
    min-height: 20px;

    margin-top: 15px;

    font-size: 12px;
}

.form-message.error {
    color: #ff7f91;
}

.form-message.success {
    color: #70dfad;
}


/* =========================================================
   LOBBY FOOTER
   ========================================================= */

.lobby-footer {
    width: 100%;
    max-width: 1500px;

    margin: 0 auto;

    padding-top: 20px;

    border-top:
        1px solid rgba(255,255,255,0.06);

    display: flex;

    justify-content: space-between;

    color: #626d80;

    font-size: 11px;
}


/* =========================================================
   JOIN MODAL
   ========================================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(3,5,10,0.72);

    backdrop-filter:
        blur(10px);
}

.modal-overlay.active {
    display: flex;
}

.join-modal {
    position: relative;

    width: 100%;
    max-width: 430px;

    padding: 32px;

    border:
        1px solid rgba(255,255,255,0.09);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #151a29,
            #0e1220
        );

    box-shadow:
        0 30px 100px rgba(0,0,0,0.55);
}

.modal-close {
    position: absolute;

    top: 16px;
    right: 16px;

    width: 32px;
    height: 32px;

    border: 0;

    border-radius: 9px;

    background:
        rgba(255,255,255,0.05);

    color: #aeb8ca;

    font-size: 20px;

    cursor: pointer;
}

.modal-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    border-radius: 13px;

    background:
        rgba(120,110,255,0.12);
}

.join-modal h2 {
    font-size: 24px;
}

.join-modal > p {
    margin: 7px 0 20px;

    color: #7f8ba0;

    font-size: 13px;
}

.selected-room {
    padding: 13px;

    margin-bottom: 20px;

    border-radius: 11px;

    border:
        1px solid rgba(255,255,255,0.06);

    background:
        rgba(255,255,255,0.035);
}

.selected-room span {
    display: block;

    color: #6e798d;

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: 1px;
}

.selected-room strong {
    display: block;

    margin-top: 4px;

    font-size: 14px;
}


/* =========================================================
   CHAT PAGE
   ========================================================= */

body.chat-page {
    min-height: 100vh;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(92,80,200,0.13),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(30,140,180,0.09),
            transparent 32%
        ),
        #080b14;
}


/* =========================================================
   CHAT APP
   ========================================================= */

.chat-page .chat-app {
    width: 100%;
    height: 100vh;

    display: grid;

    grid-template-columns:
        270px
        minmax(0, 1fr);
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.chat-page .chat-sidebar {
    height: 100vh;

    display: flex;

    flex-direction: column;

    padding: 25px 18px;

    border-right:
        1px solid rgba(255,255,255,0.065);

    background:
        linear-gradient(
            180deg,
            rgba(18,22,35,0.96),
            rgba(10,13,22,0.96)
        );

    overflow-y: auto;
}


/* =========================================================
   BRAND
   ========================================================= */

.chat-page .chat-brand {
    display: flex;

    align-items: center;

    gap: 11px;

    padding: 2px 4px 25px;

    border-bottom:
        1px solid rgba(255,255,255,0.055);
}

.chat-page .brand-mark {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #7770f7,
            #5149ca
        );

    color: #fff;

    font-size: 16px;
    font-weight: 800;

    box-shadow:
        0 7px 20px rgba(90,80,220,0.25);
}

.chat-page .chat-brand h1 {
    font-size: 17px;

    letter-spacing: -0.4px;
}

.chat-page .chat-brand span {
    display: block;

    margin-top: 3px;

    color: #6e798e;

    font-size: 9px;
}


/* =========================================================
   ROOM INFORMATION
   ========================================================= */

.chat-page .room-info-card {
    margin-top: 20px;

    padding: 16px;

    border:
        1px solid rgba(255,255,255,0.065);

    border-radius: 13px;

    background:
        rgba(255,255,255,0.025);
}

.chat-page .room-label {
    color: #69748a;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.5px;
}

.chat-page .room-info-card h2 {
    margin-top: 8px;

    font-size: 15px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.chat-page .room-status {
    display: flex;

    align-items: center;

    gap: 7px;

    margin-top: 9px;

    color: #7d8a9f;

    font-size: 11px;
}

.chat-page .status-dot,
.chat-page .secure-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #49d99b;

    box-shadow:
        0 0 8px rgba(73,217,155,0.65);
}


/* =========================================================
   USER CARD
   ========================================================= */

.chat-page .user-card {
    display: flex;

    align-items: center;

    gap: 11px;

    margin-top: 15px;

    padding: 13px;

    border:
        1px solid rgba(255,255,255,0.055);

    border-radius: 12px;

    background:
        rgba(255,255,255,0.02);
}

.chat-page .user-avatar {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        rgba(120,110,255,0.14);

    color: #aaa5ff;

    font-weight: 700;

    font-size: 13px;
}

.chat-page .user-details strong {
    display: block;

    font-size: 12px;
}

.chat-page .user-details span {
    display: block;

    margin-top: 2px;

    color: #68748a;

    font-size: 10px;
}


/* =========================================================
   MEMBERS
   ========================================================= */

.chat-page .members-card {
    flex: 1;

    margin-top: 20px;

    min-height: 100px;
}

.chat-page .section-heading {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 2px 10px;

    color: #9ca8ba;

    font-size: 11px;

    font-weight: 700;
}

.chat-page .online {
    color: #59dca5;

    font-size: 9px;
    font-weight: 500;
}

.chat-page .member-list {
    display: flex;

    flex-direction: column;

    gap: 5px;
}

.chat-page .member {
    padding: 9px 10px;

    border-radius: 9px;

    background:
        rgba(255,255,255,0.025);

    color: #aeb8ca;

    font-size: 11px;
}


/* =========================================================
   SECURITY
   ========================================================= */

.chat-page .security-card {
    display: flex;

    gap: 10px;

    padding: 13px;

    border:
        1px solid rgba(255,255,255,0.055);

    border-radius: 11px;

    background:
        rgba(255,255,255,0.02);
}

.chat-page .security-icon {
    font-size: 14px;
}

.chat-page .security-card strong {
    display: block;

    color: #aeb8ca;

    font-size: 10px;
}

.chat-page .security-card span {
    display: block;

    margin-top: 3px;

    color: #657086;

    font-size: 9px;

    line-height: 1.4;
}


/* =========================================================
   LEAVE BUTTON
   ========================================================= */

.chat-page .leave-room-btn {
    width: 100%;

    margin-top: 13px;

    padding: 10px;

    border:
        1px solid rgba(255,255,255,0.06);

    border-radius: 10px;

    background:
        rgba(255,255,255,0.025);

    color: #8b96aa;

    font-size: 11px;

    cursor: pointer;

    transition: 0.2s ease;
}

.chat-page .leave-room-btn:hover {
    background:
        rgba(255,255,255,0.055);

    color: #fff;
}


/* =========================================================
   MAIN
   ========================================================= */

.chat-page .chat-main {
    min-width: 0;

    height: 100vh;

    display: flex;

    flex-direction: column;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.chat-page .chat-topbar {
    min-height: 75px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 30px;

    border-bottom:
        1px solid rgba(255,255,255,0.065);

    background:
        rgba(9,12,21,0.72);

    backdrop-filter:
        blur(16px);
}

.chat-page .topbar-label {
    color: #69748a;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.6px;
}

.chat-page .chat-topbar h2 {
    margin-top: 5px;

    font-size: 18px;

    letter-spacing: -0.4px;
}

.chat-page .topbar-security {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 8px 12px;

    border:
        1px solid rgba(255,255,255,0.06);

    border-radius: 999px;

    background:
        rgba(255,255,255,0.025);

    color: #788499;

    font-size: 10px;
}


/* =========================================================
   CONTENT
   ========================================================= */

.chat-page .chat-content {
    flex: 1;

    min-height: 0;

    display: grid;

    grid-template-columns:
        minmax(340px, 0.95fr)
        minmax(430px, 1.05fr);

    gap: 18px;

    padding: 18px;

    overflow: hidden;
}


/* =========================================================
   PANELS
   ========================================================= */

.chat-page .chat-panel,
.chat-page .video-panel {
    min-width: 0;
    min-height: 0;

    display: flex;

    flex-direction: column;

    border:
        1px solid rgba(255,255,255,0.07);

    border-radius: 17px;

    background:
        linear-gradient(
            145deg,
            rgba(20,25,39,0.90),
            rgba(12,16,27,0.90)
        );

    box-shadow:
        0 20px 60px rgba(0,0,0,0.20);

    overflow: hidden;
}


/* =========================================================
   PANEL HEADER
   ========================================================= */

.chat-page .panel-header {
    min-height: 72px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 20px;

    border-bottom:
        1px solid rgba(255,255,255,0.055);

    flex-shrink: 0;
}

.chat-page .panel-header h3 {
    font-size: 15px;

    letter-spacing: -0.2px;
}

.chat-page .panel-header p {
    margin-top: 4px;

    color: #68748a;

    font-size: 10px;
}

.chat-page .panel-icon {
    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background:
        rgba(120,110,255,0.09);

    font-size: 13px;
}

.chat-page .live-badge {
    display: flex;

    align-items: center;

    gap: 6px;

    padding: 6px 9px;

    border-radius: 999px;

    background:
        rgba(65,215,150,0.07);

    border:
        1px solid rgba(65,215,150,0.12);

    color: #5fdba7;

    font-size: 8px;
    font-weight: 700;
}

.chat-page .live-badge span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #52dba1;

    box-shadow:
        0 0 7px rgba(82,219,161,0.7);
}


/* =========================================================
   CHAT MESSAGES
   ========================================================= */

.chat-page .messages {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 20px;

    display: flex;

    flex-direction: column;

    gap: 11px;

    scrollbar-width: thin;

    scrollbar-color:
        rgba(255,255,255,0.12)
        transparent;
}

.chat-page .welcome-message {
    margin: auto;

    max-width: 250px;

    text-align: center;

    color: #6f7a8f;
}

.chat-page .welcome-icon {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 auto 12px;

    border-radius: 13px;

    background:
        rgba(120,110,255,0.09);

    color: #aaa5ff;

    font-size: 18px;
}

.chat-page .welcome-message strong {
    display: block;

    color: #aeb8ca;

    font-size: 12px;
}

.chat-page .welcome-message span {
    display: block;

    margin-top: 5px;

    font-size: 10px;
}


/* =========================================================
   MESSAGE BUBBLES
   ========================================================= */

.chat-page .message {
    max-width: 78%;

    padding: 10px 12px;

    border-radius: 13px;

    border:
        1px solid rgba(255,255,255,0.055);

    background:
        rgba(255,255,255,0.035);

    animation:
        messageAppear 0.18s ease;
}

.chat-page .message.left {
    align-self: flex-start;

    border-top-left-radius: 5px;
}

.chat-page .message.right {
    align-self: flex-end;

    border-top-right-radius: 5px;

    background:
        linear-gradient(
            135deg,
            rgba(104,96,224,0.34),
            rgba(79,72,170,0.25)
        );

    border-color:
        rgba(130,120,255,0.17);
}

@keyframes messageAppear {

    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.chat-page .message-header {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 7px;
}

.chat-page .avatar {
    width: 24px;
    height: 24px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 7px;

    background:
        rgba(120,110,255,0.13);

    color: #aaa5ff;

    font-size: 9px;
    font-weight: 700;
}

.chat-page .username {
    color: #aaa5ff;

    font-size: 10px;

    font-weight: 700;
}

.chat-page .time {
    color: #5e697c;

    font-size: 8px;
}

.chat-page .message-text {
    color: #dbe1eb;

    font-size: 12px;

    line-height: 1.55;

    word-break: break-word;
}


/* =========================================================
   TYPING INDICATOR
   ========================================================= */

.chat-page .typing-indicator {
    height: 16px;

    padding-left: 5px;

    color: #68748a;

    font-size: 10px;
}


/* =========================================================
   MESSAGE INPUT
   ========================================================= */

.chat-page .message-area {
    padding: 10px 16px 14px;

    border-top:
        1px solid rgba(255,255,255,0.055);

    background:
        rgba(8,11,19,0.45);
}

.chat-page .message-input-wrap {
    display: flex;

    gap: 8px;

    padding: 5px;

    border:
        1px solid rgba(255,255,255,0.07);

    border-radius: 12px;

    background:
        rgba(255,255,255,0.035);
}

.chat-page #messageInput {
    flex: 1;

    min-width: 0;

    height: 38px;

    padding: 0 10px;

    border: 0;

    outline: none;

    background:
        transparent;

    color: #fff;

    font-size: 12px;
}

.chat-page #messageInput::placeholder {
    color: #626d80;
}

.chat-page .send-message-btn {
    height: 38px;

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 0 14px;

    border: 0;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            #756cf5,
            #5750d7
        );

    color: #fff;

    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
}

.chat-page .send-message-btn:disabled {
    opacity: 0.4;

    cursor: not-allowed;
}


/* =========================================================
   MULTI USER VIDEO GRID
   ========================================================= */

.chat-page .video-grid {

    flex: 1;

    min-height: 0;

    padding: 18px;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(190px, 1fr)
        );

    grid-auto-rows:
        minmax(150px, 1fr);

    gap: 12px;

    overflow-y: auto;

    align-content: center;

}


/* =========================================================
   VIDEO BOX
   ========================================================= */

.chat-page .video-box {

    position: relative;

    min-width: 0;

    min-height: 150px;

    overflow: hidden;

    border:
        1px solid rgba(255,255,255,0.10);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #151a29,
            #090c15
        );

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.015),
        0 12px 30px rgba(0,0,0,0.22);

}


/* =========================================================
   VIDEO ELEMENT
   ========================================================= */

.chat-page .video-box video {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    background:
        #070a11;

}


/* =========================================================
   LOCAL CAMERA MIRROR
   ========================================================= */

.chat-page #local-player video {

    transform:
        scaleX(-1);

}


/* =========================================================
   REMOTE VIDEO
   ========================================================= */

.chat-page .remote-video-container {

    position: relative;

    width: 100%;

    height: 100%;

    min-height: 150px;

    overflow: hidden;

    border-radius: 12px;

    background:
        #111827;

}


/* =========================================================
   VIDEO PLACEHOLDER
   ========================================================= */

.chat-page .video-placeholder {

    position: absolute;

    inset: 0;

    z-index: 1;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 20px;

    background:
        radial-gradient(
            circle,
            rgba(120,110,255,0.06),
            transparent 60%
        );

    color: #69758a;

}

.chat-page .video-placeholder-icon {

    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 9px;

    border-radius: 12px;

    background:
        rgba(255,255,255,0.045);

    font-size: 16px;

}

.chat-page .video-placeholder strong {

    color: #aab4c6;

    font-size: 11px;

}

.chat-page .video-placeholder span {

    margin-top: 4px;

    color: #626d80;

    font-size: 9px;

}


/* =========================================================
   VIDEO NAME
   ========================================================= */

.chat-page .video-name {

    position: absolute;

    left: 10px;

    bottom: 9px;

    z-index: 5;

    padding: 5px 8px;

    border:
        1px solid rgba(255,255,255,0.08);

    border-radius: 7px;

    background:
        rgba(5,7,12,0.72);

    backdrop-filter:
        blur(8px);

    color: #dbe1eb;

    font-size: 9px;

}


/* =========================================================
   VIDEO CONTROLS
   ========================================================= */

.chat-page .video-controls {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 13px 16px;

    border-top:
        1px solid rgba(255,255,255,0.055);

    background:
        rgba(8,11,19,0.45);

}

.chat-page .video-control {

    min-width: 85px;

    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    padding: 0 12px;

    border:
        1px solid rgba(255,255,255,0.07);

    border-radius: 9px;

    background:
        rgba(255,255,255,0.035);

    color: #aeb8ca;

    font-size: 10px;

    cursor: pointer;

    transition: 0.2s ease;

}

.chat-page .video-control:hover {

    background:
        rgba(255,255,255,0.07);

    color: #fff;

}

.chat-page .video-control.end-call {

    border-color:
        rgba(255,80,100,0.14);

    background:
        rgba(255,70,90,0.07);

    color: #ff8997;

}

.chat-page .video-control.end-call:hover {

    background:
        rgba(255,70,90,0.14);

}


/* =========================================================
   SCROLLBARS
   ========================================================= */

.chat-page ::-webkit-scrollbar {

    width: 5px;

    height: 5px;

}

.chat-page ::-webkit-scrollbar-track {

    background:
        transparent;

}

.chat-page ::-webkit-scrollbar-thumb {

    border-radius:
        10px;

    background:
        rgba(255,255,255,0.10);

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .chat-page .chat-app {

        grid-template-columns:
            220px minmax(0, 1fr);

    }

    .chat-page .chat-content {

        grid-template-columns:
            minmax(300px, 0.9fr)
            minmax(340px, 1.1fr);

        gap: 12px;

        padding: 12px;

    }

    .chat-page .chat-topbar {

        padding:
            0 20px;

    }

}


/* =========================================================
   SMALL TABLET
   ========================================================= */

@media (max-width: 820px) {

    body.chat-page {

        overflow:
            auto;

    }

    .chat-page .chat-app {

        height:
            auto;

        min-height:
            100vh;

        display:
            block;

    }

    .chat-page .chat-sidebar {

        width:
            100%;

        height:
            auto;

        border-right:
            0;

        border-bottom:
            1px solid rgba(255,255,255,0.065);

    }

    .chat-page .members-card {

        flex:
            none;

        max-height:
            130px;

    }

    .chat-page .chat-main {

        height:
            auto;

        min-height:
            calc(100vh - 400px);

    }

    .chat-page .chat-content {

        grid-template-columns:
            1fr;

        overflow:
            visible;

    }

    .chat-page .chat-panel,
    .chat-page .video-panel {

        min-height:
            500px;

    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .lobby {

        padding:
            20px 16px;

    }

    .room-actions {

        grid-template-columns:
            1fr;

    }

    .lobby-content {

        padding-top:
            40px;

    }

    .lobby-footer {

        flex-direction:
            column;

        gap:
            6px;

    }


    /* CHAT */

    .chat-page .chat-sidebar {

        padding:
            18px 14px;

    }

    .chat-page .chat-topbar {

        min-height:
            65px;

        padding:
            0 14px;

    }

    .chat-page .topbar-security {

        display:
            none;

    }

    .chat-page .chat-content {

        padding:
            10px;

        gap:
            10px;

    }

    .chat-page .chat-panel,
    .chat-page .video-panel {

        min-height:
            450px;

        border-radius:
            14px;

    }


    /* ONE VIDEO PER ROW ON MOBILE */

    .chat-page .video-grid {

        grid-template-columns:
            1fr;

        grid-auto-rows:
            190px;

    }

    .chat-page .video-controls {

        flex-wrap:
            wrap;

    }

    .chat-page .video-control {

        flex:
            1;

        min-width:
            0;

    }

    .chat-page .message {

        max-width:
            88%;

    }

}


/* =========================================================
   MOTION SYSTEM
   ========================================================= */

:root {

    --bg1:
        #081021;

    --bg2:
        #111936;

    --bg3:
        #2b2375;

}

body {

    overflow-x:
        hidden;

    background:
        radial-gradient(
            circle at top left,
            var(--bg3),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom right,
            #0ea5e9,
            transparent 30%
        ),
        linear-gradient(
            135deg,
            var(--bg1),
            var(--bg2)
        );

    background-size:
        200% 200%;

    animation:
        backgroundFlow 18s ease infinite;

}

@keyframes backgroundFlow {

    0% {
        background-position:
            0% 50%;
    }

    50% {
        background-position:
            100% 50%;
    }

    100% {
        background-position:
            0% 50%;
    }

}
