/* =========================================================
   DIAMOND LOUNGE — COMPLETE CLEAN STYLESHEET
   Luxury dark • Gold • Crystal glass • Responsive navigation
========================================================= */

:root {
    color-scheme: dark;
    --ink: #101114;
    --panel: #17181c;
    --panel-raised: #1d1e23;
    --line: rgba(226,205,157,.14);
    --gold: #c7a96b;
    --gold-bright: #e1c98f;
    --muted: #98979a;
    --text: #f4f0e8;
    --glass-white: #f5fbff;
    --glass-mid: #dce8ed;
    --glass-silver: #b9cbd2;
    --glass-muted: #aebdc4;
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    color: var(--text);
    background: radial-gradient(ellipse at 50% -20%, #2a261f 0%, var(--ink) 52%);
    font-family: "DM Sans", Segoe UI, sans-serif;
}

button, input, select {
    font: inherit;
}

button {
    color: inherit;
}

[hidden] {
    display: none !important;
}

/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.mobile-sidebar {
    display: flex;
    flex: none;
    min-width: 0;
    height: 100%;
}

/* =========================================================
   SERVER RAIL
========================================================= */

.servers {
    width: 76px;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #0c0d0f;
    border-right: 1px solid var(--line);
}

.server-logo {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    flex: none;
    display: grid;
    place-items: center;
    font-size: 32px;
    margin: 0;
    visibility: visible;
    filter: drop-shadow(0 0 14px rgba(199,169,107,.35));
}

.server-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.server-divider {
    width: 28px;
    height: 1px;
    margin: 3px 0;
    background: var(--line);
}

.server-icon {
    position: relative;
    width: 46px;
    height: 46px;
    flex: none;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 16px;
    background: #1a1b1f;
    color: var(--gold-bright);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, border-color .18s, border-radius .18s;
}

.server-icon.selected,
.server-icon:hover {
    background: #332d20;
    border-color: rgba(199,169,107,.44);
    border-radius: 13px;
}

.server-icon:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 3px;
}

#mainServerButton {
    overflow: visible;
    background: linear-gradient(145deg, rgba(199,169,107,.2), rgba(45,39,29,.9));
    border-color: rgba(199,169,107,.28);
    color: #f1e3c2;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 3px 12px rgba(0,0,0,.18);
}

#mainServerButton:hover,
#mainServerButton.selected {
    background: linear-gradient(145deg, rgba(199,169,107,.32), rgba(65,53,34,.95));
    border-color: rgba(225,201,143,.7);
    border-radius: 13px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 0 16px rgba(199,169,107,.12);
}

#mainServerButton .rail-gem {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(2.4);
    pointer-events: none;
}

#createServerButton {
    background: rgba(255,255,255,.035);
    border: 1px dashed rgba(199,169,107,.38);
    color: #c8d9df;
    font-size: 25px;
    font-weight: 400;
}

#createServerButton:hover {
    background: rgba(199,169,107,.13);
    border: 1px solid rgba(225,201,143,.65);
    color: #f3e4c2;
    border-radius: 13px;
    transform: translateY(-1px);
}

.created-servers {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.created-server {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.created-server.selected,
.created-server:hover {
    background: #332d20;
    border-color: rgba(199,169,107,.44);
}

/* =========================================================
   CHANNEL SIDEBAR
========================================================= */

.channels {
    width: 275px;
    flex: none;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(20,21,24,.96);
    border-right: 1px solid var(--line);
}

.workspace-heading {
    padding: 0 10px 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.workspace-heading h1 {
    margin: 7px 0 11px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 600;
    background: linear-gradient(180deg, #fff, #e9f1f4 30%, #c5d5dc 58%, #f2e9d6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(220,240,250,.18));
}

.eyebrow,
.section-heading,
.secure-label {
    font-size: 10px;
    letter-spacing: .16em;
    color: #d7c69f;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255,255,255,.18), 0 0 9px rgba(226,205,157,.16);
}

.online-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(202,215,222,.76);
    font-size: 12px;
}

.online-label i,
.online-list i {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: #76a879;
}

.section-heading {
    margin: 19px 10px 9px;
    color: #8e8879;
}

.channels ul {
    padding: 0;
    list-style: none;
}

.channels li {
    padding: 0;
    list-style: none;
}

.text-channels li,
.voice-channel-list li {
    padding: 0 !important;
}

.text-channel,
.voice-channel {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(225,235,240,.86);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    pointer-events: auto;
    transition: background .15s, color .15s;
}

.text-channel span,
.voice-channel > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-channel:hover,
.voice-channel:hover {
    background: #242326;
    color: #f5fbff;
}

.text-channel.selected,
.voice-channel.active {
    background: rgba(199,169,107,.12);
    color: var(--gold-bright);
    font-weight: 600;
}

.text-channel.selected span,
.voice-channel.active > span {
    color: #f2e6c9;
}

.text-channel .channel-symbol {
    color: #8e8879;
    font-weight: 700;
    min-width: 12px;
}

.voice-title {
    margin-top: 24px;
}

.voice-channel {
    flex-wrap: wrap;
}

.voice-channel:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.voice-channel-list {
    padding: 0;
    list-style: none;
}

.dashboard:has(.created-server.selected) .channels {
    display: none !important;
}

/* =========================================================
   VOICE PANELS
========================================================= */

.voice-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 8px 0 6px;
    padding: 12px;
    background: #19191c;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.voice-panel[hidden] {
    display: none !important;
}

.voice-status {
    min-height: 0;
    margin: 0 0 9px;
    color: #bdcbd0;
    font-size: 11px;
    line-height: 1.4;
}

.voice-buttons {
    display: flex;
    gap: 7px;
}

.voice-toggle-btn {
    position: relative;
    z-index: 2;
    flex: 1;
    width: auto;
    margin: 0;
    padding: 8px 5px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(135deg,#b99a5c,#8b7040);
    color: #16140f;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    pointer-events: auto;
}

.voice-toggle-btn.secondary {
    border: 1px solid #444148;
    background: #2c2c30;
    color: #e5e0d5;
}

.voice-toggle-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.voice-participants {
    margin-top: 12px;
}

.voice-participants h4 {
    font-size: 9px;
    letter-spacing: .14em;
    color: #d0dce1;
}

#voiceParticipantCount {
    float: right;
    color: #e8d5a9;
}

#voiceParticipants {
    padding: 2px 0;
    list-style: none;
}

#voiceParticipants li {
    padding: 5px 0;
    font-size: 11px;
    color: #e2eaed;
}

.voice-participant {
    display: flex;
    align-items: center;
    gap: 6px;
}

.voice-badges {
    margin-left: auto;
    color: var(--gold);
    font-size: 10px;
    font-style: normal;
    letter-spacing: .05em;
}

.voice-speaking-indicator {
    color: #79aa7a;
    margin-right: 4px;
}

.voice-empty {
    color: #bdcbd0;
}

.remote-audio-container {
    display: none;
}

.voice-row {
    list-style: none;
    margin-bottom: 2px;
}

.voice-row-head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.voice-row-head .voice-channel {
    flex: 1;
    min-width: 0;
}

.voice-join-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 0;
    margin-left: auto;
}

.voice-join-slot[hidden],
.voice-join-row[hidden] {
    display: none !important;
}

.voice-join-slot .voice-join-button {
    flex: none;
    width: auto !important;
    min-width: 58px;
    padding: 6px 12px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
}

.voice-join-button {
    width: 100%;
    padding: 11px 10px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg,#b99a5c,#8b7040);
    color: #16140f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    pointer-events: auto;
}

.voice-join-button:hover {
    filter: brightness(1.08);
}

.voice-count {
    order: -1;
    flex: none;
    color: #7f8ba0;
    font-size: 9px;
    letter-spacing: .03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-count.has-people {
    color: #8fb495;
}

.voice-row .voice-panel {
    flex-basis: 100%;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
}

.voice-controls,
.voice-leave-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.voice-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 9px 3px;
    border: 1px solid #3c3a40;
    border-radius: 9px;
    background: #232327;
    color: #ddd8cd;
    cursor: pointer;
    pointer-events: auto;
    transition: background .16s, border-color .16s, color .16s;
}

.voice-control:hover:not(:disabled) {
    background: #2e2d33;
    border-color: rgba(199,169,107,.45);
    color: var(--gold-bright);
}

.voice-control:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.voice-control[aria-pressed="true"] {
    background: rgba(199,169,107,.18);
    border-color: var(--gold-bright);
    color: var(--gold-bright);
}

.voice-control-icon {
    font-size: 15px;
    line-height: 1;
}

.voice-control-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.voice-leave-row {
    grid-template-columns: 1fr;
}

.voice-leave-row .voice-control.danger {
    flex-direction: row;
    gap: 7px;
    border-color: rgba(200,90,90,.5);
    color: #e2a09a;
}

.voice-controls[hidden],
.voice-leave-row[hidden] {
    display: none !important;
}

.remote-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 7px;
    margin-top: 11px;
}

.remote-video-grid:empty {
    display: none;
}

.remote-video-tile {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #101114;
}

.remote-video-tile video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #101114;
}

.remote-video-tile figcaption {
    padding: 4px 6px;
    overflow: hidden;
    color: #b9b5ac;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   PROFILE CARD
========================================================= */

.profile-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    flex: none;
    width: 100%;
    min-height: 58px;
    margin-top: auto;
    padding: 9px 10px;
    border: 1px solid rgba(226,205,157,.22);
    border-radius: 13px;
    background: #141518;
    overflow: visible;
}

.profile-avatar {
    order: 1;
    flex: none;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #302a1e;
    cursor: pointer;
    overflow: visible;
    appearance: none;
}

.profile-avatar:hover {
    background: #3b3524;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(5);
    transform-origin: center;
    pointer-events: none;
}

.profile-identity {
    order: 2;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.profile-identity:hover,
.profile-identity:focus-visible {
    background: rgba(199,169,107,.1);
    outline: none;
}

.profile-copy {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-name {
    max-width: 100%;
    overflow: hidden;
    color: #edf5f8;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-status {
    margin-top: 0;
    color: #a8c5a7;
    font-size: 10px;
}

.member-picture {
    order: 2;
    flex: none;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    border: 1px solid rgba(226,205,157,.3);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #1d1e22;
    color: var(--gold-bright);
}

.profile-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(115deg,#ff2d55,#ff9500,#ffe31a,#34d058,#28c8ff,#7b61ff,#ff2d55);
    background-size: 600% 600%;
    animation: neonRing 3.2s linear infinite;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.profile-card::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: 0;
    border-radius: 20px;
    background: linear-gradient(115deg,rgba(255,45,85,.5),rgba(255,149,0,.5),rgba(255,227,26,.5),rgba(52,208,88,.5),rgba(40,200,255,.5),rgba(123,97,255,.5),rgba(255,45,85,.5));
    background-size: 600% 600%;
    filter: blur(11px);
    animation: neonRing 3.2s linear infinite;
    pointer-events: none;
}

.profile-card > * {
    position: relative;
    z-index: 2;
}

.logout-btn {
    display: none !important;
}

@keyframes neonRing {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* =========================================================
   CHAT AREA / BACKGROUND
========================================================= */

.chat-area {
    position: relative;
    isolation: isolate;
    display: flex;
    flex: 1 1 auto;
    width: 0;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid rgba(255,255,255,.045);
    border-right: 1px solid rgba(255,255,255,.045);
    background: radial-gradient(ellipse at 22% 12%, rgba(199,169,107,.10), transparent 58%), radial-gradient(ellipse at 78% 86%, rgba(90,130,220,.09), transparent 58%), linear-gradient(145deg, rgba(23,24,27,.88), rgba(15,16,18,.96));
    backdrop-filter: blur(4px) saturate(170%);
    -webkit-backdrop-filter: blur(4px) saturate(170%);
}

.chat-area::before {
    content: "";
    position: absolute;
    inset: -40px;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 22% 18%,rgba(255,45,85,.16),transparent 46%), radial-gradient(circle at 72% 24%,rgba(255,190,60,.15),transparent 44%), radial-gradient(circle at 30% 82%,rgba(52,208,88,.13),transparent 46%), radial-gradient(circle at 82% 74%,rgba(40,200,255,.17),transparent 48%), radial-gradient(circle at 52% 46%,rgba(123,97,255,.14),transparent 52%);
    background-size: 200% 200%;
    animation: glassLights 16s ease-in-out infinite;
    filter: blur(26px);
}

.chat-area::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg,transparent,rgba(255,255,255,.13) 25%,rgba(226,205,157,.15) 50%,rgba(255,255,255,.13) 75%,transparent);
}

.chat-area > * {
    position: relative;
    z-index: 1;
}

@keyframes glassLights {
    0% { background-position: 0% 30%; }
    50% { background-position: 100% 70%; }
    100% { background-position: 0% 30%; }
}

/* =========================================================
   CHAT HEADER
========================================================= */

.chat-header {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 26px;
    border-bottom: 1px solid rgba(255,255,255,.075);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
    background: linear-gradient(150deg,rgba(38,50,82,.30),rgba(28,34,52,.22) 55%,rgba(52,48,36,.22));
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    font-size: 16px;
}

.chat-header-main {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 12px;
}

.channel-title {
    color: #f0dfb8;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255,255,255,.24), 0 0 10px rgba(226,205,157,.2);
}

.channel-title span {
    color: #eaf2f5;
    text-shadow: 0 1px 0 rgba(255,255,255,.2), 0 0 8px rgba(205,225,235,.16);
}

.sub-header {
    margin-top: 5px;
    color: rgba(202,215,222,.76);
    font-size: 12px;
    font-weight: 400;
}

.secure-label {
    font-size: 9px;
}

/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-button {
    display: none;
    width: 38px;
    height: 38px;
    flex: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #1b1c20;
    cursor: pointer;
}

.mobile-menu-button:hover {
    background: #302a1e;
    border-color: rgba(199,169,107,.5);
}

.mobile-menu-button span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-bright);
}

/* =========================================================
   MESSAGES / GLASS
========================================================= */

.messages,
.dm-messages {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    margin: 14px 3% 0;
    padding: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: linear-gradient(150deg,rgba(40,54,88,.42),rgba(30,38,62,.30) 42%,rgba(58,52,38,.24) 68%,rgba(26,34,56,.38));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(255,255,255,.05), 0 18px 50px rgba(0,0,0,.5);
    backdrop-filter: blur(20px) saturate(1.25) brightness(.82);
    -webkit-backdrop-filter: blur(20px) saturate(1.25) brightness(.82);
}

.message {
    max-width: 780px;
    margin-bottom: 9px;
    padding: 12px 15px;
    overflow-wrap: anywhere;
    background: rgba(20,24,34,.62);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 4px 12px 12px 12px;
    color: rgba(237,243,246,.94);
    font-size: 14px;
    line-height: 1.6;
    text-shadow: 0 1px 0 rgba(255,255,255,.16), 0 -1px 0 rgba(25,35,42,.3), 0 0 8px rgba(205,225,235,.1);
}

.message strong {
    color: #f0dfb8;
    text-shadow: 0 1px 0 rgba(255,255,255,.26), 0 0 9px rgba(226,205,157,.2);
}

.message time,
.message .timestamp,
.message-time,
.message-timestamp,
.chat-timestamp,
.dm-timestamp,
.message-meta,
.message-meta time {
    color: rgba(190,207,215,.7);
    font-size: .82em;
}

.message a {
    color: #c6dce8;
    text-decoration-color: rgba(198,220,232,.4);
}

.message a:hover {
    color: #fff;
}

.message-attachment {
    display: block;
    width: min(100%,520px);
    max-height: 360px;
    object-fit: contain;
    margin-top: 10px;
    border-radius: 9px;
    background: #101114;
}

/* =========================================================
   MESSAGE COMPOSER
========================================================= */

.message-box {
    display: flex;
    flex: none;
    align-items: center;
    gap: 10px;
    margin: 10px 3%;
    padding: 8px 9px 8px 13px;
    border: 1px solid rgba(226,205,157,.22);
    border-radius: 13px;
    background: rgba(255,255,255,.025);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(255,255,255,.025), 0 4px 18px rgba(0,0,0,.08);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
}

.message-box.glass-surface {
    border-radius: 14px !important;
}

.message-box input[type="text"] {
    min-width: 0;
    width: 0;
    flex: 1;
    outline: none;
    background: transparent;
    color: #f0f6f8;
    font-size: 13px;
}

.message-box input::placeholder {
    color: rgba(205,216,221,.58);
}

.message-box button {
    padding: 10px 19px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg,rgba(226,205,157,.88),rgba(160,132,78,.88));
    color: #17140f;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.message-box button:disabled,
.upload-button[aria-disabled="true"] {
    opacity: .55;
    cursor: wait;
}

.upload-button {
    width: 32px;
    height: 32px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,.055);
    color: var(--gold-bright);
    font-size: 22px;
    cursor: pointer;
}

.upload-button:hover {
    background: rgba(255,255,255,.11);
}

.upload-status {
    min-height: 22px;
    height: auto;
    margin: 0 5%;
    padding-bottom: 4px;
    color: #ead9b2;
    font-size: 11px;
    line-height: 1.45;
}

.upload-status.error {
    color: #e98a83;
}

/* =========================================================
   COMMUNITY / MEMBERS SIDEBAR
========================================================= */

.members {
    width: 260px;
    flex: none;
    padding: 23px 17px;
    overflow: auto;
    border-left: 1px solid var(--line);
    background: rgba(20,21,24,.96);
}

.members-section,
.media-section {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.members-section .section-heading,
.media-section .section-heading {
    margin: 0 0 13px;
}

.online-list {
    padding: 0;
    list-style: none;
}

.online-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 2px;
    color: #e4edf0;
    font-size: 12px;
}

.online-list i.away {
    background: #b89a5c;
}

.online-list em {
    margin-left: auto;
    color: #aab8bf;
    font-size: 10px;
    font-style: normal;
}

.media-section {
    margin-top: 22px;
}

.media-intro {
    margin: 0 0 12px;
    color: #c0cbd0;
    font-size: 11px;
    line-height: 1.5;
}

.shared-media {
    display: grid;
    gap: 11px;
}

.shared-media-card {
    padding: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 9px;
    background: #1b1c20;
}

.shared-media-name {
    margin-bottom: 7px;
    overflow: hidden;
    color: #c0cbd0;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-media-preview {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
    color: var(--gold-bright);
    font-size: 11px;
}

.shared-media-preview audio {
    width: 100%;
}

.media-empty {
    color: #c0cbd0;
    font-size: 11px;
}

.members-footer {
    margin-top: 24px;
    color: #a6b2b8;
    font-size: 9px;
    letter-spacing: .16em;
}

.members-footer span {
    margin-left: 4px;
    color: #e5d3aa;
}

/* =========================================================
   SERVER EMPTY VIEW
========================================================= */

.server-view {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.server-view[hidden] {
    display: none !important;
}

.server-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.server-empty-gem {
    width: 74px;
    height: 74px;
    object-fit: contain;
    transform: scale(2.4);
    margin-bottom: 26px;
    filter: drop-shadow(0 0 16px rgba(199,169,107,.3));
    pointer-events: none;
}

.server-empty h2 {
    margin: 10px 0 8px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(26px,4vw,40px);
    font-weight: 600;
    color: var(--text);
}

.server-empty p {
    max-width: 420px;
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.server-empty-note {
    color: #6f6d72 !important;
    font-size: 11px !important;
}

/* =========================================================
   EMPTY CHANNEL GLASS
========================================================= */

.empty-channel-view {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    overflow: hidden;
    background: radial-gradient(ellipse at 30% 20%,rgba(199,169,107,.09),transparent 55%), radial-gradient(ellipse at 75% 80%,rgba(80,120,200,.10),transparent 55%), rgba(23,24,27,.55);
}

.glass-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 640px;
    min-height: 420px;
    isolation: isolate;
}

.glass-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(52px);
    opacity: .5;
    pointer-events: none;
    animation: glassDrift 18s ease-in-out infinite;
}

.glass-blob-a {
    width: 250px;
    height: 250px;
    top: 4%;
    left: 6%;
    background: rgba(199,169,107,.55);
}

.glass-blob-b {
    width: 210px;
    height: 210px;
    bottom: 6%;
    right: 8%;
    background: rgba(90,140,235,.45);
    animation-delay: -6s;
}

.glass-blob-c {
    width: 170px;
    height: 170px;
    top: 46%;
    left: 58%;
    background: rgba(190,110,220,.35);
    animation-delay: -12s;
}

.liquid-glass-panel {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%,460px);
    padding: 46px 34px;
    text-align: center;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,.22);
    background: linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.06) 42%,rgba(255,255,255,.02) 62%,rgba(255,255,255,.11));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(255,255,255,.12), 0 24px 70px rgba(0,0,0,.5), 0 0 40px rgba(255,255,255,.05);
    backdrop-filter: blur(26px) saturate(1.7) brightness(1.08);
    -webkit-backdrop-filter: blur(26px) saturate(1.7) brightness(1.08);
    overflow: hidden;
}

.liquid-glass-panel::before {
    content: "";
    position: absolute;
    top: -60%;
    left: -30%;
    width: 60%;
    height: 220%;
    background: linear-gradient(100deg,transparent,rgba(255,255,255,.22),transparent);
    transform: rotate(18deg);
    animation: glassSheen 6.5s ease-in-out infinite;
    pointer-events: none;
}

.liquid-glass-panel > * {
    position: relative;
    z-index: 1;
}

.glass-gem {
    width: 86px;
    height: 86px;
    object-fit: contain;
    transform: scale(3.1);
    margin-bottom: 26px;
    filter: drop-shadow(0 0 18px rgba(255,255,255,.28));
    pointer-events: none;
}

.liquid-glass-panel h2 {
    margin: 8px 0 6px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(28px,4.4vw,42px);
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0,0,0,.45);
}

.liquid-glass-panel p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 13px;
}

.liquid-glass-panel .eyebrow {
    color: rgba(255,255,255,.9);
    letter-spacing: .2em;
}

.empty-channel-copy h2 {
    font-family: "Playfair Display", Georgia, serif !important;
    font-weight: 600 !important;
    font-style: normal;
}

.empty-channel-gem {
    width: 90px !important;
    height: 90px !important;
    transform: scale(6) !important;
    transform-origin: center;
    position: relative;
    z-index: 0;
    pointer-events: none !important;
}

.empty-channel-copy .eyebrow,
.empty-channel-copy h2,
.empty-channel-copy p {
    position: relative;
    z-index: 1;
}

.empty-menu-button {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
}

@keyframes glassDrift {
    0%,100% { transform: translate3d(0,0,0) scale(1); }
    33% { transform: translate3d(28px,-22px,0) scale(1.12); }
    66% { transform: translate3d(-22px,20px,0) scale(.94); }
}

@keyframes glassSheen {
    0% { left: -40%; opacity: 0; }
    15% { opacity: 1; }
    55% { left: 110%; opacity: .9; }
    100% { left: 110%; opacity: 0; }
}

/* =========================================================
   SCREEN SHARE
========================================================= */

.screen-share-stage {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    background: #101114;
}

.screen-share-stage[hidden] {
    display: none !important;
}

.remote-screen-container {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: #08090b;
    border: 1px solid rgba(255,255,255,.08);
}

.remote-screen-container .remote-video-tile {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: transparent;
    border: none;
}

.remote-screen-container .remote-video-tile[hidden] {
    display: none !important;
}

.remote-screen-container video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}

.remote-screen-container figcaption {
    flex: 0 0 auto;
    padding: 8px 12px;
    color: #d8c8a0;
    font-size: 12px;
}

/* =========================================================
   PROFILE MODAL / UPLOAD / CROP
========================================================= */

.profile-modal-preview {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    margin: 0 auto 18px;
    border: 1px solid rgba(226,205,157,.28);
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg,#2b2924,#141416);
}

.profile-modal-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.profile-reset-picture {
    display: block;
    width: 100%;
    margin: 0 0 14px;
    padding: 9px;
    border: 1px solid #3a383d;
    border-radius: 9px;
    background: #22232a;
    color: #d8d4cb;
    font-size: 11px;
    cursor: pointer;
}
.profile-reset-picture:hover {
    border-color: rgba(199,169,107,.5);
    color: var(--gold-bright);
}

.profile-modal-choices {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.profile-choice {
    padding: 9px 6px;
    border: 1px solid #3a383d;
    border-radius: 9px;
    background: #22232a;
    color: #d8d4cb;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .16s, color .16s, background .16s;
}

.profile-choice:hover {
    border-color: rgba(199,169,107,.5);
    color: var(--gold-bright);
}

.profile-choice.selected {
    border-color: var(--gold-bright);
    background: rgba(199,169,107,.16);
    color: var(--gold-bright);
}

.profile-upload {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 11px 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    text-shadow: 0 1px 6px rgba(0,0,0,.4);
}

.profile-upload-note {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.profile-crop {
    margin-bottom: 14px;
}

.profile-crop[hidden] {
    display: none !important;
}

.profile-crop-hint {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.crop-frame {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 11px;
    overflow: hidden;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.28);
    background: #101114;
    cursor: grab;
    touch-action: none;
}

.crop-frame:active {
    cursor: grabbing;
}

.crop-frame img {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: contain;
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
}

.crop-zoom-label {
    display: block;
    margin-bottom: 5px;
    color: #8e8879;
    font-size: 9px;
    letter-spacing: .16em;
    font-weight: 700;
}

#cropZoom {
    width: 100%;
    accent-color: var(--gold-bright);
}

/* =========================================================
   CREATE SERVER MODAL
========================================================= */

#serverModal {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4,5,7,.72);
    backdrop-filter: blur(9px) saturate(135%);
    -webkit-backdrop-filter: blur(9px) saturate(135%);
}

#serverModal[hidden] {
    display: none !important;
}

#serverModal > div,
#serverModal .modal-content,
#serverModal .server-modal-content {
    position: relative;
    width: min(100%,440px);
    max-height: min(90vh,720px);
    overflow-y: auto;
    padding: 30px;
    background: linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.018) 45%,rgba(199,169,107,.035)), rgba(19,20,24,.94);
    border: 1px solid rgba(226,205,157,.25);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 25px 80px rgba(0,0,0,.55), 0 0 35px rgba(199,169,107,.07);
}

#serverModal h1,
#serverModal h2,
#serverModal h3 {
    margin-top: 0;
    color: #f0e4c8;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    text-shadow: 0 0 12px rgba(226,205,157,.12);
}

#serverModal p {
    color: rgba(210,220,224,.76);
    font-size: 13px;
    line-height: 1.6;
}

#serverModal form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#serverModal label {
    display: block;
    margin-bottom: 7px;
    color: #e2d5b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
}

#serverModal input,
#serverModal select {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid rgba(226,205,157,.2);
    border-radius: 9px;
    outline: none;
    background: rgba(5,7,10,.52);
    color: #f0f6f8;
    font-size: 13px;
}

#serverModal input::placeholder {
    color: rgba(190,203,210,.45);
}

#serverModal input:focus,
#serverModal select:focus {
    border-color: rgba(225,201,143,.75);
    background: rgba(5,7,10,.72);
    box-shadow: 0 0 0 3px rgba(199,169,107,.11);
}

#serverModal select {
    cursor: pointer;
}

#serverModal select option {
    background: #17181c;
    color: #f0f0f0;
}

#serverModal button {
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: background .18s, border-color .18s, transform .18s, opacity .18s;
}

#serverModal button:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: 3px;
}

#confirmCreateServer {
    background: linear-gradient(135deg,#dfc58c,#a9874e);
    color: #17140f;
    box-shadow: 0 4px 15px rgba(199,169,107,.13);
}

#confirmCreateServer:hover {
    background: linear-gradient(135deg,#f0dba8,#c19b5d);
    transform: translateY(-1px);
}

#cancelServerCreation,
#closeServerModal {
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.12);
    color: #dce5e9;
}

#cancelServerCreation:hover,
#closeServerModal:hover {
    background: rgba(255,255,255,.09);
    border-color: rgba(226,205,157,.3);
}

#serverModal button:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

#serverCreateStatus {
    min-height: 18px;
    color: #d9c28e;
    font-size: 12px;
    line-height: 1.5;
}

#serverCreateStatus.error {
    color: #e98a83;
}

#serverCreateStatus.success {
    color: #a8c5a7;
}

#serverModal .modal-actions,
#serverModal .server-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 5px;
}

/* =========================================================
   BACKDROP
========================================================= */

.mobile-sidebar-backdrop {
    display: none;
}

/* =========================================================
   DECORATIVE ELEMENTS / INTERACTION
========================================================= */

.workspace-gem {
    pointer-events: none !important;
}

.servers,
.channels,
#loungeSidebar,
.text-channels,
.voice-channel-list {
    position: relative;
    z-index: 10;
}

.server-icon,
.profile-avatar,
.text-channel,
.voice-channel {
    position: relative;
    z-index: 11;
    pointer-events: auto !important;
}

.text-channels li,
.voice-channel-list li {
    position: relative;
    padding: 0 !important;
}

.dm-welcome h1,
.dm-welcome h2,
.dm-sidebar-heading h2,
.dm-contact-heading h2,
.dm-conversation-header h2,
.dm-contact-name,
.dm-user-name,
.dm-conversation-title {
    color: #edf5f8;
    text-shadow: 0 1px 0 rgba(255,255,255,.2), 0 0 9px rgba(205,225,235,.16);
}

.dm-welcome p,
.dm-contact-heading p,
.dm-contact-status,
.dm-message-time,
.dm-timestamp {
    color: rgba(195,210,218,.78);
}

/* =========================================================
   TABLET / SMALL DESKTOP
========================================================= */

@media (max-width: 1050px) {
    .members {
        width: 225px;
    }

    .channels {
        width: 250px;
    }
}

/* =========================================================
   RESPONSIVE NAVIGATION — TABLET AND MOBILE
   The sidebar is a drawer. Chat always fills the screen.
========================================================= */

@media (max-width: 900px) {

    html,
    body {
        width: 100%;
        height: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    body {
        height: 100dvh;
        min-height: 0;
        overscroll-behavior: none;
    }

    .dashboard {
        display: flex;
        position: relative;
        width: 100%;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .members,
    #communitySidebar {
        display: none !important;
    }

    .chat-area {
        display: flex;
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .mobile-sidebar {
        position: fixed;
        z-index: 1002;
        top: 0;
        bottom: 0;
        left: 0;
        display: flex;
        width: min(310px,88vw);
        max-width: 88vw;
        height: 100dvh;
        overflow: hidden;
        background: #0c0d0f;
        box-shadow: 18px 0 45px rgba(0,0,0,.45);
        transform: translateX(-110%);
        transition: transform .28s cubic-bezier(.22,.8,.25,1);
        will-change: transform;
    }

    .dashboard.mobile-nav-open .mobile-sidebar {
        transform: translateX(0);
    }

    .servers {
        width: 58px;
        min-width: 58px;
        max-width: 58px;
        flex: none;
        gap: 10px;
        padding: 14px 0;
        padding-top: max(14px,env(safe-area-inset-top));
        overflow-y: auto;
        overflow-x: hidden;
    }

    .server-icon {
        width: 40px;
        height: 40px;
        flex: none;
        border-radius: 13px;
    }

    .channels {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        padding: 18px 10px;
        padding-bottom: max(14px,env(safe-area-inset-bottom));
        overflow-y: auto;
        overflow-x: hidden;
        border-right: 0;
    }

    .mobile-menu-button {
        display: flex !important;
        flex: none;
    }

    .mobile-sidebar-backdrop {
        display: block;
        position: fixed;
        z-index: 1001;
        inset: 0;
        width: 100%;
        height: 100dvh;
        padding: 0;
        border: 0;
        background: rgba(0,0,0,.58);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s ease, visibility .25s ease;
    }

    .dashboard.mobile-nav-open .mobile-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .chat-header {
        min-width: 0;
        padding: 12px 14px;
        gap: 10px;
    }

    .chat-header-main {
        min-width: 0;
        flex: 1;
    }

    .chat-header-main > div {
        min-width: 0;
    }

    .channel-title,
    .sub-header {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .messages,
    .dm-messages {
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .message-box {
        min-width: 0;
        max-width: 100%;
    }

    .message-box input[type="text"] {
        min-width: 0;
        width: 0;
        flex: 1;
    }

    .empty-channel-view,
    .server-view,
    .lounge-view,
    .dm-view,
    .dm-conversation-view {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    #loungeView,
    #serverView,
    #dmHomeView,
    #dmConversationView,
    #emptyView {
        min-width: 0;
        max-width: 100%;
    }

    .voice-controls {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 600px) {

    .mobile-sidebar {
        width: min(280px,88vw);
        max-width: 88vw;
    }

    .servers {
        width: 54px;
        min-width: 54px;
        max-width: 54px;
    }

    .server-icon {
        width: 38px;
        height: 38px;
    }

    .workspace-heading {
        padding-bottom: 17px;
        margin-bottom: 12px;
    }

    .workspace-heading h1 {
        font-size: 19px;
    }

    .section-heading {
        margin-top: 16px;
    }

    .chat-header {
        padding: 10px 12px;
    }

    .messages,
    .dm-messages {
        margin: 10px 8px 0;
        padding: 14px 10px;
        border-radius: 14px;
    }

    .message {
        max-width: 100%;
        overflow-wrap: anywhere;
        color: rgba(241,246,248,.96);
    }

    .message strong {
        color: #f2e3c2;
    }

    .message-box {
        width: auto;
        min-width: 0;
        max-width: 100%;
        margin: 8px !important;
        gap: 6px;
    }

    .message-box.glass-surface {
        margin: 8px !important;
    }

    .message-box input,
    .dm-message-box input {
        min-width: 0;
        width: 0;
        flex: 1;
    }

    .message-box button {
        padding: 9px 12px;
    }

    .empty-channel-view {
        padding: 12px;
    }

    .liquid-glass-panel {
        padding: 30px 18px;
        border-radius: 20px;
    }

    .glass-gem {
        width: 70px;
        height: 70px;
        transform: scale(2.6);
        margin-bottom: 22px;
    }

    .empty-channel-view {
        padding: 16px;
    }

    .voice-join-slot .voice-join-button {
        min-width: 52px;
        padding: 6px 9px !important;
    }

    .voice-count {
        font-size: 8px;
    }

    .crop-frame,
    .crop-frame img {
        width: 130px;
        height: 130px;
    }

    .profile-modal-choices {
        grid-template-columns: repeat(2,1fr);
    }

    img,
    video,
    iframe {
        max-width: 100%;
    }
}

/* =========================================================
   LANDSCAPE PHONES
========================================================= */

@media (max-width: 900px) and (max-height: 500px) {

    .mobile-sidebar {
        height: 100dvh;
    }

    .channels {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .workspace-heading {
        padding-bottom: 12px;
        margin-bottom: 10px;
    }

    .workspace-heading h1 {
        font-size: 18px;
    }

    .chat-header {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .empty-channel-view {
        padding: 10px;
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .mobile-sidebar,
    .mobile-sidebar-backdrop,
    .server-icon,
    .mobile-menu-button,
    #serverModal button,
    .glass-blob,
    .liquid-glass-panel::before,
    .chat-area::before,
    .profile-card::before,
    .profile-card::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================
   DIAMOND LOUNGE — CHANNEL DELETE CONTROLS
========================================== */

.created-server-channel-item {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.created-server-channel-button {
    flex: 1;
    min-width: 0;
}

.created-server-channel-delete {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #c7a96b;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.created-server-channel-delete:hover {
    background: rgba(199, 169, 107, 0.16);
    color: #ff7777;
}

@media (max-width: 768px) {
    .created-server-channel-delete {
        width: 40px;
        min-width: 40px;
        height: 40px;
        background: rgba(199, 169, 107, 0.08);
    }
}

/* MEMBER-CREATED SERVER CHANNEL WORKSPACE */
.created-server-workspace {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.created-server-channel-panel {
    width: 240px;
    min-width: 190px;
    flex: 0 0 240px;
    padding: 18px 12px;
    overflow-y: auto;
    background: rgba(16,17,20,.96);
    border-right: 1px solid var(--line);
}
.created-server-channel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.created-server-channel-heading h3,
.created-server-channel-section h4 {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: .12em;
}
.created-server-channel-heading button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.04);
    color: var(--gold-bright);
    cursor: pointer;
}
.created-server-channel-section ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 18px;
}
.created-server-channel-item {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}
.created-server-channel-button {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(230,232,235,.72);
    text-align: left;
    cursor: pointer;
}
.created-server-channel-button:hover,
.created-server-channel-button.selected {
    background: rgba(199,169,107,.13);
    color: #f3e4c2;
}
.created-server-channel-icon {
    flex: none;
    color: var(--gold);
}
.created-server-chat {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.created-server-chat-header {
    flex: none;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--gold-bright);
    font-weight: 600;
}
.created-server-messages {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px;
    overflow-y: auto;
    overflow-wrap: anywhere;
}
@media (max-width: 900px) {
    .created-server-workspace { min-height: 0; }
    .created-server-channel-panel {
        width: min(220px, 40vw);
        min-width: 150px;
        flex-basis: min(220px, 40vw);
        padding: 14px 8px;
    }
    .created-server-chat-header { padding: 12px; }
    .created-server-messages { padding: 12px; }
}
@media (max-width: 600px) {
    .created-server-channel-panel {
        width: 155px;
        min-width: 135px;
        flex-basis: 155px;
        padding: 12px 7px;
    }
    .created-server-channel-button { padding: 8px 6px; }
}

/* DISCORD-STYLE CREATED SERVER SIDEBAR — DIAMOND LOUNGE */
.created-server-workspace{background:#313338;color:#dbdee1;}
.created-server-channel-panel{background:#2b2d31!important;border-right:0!important;padding:0!important;width:245px!important;min-width:215px!important;flex-basis:245px!important;display:flex;flex-direction:column;}
.created-server-dropdown{position:relative;flex:none;border-bottom:1px solid rgba(255,255,255,.06);z-index:5;}
.created-server-dropdown>summary{list-style:none;cursor:pointer;padding:18px 16px;font-weight:700;font-size:15px;display:flex;justify-content:space-between;align-items:center;color:#f2f3f5;}
.created-server-dropdown>summary::-webkit-details-marker{display:none;}
.server-menu-chevron{color:#b5bac1;font-size:18px;}
.created-server-menu{padding:6px;margin:0 8px 8px;background:#111214;border-radius:8px;box-shadow:0 8px 22px rgba(0,0,0,.35);display:flex;flex-direction:column;gap:2px;}
.created-server-menu button{border:0;border-radius:5px;background:transparent;color:#dbdee1;text-align:left;padding:10px 12px;font:inherit;cursor:pointer;}
.created-server-menu button:hover{background:#5865f2;color:white;}
.created-server-event-row{border:0;background:transparent;color:#b5bac1;padding:11px 16px;text-align:left;display:flex;gap:12px;align-items:center;font:inherit;cursor:pointer;}
.created-server-event-row:hover{background:rgba(255,255,255,.04);color:#f2f3f5;}
.created-server-channel-heading{padding:20px 12px 7px 16px;display:flex;align-items:center;justify-content:space-between;gap:8px;}
.created-server-channel-heading h3{font-size:11px!important;letter-spacing:.02em!important;color:#949ba4!important;margin:0;font-weight:700;}
.created-server-channel-heading button{border:0!important;background:transparent!important;color:#b5bac1!important;font-size:22px;width:26px;height:26px;cursor:pointer;border-radius:5px;}
.created-server-channel-heading button:hover{color:#f2f3f5!important;background:rgba(255,255,255,.08)!important;}
.created-server-channel-section ul{margin:2px 6px 8px!important;}
.created-server-channel-item{margin:1px 0;}
.created-server-channel-button{padding:7px 9px!important;border-radius:5px!important;gap:8px!important;font-size:14px;color:#b5bac1!important;}
.created-server-channel-button:hover{background:#35373c!important;color:#dbdee1!important;}
.created-server-channel-button.selected{background:#404249!important;color:#f2f3f5!important;}
.created-server-channel-icon{color:#949ba4!important;font-size:16px;}
.created-server-channel-delete{height:28px!important;width:28px!important;min-width:28px!important;color:#b5bac1!important;font-size:18px!important;}
.created-server-add-channel{margin:10px 12px 14px;border:1px solid rgba(255,255,255,.09);border-radius:6px;padding:9px;background:transparent;color:#b5bac1;cursor:pointer;}
.created-server-add-channel:hover{background:#35373c;color:#f2f3f5;}
.created-server-chat{background:#313338;}
.created-server-chat-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px!important;border-bottom:1px solid #3f4147!important;color:#f2f3f5!important;}
.created-server-header-members{border:0;background:transparent;color:#b5bac1;cursor:pointer;padding:7px 10px;border-radius:5px;}
.created-server-header-members:hover{background:#35373c;color:#f2f3f5;}
.created-server-messages{color:#dbdee1;}
@media(max-width:900px){.created-server-channel-panel{width:min(245px,45vw)!important;min-width:180px!important;flex-basis:min(245px,45vw)!important;}.created-server-dropdown>summary{padding:15px 12px;}}
@media(max-width:600px){.created-server-channel-panel{width:175px!important;min-width:150px!important;flex-basis:175px!important;}}

/* CREATED-SERVER VOICE VIEW AND FEATURE MODALS */
.created-server-voice-title{font-size:22px;color:#f2f3f5;margin:12px 0 18px}
.created-server-voice-stage{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;min-height:180px}
.created-server-voice-tile{background:#232428;border:1px solid rgba(255,255,255,.08);border-radius:12px;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#f2f3f5}
.created-server-voice-avatar{width:92px;height:92px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#5865f2,#30344b);border:3px solid rgba(255,255,255,.2);font-size:34px;font-weight:700;color:white}
.created-server-voice-name{font-weight:600}
.created-server-audience-heading{margin:25px 0 10px;font-size:11px;letter-spacing:.08em;color:#949ba4}
.created-server-audience{display:flex;flex-wrap:wrap;gap:10px}
.created-server-audience-member{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:22px;background:#2b2d31;color:#dbdee1}
.created-server-voice-controls{display:flex;gap:10px;justify-content:center;margin:18px 0}
.created-server-voice-join,.created-server-voice-leave,.created-server-feature-action{border:0;border-radius:6px;padding:10px 16px;background:#5865f2;color:#fff;cursor:pointer;font-weight:600}
.created-server-voice-leave{background:#ed4245}
.created-server-voice-status{color:#949ba4;text-align:center}
.created-server-feature-backdrop{position:fixed;z-index:2000;inset:0;background:rgba(0,0,0,.7);display:grid;place-items:center;padding:20px}
.created-server-feature-modal{width:min(540px,96vw);max-height:90dvh;overflow:auto;position:relative;background:#313338;color:#dbdee1;border-radius:12px;padding:24px;box-shadow:0 18px 60px rgba(0,0,0,.5)}
.created-server-feature-modal h2{margin:0 0 16px;color:#f2f3f5}
.created-server-feature-close{position:absolute;right:12px;top:12px;background:transparent;border:0;color:#b5bac1;font-size:24px;cursor:pointer}
.created-server-feature-content{display:flex;flex-direction:column;gap:12px}
.created-server-feature-content input,.created-server-feature-content select{width:100%;padding:10px;background:#1e1f22;color:#f2f3f5;border:1px solid #45464d;border-radius:6px}
.created-server-feature-content label{color:#b5bac1;font-size:12px;font-weight:700}
.created-server-feature-content button{align-self:flex-start}
@media(max-width:600px){.created-server-voice-stage{grid-template-columns:1fr}.created-server-feature-modal{padding:20px 16px}}

.created-server-category-heading{display:flex;align-items:center;justify-content:space-between;margin:13px 8px 4px;color:#949ba4;font-size:11px;font-weight:700;letter-spacing:.03em;list-style:none}.created-server-category-heading button{border:0;background:transparent;color:#949ba4;cursor:pointer}

/* Voice channel row action icons: Discord-style, hover reveal */
#createdServerVoiceChannels .created-server-channel-item{position:relative;display:flex;align-items:center;min-height:32px;padding:0 4px;border-radius:5px;overflow:visible}
#createdServerVoiceChannels .created-server-channel-button{flex:1;min-width:0;display:flex;align-items:center;overflow:hidden}
#createdServerVoiceChannels .created-server-channel-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.created-server-voice-row-actions{display:flex;align-items:center;gap:3px;opacity:0;visibility:hidden;position:absolute;right:7px;top:50%;transform:translateY(-50%);z-index:2}
#createdServerVoiceChannels .created-server-channel-item:hover .created-server-voice-row-actions,#createdServerVoiceChannels .created-server-channel-item.selected .created-server-voice-row-actions,#createdServerVoiceChannels .created-server-channel-item:focus-within .created-server-voice-row-actions{opacity:1;visibility:visible}
.created-server-voice-row-actions button{width:25px;height:25px;display:grid;place-items:center;padding:3px;border:0;border-radius:4px;background:transparent;color:#b5bac1;cursor:pointer}
.created-server-voice-row-actions button:hover{background:#41434a;color:#fff}
.created-server-voice-row-actions svg{width:17px;height:17px;fill:currentColor}
.created-server-voice-row-actions svg path{fill:currentColor}
.created-server-voice-row-actions button[aria-label="Open voice channel chat"] svg path{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.created-server-voice-row-actions button[aria-label="Invite to channel"] svg path{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.created-server-voice-row-actions button[aria-label="Voice channel settings"] svg path{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#createdServerVoiceChannels .created-server-channel-item:hover .created-server-channel-button,#createdServerVoiceChannels .created-server-channel-item.selected .created-server-channel-button{padding-right:82px!important}
.created-server-voice-chat-content{min-height:350px}
.created-server-voice-chat-log{max-height:55dvh;min-height:200px;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:8px;background:#232428;border-radius:8px}
.created-server-voice-chat-message{display:flex;flex-direction:column;gap:3px;color:#dbdee1;overflow-wrap:anywhere}
.created-server-voice-chat-message strong{color:#f2f3f5}
.created-server-voice-chat-form{display:flex;gap:8px}
.created-server-voice-chat-form input{flex:1;min-width:0}
.created-server-voice-chat-form button{align-self:stretch}
@media(max-width:600px){.created-server-voice-row-actions{opacity:1;visibility:visible;right:3px}#createdServerVoiceChannels .created-server-channel-item .created-server-channel-button{padding-right:82px!important}}

/* Created server voice workspace refinements */
.created-server-voice-stage{width:100%;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));}
.created-server-voice-tile{transition:border-color .18s ease,background .18s ease;}
.created-server-voice-tile:hover{border-color:rgba(199,169,107,.4);background:#292a2f;}
.created-server-category-heading{display:flex;align-items:center;justify-content:space-between;padding:12px 8px 5px;color:#a5a5aa;font-size:11px;font-weight:700;letter-spacing:.09em;}
.created-server-channel-item[data-channel-type=voice] .created-server-channel-icon{color:#c7a96b;}
.created-server-voice-chat-log{max-height:45vh;overflow:auto;}
@media(max-width:600px){.created-server-voice-tile{min-height:145px}.created-server-voice-avatar{width:76px;height:76px}.created-server-voice-stage{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}}

.created-server-voice-avatar{overflow:hidden;position:relative;}
.created-server-voice-avatar-image{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block;}


/* Keep channels visually nested beneath the category labels. */
.created-server-channel-item.is-categorized {
    margin-left: 13px;
    padding-left: 7px;
    border-left: 1px solid rgba(199,169,107,.18);
}



/* =========================================================
   DISCORD-STYLE LIVE VOICE CALL LAYOUT
   ========================================================= */

.created-server-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
    padding: 0 18px;
    background: #313338;
    border-bottom: 1px solid rgba(0,0,0,.28);
    color: #f2f3f5;
}
.created-server-chat-header-title {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
}
.created-server-chat-header-title .created-server-channel-symbol {
    color: #949ba4;
    font-size: 20px;
}
.created-server-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.created-server-header-chat,
.created-server-header-members {
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #b5bac1;
    padding: 8px 10px;
    cursor: pointer;
}
.created-server-header-chat:hover,
.created-server-header-members:hover {
    background: #3f4147;
    color: #fff;
}
.created-server-header-chat[hidden],
.created-server-header-members[hidden] {
    display: none !important;
}
.created-server-chat-header.is-voice-header {
    background: #232428;
}

/* Compact connected panel pinned to the bottom of the channel list. */
.created-server-voice-connection {
    position: sticky;
    bottom: 0;
    z-index: 8;
    flex: 0 0 auto;
    margin-top: auto;
    padding: 10px 10px 9px;
    background: #232428;
    border-top: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 -8px 18px rgba(0,0,0,.18);
}
.created-server-voice-connection[hidden] {
    display: none !important;
}
.created-server-voice-connection-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.created-server-voice-signal {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(35,165,90,.17);
    color: #3ba55d;
    font-size: 18px;
    font-weight: 800;
}
.created-server-voice-connection-state {
    min-width: 0;
    flex: 1;
    color: #3ba55d;
    font-size: 13px;
    font-weight: 600;
}
.created-server-voice-disconnect {
    border: 0;
    background: transparent;
    color: #b5bac1;
    font-size: 19px;
    cursor: pointer;
}
.created-server-voice-disconnect:hover {
    color: #f23f43;
}
.created-server-voice-connection-room {
    padding: 1px 0 8px 34px;
    overflow: hidden;
    color: #b5bac1;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.created-server-voice-quick-actions {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 6px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.created-server-voice-quick-actions button {
    min-width: 0;
    height: 34px;
    border: 0;
    border-radius: 7px;
    background: #383a40;
    color: #f2f3f5;
    font-size: 17px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.created-server-voice-quick-actions button:hover,
.created-server-voice-user-actions button:hover {
    background: #454851;
}
.created-server-voice-quick-actions button[aria-pressed="true"] {
    background: rgba(88,101,242,.28);
    color: #c8ceff;
}
.created-server-voice-user-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 9px;
}
.created-server-voice-user {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    padding: 0;
    border: 0;
    background: transparent;
    color: #f2f3f5;
    text-align: left;
    cursor: pointer;
}
.created-server-voice-user-avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(145deg,#2b2924,#141416);
    color: #e1c98f;
    font-weight: 700;
}
.created-server-voice-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.created-server-voice-user-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
#createdServerVoiceUserName {
    overflow: hidden;
    color: #f2f3f5;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#createdServerVoiceUserSubline {
    overflow: hidden;
    color: #b5bac1;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.created-server-voice-user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.created-server-voice-user-badges span {
    max-width: 90px;
    padding: 1px 5px;
    overflow: hidden;
    border-radius: 4px;
    background: #313338;
    color: #c9cbd0;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.created-server-voice-user-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}
.created-server-voice-user-actions button {
    width: 28px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #b5bac1;
    cursor: pointer;
    font-size: 16px;
}
.created-server-voice-user-actions button[aria-pressed="true"] {
    color: #f23f43;
    background: rgba(242,63,67,.13);
}

/* Full-room canvas: header above, member tiles in the middle, control dock below. */
#createdServerMessages.is-voice-call-view {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 !important;
    overflow: hidden;
    background: #000;
}
.created-server-voice-call {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0,1fr) auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #000;
}
.created-server-voice-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-auto-rows: minmax(180px,1fr);
    align-content: center;
    gap: 6px;
    min-height: 0;
    padding: 6px;
    overflow-y: auto;
    background: #000;
}
.created-server-voice-empty {
    grid-column: 1 / -1;
    align-self: center;
    justify-self: center;
    padding: 24px;
    color: #949ba4;
    font-size: 14px;
}
.created-server-voice-tile {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--voice-card-background,#26343f);
    transition: border-color .15s, box-shadow .15s;
}
.created-server-voice-tile.is-self {
    border: 1px solid #23a55a;
    box-shadow: 0 0 0 1px rgba(35,165,90,.45);
}
.created-server-voice-avatar {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.12);
    background: rgba(12,14,18,.28);
    color: #fff;
    font-size: 25px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.created-server-voice-tile.has-camera .created-server-voice-avatar {
    display: none;
}
.created-server-voice-avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.created-server-voice-tile-footer {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    pointer-events: none;
}
.created-server-voice-identity {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}
.created-server-voice-name-pill {
    max-width: min(250px,65vw);
    padding: 5px 8px;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(13,15,19,.78);
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.created-server-voice-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}
.created-server-voice-badge {
    max-width: 160px;
    padding: 4px 7px;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(13,15,19,.76);
    color: #e5e7eb;
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.created-server-voice-badge.is-role {
    background: rgba(199,169,107,.9);
    color: #191a1d;
    font-weight: 700;
}
.created-server-voice-indicators {
    display: flex;
    align-items: center;
    gap: 5px;
}
.created-server-voice-indicator,
.created-server-voice-hand {
    display: grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    padding: 0 5px;
    border-radius: 6px;
    background: rgba(13,15,19,.76);
    color: #fff;
    font-size: 12px;
}
.created-server-voice-indicator.is-muted {
    color: #f23f43;
}
.created-server-voice-remote-media {
    position: absolute;
    inset: 6px;
    z-index: 5;
    pointer-events: none;
}
.created-server-voice-remote-media #remoteVideoGrid {
    display: none;
}
.created-server-voice-remote-media #screenShareStage {
    position: absolute !important;
    inset: 3% 5% !important;
    width: auto !important;
    height: auto !important;
    z-index: 8;
    background: #08090b;
}
.created-server-voice-remote-media #screenShareStage[hidden] {
    display: none !important;
}
.created-server-voice-remote-media #remoteScreenContainer {
    width: 100%;
    height: 100%;
}
.created-server-embedded-video,
.created-server-local-camera {
    position: absolute !important;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.created-server-embedded-video[hidden] {
    display: none !important;
}
.created-server-embedded-video video,
.created-server-local-camera {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    background: #101114;
}
.created-server-embedded-video figcaption {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: max-content;
    max-width: 60%;
    padding: 4px 7px;
    border-radius: 4px;
    background: rgba(13,15,19,.7);
    color: #fff;
    font-size: 10px;
}

/* Bottom-center call dock. */
.created-server-voice-toolbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 76px;
    padding: 10px 18px 18px;
    background: linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.78) 35%,#000);
}
.created-server-voice-call-status {
    position: absolute;
    left: 18px;
    bottom: 24px;
    color: #949ba4;
    font-size: 11px;
}
.created-server-voice-toolbar-group {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border: 1px solid #303136;
    border-radius: 12px;
    background: rgba(18,19,22,.96);
    box-shadow: 0 8px 25px rgba(0,0,0,.35);
}
.created-server-voice-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 55px;
    min-width: 0;
    height: 48px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #dbdee1;
    cursor: pointer;
}
.created-server-voice-tool > span {
    font-size: 18px;
    line-height: 1;
}
.created-server-voice-tool small {
    max-width: 100%;
    overflow: hidden;
    color: #b5bac1;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.created-server-voice-tool:hover {
    background: #3f4147;
    color: #fff;
}
.created-server-voice-tool[aria-pressed="true"] {
    background: rgba(88,101,242,.25);
    color: #c7ccff;
}
.created-server-voice-join {
    min-width: 115px;
    height: 50px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: #5865f2;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(88,101,242,.2);
}
.created-server-voice-join:hover {
    background: #4752c4;
}
.created-server-voice-join[hidden] {
    display: none !important;
}
.created-server-voice-leave {
    display: grid;
    place-items: center;
    width: 58px;
    min-width: 58px;
    height: 50px;
    border: 0;
    border-radius: 11px;
    background: #da373c;
    color: #fff;
    font-size: 0;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(218,55,60,.25);
}
.created-server-voice-leave::before {
    content: "☎";
    font-size: 22px;
}
.created-server-voice-leave:hover:not(:disabled) {
    background: #f23f43;
}
.created-server-voice-leave:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Profile badge editor. */
.profile-badges-note {
    margin: -6px 0 6px;
    color: #949ba4;
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 850px) {
    .created-server-voice-call-status {
        display: none;
    }
    .created-server-voice-stage {
        grid-auto-rows: minmax(160px,1fr);
    }
}
@media (max-width: 620px) {
    .created-server-voice-stage {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(180px,1fr);
    }
    .created-server-voice-toolbar {
        flex-wrap: wrap;
        gap: 7px;
        padding: 8px 8px max(12px,env(safe-area-inset-bottom));
    }
    .created-server-voice-toolbar-group {
        gap: 2px;
        max-width: 100%;
    }
    .created-server-voice-tool {
        width: 43px;
        height: 43px;
    }
    .created-server-voice-join {
        height: 44px;
    }
    .created-server-voice-leave {
        width: 49px;
        min-width: 49px;
        height: 44px;
    }
    .created-server-voice-connection {
        padding: 8px 7px;
    }
    .created-server-voice-user-actions button {
        width: 25px;
    }
}


/* Final alignment refinements for the reference call layout. */
.created-server-voice-tool small { display: none; }
.created-server-voice-tile:only-child {
    grid-column: 1 / -1;
    width: min(100%, 1180px);
    min-height: 250px;
    margin: 0 auto;
}
.created-server-voice-remote-media #remoteVideoGrid:not(:empty) {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 7;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(120px,1fr));
    width: min(34%,360px);
    max-height: 175px;
    overflow: auto;
}
.created-server-voice-remote-media #remoteVideoGrid:not(:empty) .remote-video-tile {
    min-width: 0;
    background: #111214;
}
.created-server-voice-remote-media #remoteVideoGrid:not(:empty) video {
    max-height: 110px;
}
#createdServerMessageForm[hidden],
#createdServerMessageStatus[hidden] {
    display: none !important;
}



/* =========================================================
   VIP-LOUNGE VOICE CALL VIEW + PINNED CONNECTION DOCK
   ========================================================= */
#loungeView.is-voice-call {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
#loungeView.is-voice-call .chat-header {
    flex: 0 0 auto;
    background: #232428;
}
#loungeView.is-voice-call .lounge-voice-call-view {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    height: 0;
    overflow: hidden;
    background: #000;
}
#loungeView .lounge-voice-call-view[hidden] {
    display: none !important;
}
#channelsSidebar.has-voice-connection .profile-card {
    display: none !important;
}
#mainVoiceConnectionPanel {
    flex: 0 0 auto;
}
#mainVoiceConnectionPanel[hidden] {
    display: none !important;
}
#mainVoiceConnectionPanel .created-server-voice-user-badges {
    margin-top: 1px;
}
@media (max-width: 850px) {
    #loungeView.is-voice-call .chat-header {
        padding: 12px 14px;
    }
}



/* Small live member portraits beneath voice-channel names. */
.voice-row-member-avatars {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 20px;
    margin: 1px 0 6px 31px;
    padding: 0;
}
.voice-row-member-avatar {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-left: -4px;
    overflow: hidden;
    border: 2px solid #2b2d31;
    border-radius: 50%;
    background: #3b3d44;
    color: #f2f3f5;
    font-size: 9px;
    font-weight: 700;
}
.voice-row-member-avatar:first-child {
    margin-left: 0;
}
.voice-row-member-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.voice-row-member-extra {
    display: grid;
    place-items: center;
    width: 22px;
    height: 20px;
    margin-left: 2px;
    border-radius: 10px;
    background: #3b3d44;
    color: #dbdee1;
    font-size: 9px;
    font-weight: 700;
}
.voice-row.has-voice-members .voice-row-head {
    min-height: 30px;
}
.created-server-channel-item[data-channel-type="voice"] {
    flex-wrap: wrap;
}
.created-server-channel-item[data-channel-type="voice"] .created-server-voice-sidebar-members {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    min-height: 18px;
    margin: -1px 0 5px 29px;
}
.created-server-voice-sidebar-member {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-left: -4px;
    overflow: hidden;
    border: 2px solid #2b2d31;
    border-radius: 50%;
    background: #3b3d44;
    color: #f2f3f5;
    text-align: center;
    font-size: 8px;
    line-height: 14px;
    font-weight: 700;
}
.created-server-voice-sidebar-member:first-child {
    margin-left: 0;
}
.created-server-voice-sidebar-member img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* Keep the account dock attached to the one visible channel sidebar. */
.created-server-channel-panel > .profile-card {
    width: auto;
    min-height: 58px;
    flex: 0 0 auto;
    margin: auto 8px 8px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: #232428;
    box-shadow: none;
}
.created-server-channel-panel > .profile-card::before,
.created-server-channel-panel > .profile-card::after {
    display: none !important;
}
.created-server-channel-panel.has-voice-connection > .profile-card {
    display: none !important;
}


.created-server-channel-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}



/* =========================================================
   CHANNEL WORKSPACE / DISCORD SCREEN-SHARE PRESENTATION
   ========================================================= */

/* The channel sidebar is not an empty placeholder when no server is selected. */
.channels[hidden] {
    display: none !important;
}

/* The active text channel uses the full main chat region.
   The empty welcome panel is not stacked above the active channel. */
#emptyView[hidden],
#loungeView[hidden],
#serverView[hidden],
#dmHomeView[hidden],
#dmConversationView[hidden] {
    display: none !important;
}
#loungeView {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
#loungeView .chat-header {
    flex: 0 0 auto;
    width: 100%;
    min-height: 64px;
    margin: 0;
    border-radius: 0;
}
#loungeView .messages {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
}
#loungeView .message-box {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin: 10px 16px 14px;
}
#loungeView .upload-status {
    flex: 0 0 auto;
}

/* Screen share fills the voice room. The member grid becomes Discord's
   compact floating participant column on the right. */
.created-server-voice-remote-media #screenShareStage {
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    z-index: 8;
    background: #050506;
}
.created-server-voice-remote-media #remoteScreenContainer {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: #050506;
}
.created-server-voice-remote-media #remoteScreenContainer .remote-video-screen {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #050506;
}
.created-server-voice-remote-media #remoteScreenContainer .remote-video-screen video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    background: #050506;
}
.created-server-voice-remote-media #remoteScreenContainer .remote-video-screen figcaption {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: max-content;
    max-width: 60%;
    padding: 6px 9px;
    border-radius: 6px;
    background: rgba(13,15,19,.78);
    color: #fff;
    font-size: 11px;
}
.created-server-voice-call.is-screen-sharing .created-server-voice-stage {
    position: absolute;
    top: 14px;
    right: 14px;
    bottom: 96px;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: min(230px,24%);
    min-height: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
    pointer-events: none;
}
.created-server-voice-call.is-screen-sharing .created-server-voice-tile {
    display: grid;
    flex: 0 0 132px;
    width: 100%;
    min-height: 132px;
    max-height: 132px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: var(--voice-card-background,#26343f);
    box-shadow: 0 5px 18px rgba(0,0,0,.32);
}
.created-server-voice-call.is-screen-sharing .created-server-voice-avatar {
    width: 48px;
    height: 48px;
    font-size: 19px;
}
.created-server-voice-call.is-screen-sharing .created-server-voice-tile-footer {
    right: 6px;
    bottom: 6px;
    left: 6px;
}
.created-server-voice-call.is-screen-sharing .created-server-voice-name-pill {
    max-width: 100%;
    padding: 3px 6px;
    font-size: 10px;
}
.created-server-voice-call.is-screen-sharing .created-server-voice-badge {
    max-width: 105px;
    padding: 3px 5px;
    font-size: 9px;
}
.created-server-voice-call.is-screen-sharing .created-server-voice-toolbar {
    z-index: 12;
}
.created-server-local-screen {
    position: relative !important;
}
@media (max-width: 700px) {
    .created-server-voice-call.is-screen-sharing .created-server-voice-stage {
        top: auto;
        right: 8px;
        bottom: 82px;
        left: 8px;
        flex-direction: row;
        width: auto;
        height: 104px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .created-server-voice-call.is-screen-sharing .created-server-voice-tile {
        flex: 0 0 142px;
        width: 142px;
        min-height: 96px;
        max-height: 96px;
    }
    .created-server-voice-call.is-screen-sharing .created-server-voice-avatar {
        width: 38px;
        height: 38px;
    }
    .created-server-voice-call.is-screen-sharing .created-server-voice-toolbar {
        padding-top: 8px;
    }
}

/* Diamond Support Bot */
.support-bot-launch{width:calc(100% - 18px);margin:10px 9px 16px;padding:11px 14px;border:1px solid rgba(199,169,107,.45);border-radius:12px;background:linear-gradient(135deg,rgba(199,169,107,.16),rgba(255,255,255,.035));color:var(--gold-bright);font-weight:700;cursor:pointer;transition:.2s ease;text-align:left}.support-bot-launch:hover{border-color:var(--gold-bright);background:rgba(199,169,107,.23);transform:translateY(-1px)}
.support-bot-backdrop{position:fixed;inset:0;z-index:10000;background:rgba(4,5,8,.72);backdrop-filter:blur(9px);display:flex;align-items:center;justify-content:center;padding:18px}.support-bot-panel{width:min(480px,100%);max-height:min(720px,90vh);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(199,169,107,.3);border-radius:20px;background:linear-gradient(160deg,#202126,#131419);box-shadow:0 24px 90px rgba(0,0,0,.55)}.support-bot-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid rgba(255,255,255,.08)}.support-bot-eyebrow{font-size:10px;letter-spacing:2px;color:var(--gold);font-weight:800}.support-bot-header h2{font-size:18px;margin:5px 0 0}.support-bot-header button{width:36px;height:36px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);font-size:24px;cursor:pointer}.support-bot-chat{padding:18px 20px 8px;overflow:auto;min-height:110px}.support-bot-message{max-width:100%;padding:11px 13px;margin:0 0 10px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.045);font-size:13px;line-height:1.55;color:var(--text)}.support-bot-choices{padding:8px 20px 18px;display:flex;flex-direction:column;gap:8px;overflow:auto}.support-bot-choices button{padding:11px 13px;border:1px solid rgba(199,169,107,.22);border-radius:11px;background:rgba(199,169,107,.07);color:var(--text);text-align:left;cursor:pointer;transition:.15s}.support-bot-choices button:hover{background:rgba(199,169,107,.17);border-color:rgba(199,169,107,.55)}.support-bot-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-top:1px solid rgba(255,255,255,.08);font-size:10px;color:var(--muted)}.support-bot-footer button{border:0;background:transparent;color:var(--gold-bright);cursor:pointer;font-weight:700}@media(max-width:520px){.support-bot-backdrop{padding:10px}.support-bot-panel{max-height:94vh;border-radius:16px}}

/* Animated sapphire gem beside Diamond Support */
.support-bot-launch{display:flex;align-items:center;gap:10px}.support-bot-diamond{width:25px;height:25px;flex:0 0 25px;overflow:visible;filter:drop-shadow(0 0 5px rgba(0,130,255,.45));animation:supportGemFloat 3s ease-in-out infinite}.support-bot-diamond .gem-main{fill:#0759d5;stroke:#66e6ff;stroke-width:1.5}.support-bot-diamond .gem-top{fill:#9beeff;stroke:#38baff;stroke-width:1}.support-bot-diamond .gem-facet{fill:#123fba;stroke:#68dcff;stroke-width:.7}.support-bot-diamond .gem-glow{fill:#12a9ff;opacity:.18;filter:blur(5px)}.support-bot-diamond .gem-spark{fill:#fff;transform-origin:45px 13px;animation:supportGemSpark 2.2s ease-in-out infinite}.support-bot-launch:hover .support-bot-diamond{filter:drop-shadow(0 0 9px rgba(0,180,255,.8))}.support-bot-launch span{line-height:1.2}@keyframes supportGemFloat{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-2px) rotate(2deg)}}@keyframes supportGemSpark{0%,100%{opacity:.35;transform:scale(.65)}50%{opacity:1;transform:scale(1.1)}}
