/* ===== LOUNGE - Chat Rooms, Messages, Room Settings ===== */

/* Left Panel Content */
.lounge-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, rgba(0, 0, 0, 0.2) 100%);
    box-shadow: inset -1px 0 0 rgba(16, 185, 129, 0.1);
}

.lounge-section {
    padding: 0;
    flex-shrink: 0;
}

.lounge-section:first-child {
    padding-bottom: 8px;
}

.lounge-section:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex-shrink: 1;
    padding-top: 8px;
}

.lounge-section:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lounge-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* My Rooms Tabs */
.my-rooms-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    background: rgba(0, 0, 0, 0.15);
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.my-rooms-tab {
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    padding: 12px 10px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.my-rooms-tab:hover {
    color: #6ee7b7;
}

.my-rooms-tab.active {
    color: #6ee7b7;
    border-bottom: 2px solid #6ee7b7;
}

/* Edit Room Tab */
.my-rooms-tab.edit-room-tab {
    color: #fff;
    font-size: 11px;
    padding: 12px 7px;
}

.my-rooms-tab.edit-room-tab:hover:not(.disabled) {
    color: #6ee7b7;
}

.my-rooms-tab.edit-room-tab.disabled {
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.my-rooms-tab.edit-room-tab.active {
    color: #6ee7b7;
}

/* My Rooms Empty State */
.my-rooms-empty {
    padding: 30px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

/* Room Search */
.room-search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 14px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.room-search-container svg {
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.room-search-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 12px;
    outline: none;
}

.room-search-container input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.room-search-container:focus-within {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.room-search-container:focus-within svg {
    color: rgba(255, 255, 255, 0.5);
}

.no-rooms-found {
    padding: 30px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.create-room-btn {
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.create-room-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.4);
}

.create-room-btn.disabled,
.create-room-btn:disabled {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.create-room-btn.disabled:hover,
.create-room-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Room Items */
.lounge-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.lounge-room-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.15s ease;
}

.lounge-room-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.lounge-room-item.active {
    background: rgba(16, 185, 129, 0.15);
    color: #fff;
}

/* Room Unread Badge */
.room-unread-badge {
    display: none;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: rgba(16, 185, 129, 0.4);
    border: none;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    margin-left: auto;
    text-align: center;
    line-height: 16px;
    position: relative;
    z-index: 10;
}

.room-unread-badge.show {
    display: inline-block;
}

.room-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.room-icon.default {
    color: rgba(255, 255, 255, 0.5);
}

.room-icon.default svg {
    width: 22px;
    height: 22px;
}

.room-icon.default-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: rgba(255, 255, 255, 0.6);
}

.room-icon.default-icon svg {
    width: 22px;
    height: 22px;
}

.room-icon.has-image {
    background-size: cover;
    background-position: center;
}

.room-name {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    color: inherit;
}

/* My Rooms List */
.lounge-my-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
    min-height: 200px;
    max-height: 200px;
    overflow-y: auto;
}

.lounge-my-rooms-list::-webkit-scrollbar {
    width: 4px;
}

.lounge-my-rooms-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* Community Rooms List */
.lounge-community-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
    flex: 1;
    overflow-y: auto;
}

.lounge-community-list::-webkit-scrollbar {
    width: 4px;
}

.lounge-community-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.lounge-community-room {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.15s ease;
}

.lounge-community-room:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.lounge-community-room.active {
    background: rgba(16, 185, 129, 0.15);
    color: #fff;
}

.lounge-community-room-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    font-size: 24px;
    justify-content: center;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.lounge-community-room-icon.default-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: rgba(255, 255, 255, 0.6);
}

.lounge-community-room-icon.default-icon svg {
    width: 22px;
    height: 22px;
}

.lounge-community-room-info {
    flex: 1;
    min-width: 0;
}

.lounge-community-room-name {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.lounge-community-room-members {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

/* Room action buttons container */
.room-action-btns {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

/* Favorite button */
.favorite-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.15s ease;
}

.favorite-btn:hover {
    color: #fff;
    background: rgba(16, 185, 129, 0.1);
}

.favorite-btn.active {
    color: #fff;
}

.favorite-btn.active:hover {
    background: rgba(16, 185, 129, 0.15);
}

.leave-room-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.leave-room-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.leave-room-btn.hidden {
    display: none;
}

/* Join button */
.join-room-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.join-room-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.join-room-btn.hidden {
    display: none;
}

/* Room Settings Panel - Modern */
.lounge-room-settings {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #101010;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.settings-back {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.settings-back:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #fff;
}

.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-label {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.settings-input {
    width: 100%;
    padding: 12px 14px;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.settings-input:focus {
    outline: none;
    border-color: var(--theme-color);
}

.settings-input::placeholder {
    color: #fff;
}

.settings-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #101010;
}

.settings-textarea {
    width: 100%;
    padding: 12px 14px;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
    resize: none;
    min-height: 80px;
}

.settings-textarea:focus {
    outline: none;
    border-color: var(--theme-color);
}

.settings-textarea::placeholder {
    color: #fff;
}

.char-count {
    font-size: 11px;
    color: #fff;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 8px;
}

.rules-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rule-number {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    min-width: 20px;
}

.rule-input {
    flex: 1;
}

.input-error-message {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: #fff;
}

.settings-toggle {
    display: flex;
    background: #101010;
    border-radius: 8px;
    padding: 4px;
}

.settings-toggle .toggle-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.settings-toggle .toggle-btn.active {
    background: var(--theme-color);
    color: #fff;
}

.settings-toggle .toggle-btn:hover:not(.active) {
    color: #fff;
}

/* Upload Cards - Modern Design */
.upload-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #101010;
    border: 2px dashed rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.upload-card:hover {
    border-color: rgba(16, 185, 129, 0.5);
    background: #101010;
}

.upload-card.has-image {
    border: 2px solid var(--theme-color);
    border-style: solid;
}

.upload-card.wide {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
}

.upload-preview-large {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.upload-card:hover .upload-preview-large {
    color: #fff;
}

.upload-card.has-image .upload-preview-large svg {
    display: none;
}

.upload-preview-wide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
    padding: 16px;
    width: 100%;
    min-height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.upload-preview-wide span {
    font-size: 12px;
    opacity: 0.7;
}

.upload-card.has-image .upload-preview-wide {
    min-height: 120px;
    background-color: rgba(0, 0, 0, 0.3);
}

.upload-card.has-image .upload-preview-wide svg,
.upload-card.has-image .upload-preview-wide span {
    display: none;
}

.upload-card-text {
    font-size: 14px;
    color: #fff;
}

.upload-card.has-image .upload-card-text {
    color: #fff;
}

.upload-clear-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 2;
}

.upload-clear-btn:hover {
    background: rgba(255, 0, 0, 0.6);
}

.label-optional {
    font-weight: 400;
    color: #fff;
    font-size: 11px;
}

/* Color Presets */
.color-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-preset {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.color-preset:hover {
    transform: scale(1.1);
}

.color-preset.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.color-preset.custom {
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.color-preset.custom input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.color-preset.custom svg {
    pointer-events: none;
}

.settings-footer {
    padding: 16px;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-create {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--theme-color);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-create:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-delete-room {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 10px;
}

.btn-delete-room:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

#solid-mode-options,
#background-mode-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Lounge Content Background */
#lounge-content {
    background: linear-gradient(135deg, #101010 0%, #1c1917 50%, #1c1917 100%);
    position: fixed;
    top: 0;
    left: 225px;
    right: 0;
    bottom: 90px;
    z-index: 1;
}

#lounge-content.has-wallpaper {
    background-size: cover;
    background-position: center;
}

/* Chat stays solid even with wallpaper */
.lounge-chat-area.has-wallpaper {
    background: #101010 !important;
}

/* Side panels use panel color - no transparency */
.lounge-right-panel,
#lounge-display {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Panel separation via shadows - no border lines */
.lounge-right-panel {
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
}

#lounge-display {
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
}

/* Chat Area */
.lounge-chat-area {
    position: fixed;
    top: 0;
    bottom: 90px;
    left: 630px;
    right: 400px;
    display: none;
    flex-direction: column;
    background: #101010;
    background-size: cover;
    background-position: center;
    z-index: 10;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#lounge-content.active .lounge-chat-area {
    display: flex;
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #101010;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-room-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-size: cover;
    background-position: center;
}

.chat-room-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.chat-header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.chat-header-btn.invite-btn {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #fff;
}

.chat-header-btn.invite-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.6);
    color: #fff;
}

.chat-header-btn.leave-btn {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fff;
}

.chat-header-btn.leave-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fff;
}

.chat-header-btn svg {
    flex-shrink: 0;
}

.chat-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Messages Area */
.lounge-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #101010;
}

.lounge-messages::-webkit-scrollbar {
    width: 8px;
}

.lounge-messages::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 4px;
}

.lounge-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.5);
}

/* Message Styling */
.lounge-message {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 4px 24px;
    margin: 0;
    transition: background 0.1s ease;
}

/* First message or new user - add spacing above */
.lounge-message.message-start {
    margin-top: 20px;
    padding-top: 6px;
}

.lounge-message.message-start:first-child {
    margin-top: 0;
}

/* Continuation messages - tighter spacing, no avatar */
/* 24px padding + 48px avatar + 16px gap = 88px */
.lounge-message.message-continuation {
    padding: 2px 24px 2px 88px;
    margin-top: 0;
}

.lounge-message.message-continuation .message-avatar {
    display: none;
}

.lounge-message.message-continuation .message-header {
    display: none;
}

.lounge-message:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Show timestamp on hover for continuation messages */
.lounge-message.message-continuation .message-hover-time {
    display: none;
    font-size: 11px;
    color: #fff;
    position: absolute;
    left: 0;
    width: 64px;
    text-align: right;
    padding-right: 8px;
}

.lounge-message.message-continuation:hover .message-hover-time {
    display: block;
}

.lounge-message.message-continuation .message-body {
    position: relative;
}

.message-avatar {
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: linear-gradient(135deg, #1c1917 0%, #1c1917 100%);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
    align-self: flex-start;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
}

.message-avatar svg {
    width: 18px;
    height: 18px;
}

.message-body {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.message-author {
    font-size: 14px;
    font-weight: 600;
    color: #6ee7b7;
    cursor: pointer;
}

.message-author:hover {
    text-decoration: underline;
}

.message-time {
    font-size: 12px;
    color: #fff;
}

.message-text {
    font-size: 14px;
    color: #fff;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Message Image */
.message-image {
    margin-top: 8px;
    max-width: 400px;
}

.message-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.message-image img:hover {
    opacity: 0.9;
}

/* Message Audio */
.message-audio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.message-audio .audio-filename {
    width: 100%;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.message-audio audio {
    height: 60px;
    width: 400px;
    border-radius: 0;
    filter: invert(1);
    border: 1px solid #15a7f3;
    position: relative;
    z-index: 5;
}

.message-audio audio::-webkit-media-controls-enclosure {
    border-radius: 0;
}

.message-audio audio::-webkit-media-controls-timeline {
    border-radius: 0 !important;
    -webkit-appearance: none;
}

.message-audio audio::-webkit-slider-runnable-track {
    border-radius: 0 !important;
}

.message-audio audio::-webkit-slider-thumb {
    border-radius: 0 !important;
}


/* Image Preview Modal */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.image-preview-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-preview-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.image-preview-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Message Actions */
.message-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.lounge-message:hover .message-actions {
    opacity: 1;
}

.msg-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.msg-action:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #fff;
}

.msg-action svg {
    width: 16px;
    height: 16px;
}

/* User Message Actions (Edit/Delete own) */
.message-user-actions {
    position: absolute;
    top: 4px;
    right: 12px;
    display: flex;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.lounge-message:hover .message-user-actions {
    opacity: 1;
    pointer-events: auto;
}

.message-user-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.message-user-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
    color: #fff;
}

/* Message Edited Tag */
.message-edited {
    font-size: 12px;
    color: #10b981;
    margin-left: 6px;
}

/* Message Deleted State */
.message-deleted {
    color: #fff;
    font-style: italic;
    font-size: 14px;
}

.lounge-message.deleted {
    opacity: 0.6;
}

/* Message Reactions */
.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding: 0;
    position: relative;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.reaction-btn.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #fff;
}

.reaction-btn img {
    width: 18px;
    height: 18px;
}

.reaction-count {
    font-size: 13px;
    font-weight: 500;
}

/* Add Reaction & Reply Buttons */
.add-reaction-btn,
.reply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 28px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: #fff;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.15s ease;
}

.download-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #fff;
}

.download-btn svg {
    width: 12px;
    height: 12px;
}

.reply-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #fff;
}

.add-reaction-btn svg,
.reply-btn svg {
    width: 12px;
    height: 12px;
}

/* Reply Preview Bar */
.reply-preview-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid #10b981;
    border-radius: 4px 10px 10px 4px;
    margin-bottom: 12px;
}

.reply-preview-content {
    flex: 1;
    min-width: 0;
}

.reply-preview-label {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 3px;
}

.reply-preview-label span {
    color: #fff;
}

.reply-preview-text {
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-cancel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reply-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Reply Reference in Message */
.message-reply-reference {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(16, 185, 129, 0.05);
    border-left: 2px solid #10b981;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.message-reply-reference:hover {
    background: rgba(16, 185, 129, 0.1);
}

.message-reply-reference svg {
    color: #fff;
    flex-shrink: 0;
}

.reply-author {
    color: #fff;
    font-weight: 600;
}

.reply-text {
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Reaction Picker Popup */
.reaction-picker {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    display: none;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 280px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.reaction-picker.active {
    display: flex;
}

.reaction-picker-item {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reaction-picker-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.reaction-picker-item img {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Edit Input */
.edit-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.edit-input:focus {
    border-color: #fff;
}

.edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.edit-actions button {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.save-edit-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.save-edit-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
}

.cancel-edit-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cancel-edit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 0 6px 12px;
    font-size: 13px;
    color: #fff;
}

.typing-indicator.active {
    display: flex;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #72767d;
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        background: #72767d;
    }
    30% {
        transform: translateY(-4px);
        background: #b9bbbe;
    }
}

.typing-text {
    color: #fff;
    font-size: 13px;
}

.typing-text strong {
    color: #fff;
    font-weight: 600;
}

/* Chat Input Container */
.chat-input-container {
    padding: 0 20px 20px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 8px 5px 15px;
    background: rgba(16, 185, 129, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    width: 100%;
    transition: all 0.2s ease;
}

.chat-input-wrapper:focus-within {
    border-color: rgba(16, 185, 129, 0.5);
}

.chat-input-wrapper input {
    flex: 1;
    padding: 14px 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.chat-input-wrapper input::placeholder {
    color: #fff;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 4px;
}

.upload-btns {
    display: flex;
    align-items: center;
    gap: 2px;
}

.input-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.input-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.input-btn.send-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
}

.input-btn.send-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    color: #fff;
}

/* Right Panel */
.lounge-right-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 400px;
    background: #101010;
    z-index: 50;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    background-size: cover;
    background-position: center;
    border-radius: 0;
    transition: transform 0.3s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

#lounge-content.active .lounge-right-panel {
    display: flex;
}


.right-panel-section {
    padding: 20px;
}

/* Members section should grow to fill available space */
.right-panel-section:has(#room-members-list) {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.right-panel-section:not(:last-child) {
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

/* Room Info Section */
.room-info-section {
    padding: 20px;
}

.room-info-name {
    display: none;
}

.room-info-description {
    margin: 0;
    font-size: 13px;
    color: #fff;
    line-height: 1.4;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-transform: capitalize;
    letter-spacing: 0;
}

.section-header svg {
    color: #fff;
}

.member-count {
    margin-left: auto;
    font-weight: 500;
    color: #fff;
}

/* Rules List */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 8px;
    font-size: 13px;
    color: #fff;
    line-height: 1.4;
}

.rule-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* Members List */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

#room-members-list {
    flex: 1;
    min-height: 0;
}

.members-list::-webkit-scrollbar {
    width: 4px;
}

.members-list::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 2px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.member-item:hover {
    background: rgba(16, 185, 129, 0.08);
}

.member-avatar {
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: linear-gradient(135deg, #1c1917 0%, #1c1917 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
}

.member-avatar svg {
    width: 24px;
    height: 24px;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.member-avatar.online::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    background: #22c55e;
    border: 2px solid #101010;
    border-radius: 50%;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.member-name {
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #fff;
}

.member-status {
    font-size: 12px;
    color: #fff;
}

/* Left Panel */
#lounge-display {
    background: #101010;
    background-size: cover;
    background-position: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* Hide profile-right-panel when lounge is active */
body.lounge-active .profile-right-panel {
    display: none !important;
}

/* Room Guidelines Modal */
#room-guidelines-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#room-guidelines-modal .modal-content {
    background: #101010;
    border-radius: 8px;
    width: 520px;
    max-width: 90%;
    opacity: 1;
    transform: scale(1);
}

#room-guidelines-modal .modal-header {
    padding: 24px 24px 0;
    border: none;
}

#room-guidelines-modal .modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

#room-guidelines-modal .modal-body {
    padding: 20px 24px;
}

#room-guidelines-modal .guidelines-scroll-box {
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 16px;
}

#room-guidelines-modal .guidelines-scroll-box::-webkit-scrollbar {
    width: 6px;
}

#room-guidelines-modal .guidelines-scroll-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

#room-guidelines-modal .guidelines-scroll-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

#room-guidelines-modal .guidelines-scroll-box::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

#room-guidelines-modal .guidelines-section-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

#room-guidelines-modal .guidelines-section-title:not(:first-child) {
    margin-top: 20px;
}

#room-guidelines-modal .guidelines-list {
    margin: 0 0 8px;
    padding: 0 0 0 20px;
    list-style: disc;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#room-guidelines-modal .guidelines-list li {
    padding: 0;
    font-size: 13px;
    color: #fff;
    line-height: 1.5;
}

#room-guidelines-modal .guidelines-list li::marker {
    color: #fff;
}

#room-guidelines-modal .guidelines-text {
    margin: 0;
    font-size: 13px;
    color: #fff;
    line-height: 1.5;
}

#room-guidelines-modal .guidelines-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
}

#room-guidelines-modal .guidelines-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #fff;
    cursor: pointer;
}

#room-guidelines-modal .guidelines-checkbox-label span {
    user-select: none;
}

#room-guidelines-modal .modal-btn.agree.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#room-guidelines-modal .modal-footer {
    padding: 20px 24px 24px;
    border: none;
    display: flex;
    gap: 12px;
}

#room-guidelines-modal .modal-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

#room-guidelines-modal .modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

#room-guidelines-modal .modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

#room-guidelines-modal .modal-btn.agree {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

#room-guidelines-modal .modal-btn.agree:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
}

/* Name Change Confirmation Modal */
#name-change-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#name-change-modal .modal-content {
    background: #101010;
    border-radius: 8px;
    width: 420px;
    max-width: 90%;
}

#name-change-modal .modal-header {
    padding: 24px 24px 0;
    border: none;
}

#name-change-modal .modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

#name-change-modal .modal-body {
    padding: 20px 24px;
}

#name-change-modal .name-change-warning {
    margin: 0 0 20px;
    font-size: 14px;
    color: #fff;
    line-height: 1.5;
}

#name-change-modal .name-change-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
}

#name-change-modal .name-change-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #fff;
    cursor: pointer;
}

#name-change-modal .name-change-checkbox-label span {
    user-select: none;
}

#name-change-modal .modal-footer {
    padding: 20px 24px 24px;
    border: none;
    display: flex;
    gap: 12px;
}

#name-change-modal .modal-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#name-change-modal .modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

#name-change-modal .modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

#name-change-modal .modal-btn.agree {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

#name-change-modal .modal-btn.agree:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
}

#name-change-modal .modal-btn.agree.disabled {
    background: #101010;
    color: #fff;
    cursor: not-allowed;
}

/* Leave Room Confirmation Modal */
#leave-room-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#leave-room-modal .modal-content {
    background: #101010;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    opacity: 1;
    transform: none;
}

#leave-room-modal .modal-header {
    padding: 24px 24px 0;
    border: none;
}

#leave-room-modal .modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

#leave-room-modal .modal-body {
    padding: 20px 24px;
}

#leave-room-modal .leave-room-message {
    margin: 0;
    font-size: 14px;
    color: #fff;
    line-height: 1.5;
}

#leave-room-modal .modal-footer {
    padding: 20px 24px 24px;
    border: none;
    display: flex;
    gap: 12px;
}

#leave-room-modal .modal-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#leave-room-modal .modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

#leave-room-modal .modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

#leave-room-modal .modal-btn.leave {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fff;
}

#leave-room-modal .modal-btn.leave:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fff;
}

/* Profile Message Modal */
#profile-message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#profile-message-modal .profile-message-modal {
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    opacity: 1;
    transform: scale(1);
}

#profile-message-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#profile-message-modal .modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

#profile-message-modal .modal-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#profile-message-modal .modal-close-btn:hover {
    color: #fff;
}

#profile-message-modal .modal-body {
    padding: 20px;
}

#profile-message-modal #profile-message-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
}

#profile-message-modal #profile-message-input:focus {
    outline: none;
    border-color: #fff;
}

#profile-message-modal #profile-message-input::placeholder {
    color: #fff;
}

#profile-message-modal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#profile-message-modal .modal-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: #fff;
}

#profile-message-modal .modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#profile-message-modal .modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

#profile-message-modal .modal-btn.confirm {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

#profile-message-modal .modal-btn.confirm:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.6);
}

/* Message Sent Confirmation Modal */
#message-sent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

#message-sent-modal .message-sent-modal {
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 300px;
    max-width: 90vw;
    text-align: center;
    opacity: 1;
    transform: scale(1);
}

#message-sent-modal .modal-body {
    padding: 24px 20px;
}

#message-sent-modal .message-sent-text {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#message-sent-modal .message-sent-check {
    color: #fff;
}

#message-sent-modal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#message-sent-modal .modal-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    transition: background 0.15s ease;
}

#message-sent-modal .modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#message-sent-modal .modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

#message-sent-modal .modal-btn.confirm {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

#message-sent-modal .modal-btn.confirm:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.6);
}

/* Moderation Modal */
#moderation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

#moderation-modal .modal-content {
    background: #101010;
    border-radius: 8px;
    width: 360px;
    max-width: 90%;
    opacity: 1;
    transform: scale(1);
}

#moderation-modal .modal-body {
    padding: 24px;
}

#moderation-modal .moderation-message {
    margin: 0;
    font-size: 15px;
    color: #fff;
    text-align: center;
    line-height: 1.5;
}

#moderation-modal .modal-footer {
    padding: 16px 24px 24px;
    border: none;
    display: flex;
    gap: 12px;
}

#moderation-modal .modal-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

#moderation-modal .modal-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

#moderation-modal .modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

#moderation-modal .modal-btn.confirm {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

#moderation-modal .modal-btn.confirm:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
}

/* Banned Popup Modal */
.banned-popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.banned-popup-content {
    background: #101010;
    border-radius: 12px;
    padding: 40px;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.banned-popup-icon {
    color: #fff;
    margin-bottom: 20px;
}

.banned-popup-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
}

.banned-popup-message {
    margin: 0 0 28px;
    font-size: 15px;
    color: #fff;
    line-height: 1.5;
}

.banned-popup-btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.banned-popup-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    transform: translateY(-1px);
}

/* Invite Modal */
.invite-modal {
    width: 400px;
    max-width: 90%;
}

.invite-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.invite-modal .modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s ease;
}

.modal-close-btn:hover {
    color: #fff;
}

.invite-modal .modal-body {
    padding: 24px;
}

.invite-intro,
.join-intro {
    margin: 0 0 12px;
    font-size: 14px;
    color: #fff;
}

.invite-code-container,
.join-code-container {
    display: flex;
    gap: 8px;
}

.invite-code-container input,
.join-code-container input {
    flex: 1;
    padding: 12px 16px;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: monospace;
    letter-spacing: 1px;
}

.invite-code-container input:focus,
.join-code-container input:focus {
    outline: none;
    border-color: var(--theme-color);
}

.copy-invite-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy-invite-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.copy-invite-btn.copied {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

.invite-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: #fff;
}

.invite-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #fff;
    font-size: 12px;
}

.invite-divider::before,
.invite-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.invite-divider span {
    padding: 0 12px;
}

.join-code-container .join-room-btn {
    padding: 12px 20px;
    background: rgba(16, 185, 129, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.join-code-container .join-room-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.join-error {
    margin: 12px 0 0;
    font-size: 13px;
    color: #fff;
}

/* Message Moderation Buttons */
.message-mod-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.message-mod-btn {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 5px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.message-mod-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.message-mod-btn svg {
    width: 12px;
    height: 12px;
}

/* Emoji Picker */
.input-actions {
    position: relative;
}

.emoji-picker {
    position: absolute;
    bottom: 50px;
    right: 0;
    width: 320px;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 100;
    overflow: hidden;
}

.emoji-picker-header {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.emoji-picker-grid::-webkit-scrollbar {
    width: 6px;
}

.emoji-picker-grid::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 3px;
}

.emoji-item {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Chat Emojis in messages */
.chat-emoji {
    width: 84px;
    height: 84px;
    vertical-align: middle;
    margin: 4px 2px;
}

/* Comment input emoji actions */
.comment-input-actions {
    position: relative;
    display: flex;
    align-items: center;
}

.comment-input-actions .emoji-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.comment-input-actions .emoji-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.comment-input-actions .emoji-picker {
    left: 0;
    right: auto;
}

/* DM input emoji actions */
.dm-input-actions {
    position: relative;
    display: flex;
    align-items: center;
}

.dm-input-actions .dm-input-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.dm-input-actions .dm-input-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Invite Users Button */
.invite-users-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.invite-users-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.invite-users-btn.hidden {
    display: none;
}

/* User Invite Modal */
#user-invite-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.user-invite-modal {
    width: 400px;
    max-width: 90%;
    max-height: 500px;
    opacity: 1;
    transform: none;
    background: #101010;
    border-radius: 8px;
}

.user-invite-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 16px;
}

.user-invite-search svg {
    color: #fff;
    flex-shrink: 0;
}

.user-invite-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.user-invite-search input::placeholder {
    color: #fff;
}

.user-invite-search:focus-within {
    border-color: var(--theme-color);
}

.user-invite-search:focus-within svg {
    color: var(--theme-color);
}

.user-invite-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-invite-list::-webkit-scrollbar {
    width: 6px;
}

.user-invite-list::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 3px;
}

.user-invite-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.user-invite-item:hover {
    background: rgba(16, 185, 129, 0.08);
}

.user-invite-item.invited {
    opacity: 0.6;
}

.user-invite-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #eb459e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    flex-shrink: 0;
}

.user-invite-avatar svg {
    width: 18px;
    height: 18px;
}

.user-invite-avatar.online::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid #101010;
    border-radius: 50%;
}

.user-invite-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-invite-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.user-invite-status {
    font-size: 12px;
    color: #fff;
}

.user-invite-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.user-invite-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.user-invite-btn.cancel {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    cursor: pointer;
}

.user-invite-btn.cancel:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

.user-invite-empty {
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    font-size: 14px;
}

/* Room Invite Notification */
.notification-icon.invite {
    background: rgba(88, 101, 242, 0.15);
    color: #fff;
}

.invite-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.invite-accept-btn,
.invite-decline-btn {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.invite-accept-btn {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #fff;
}

.invite-accept-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.invite-decline-btn {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fff;
}

.invite-decline-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
}

.invite-response {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 5px;
}

.invite-response.accepted {
    background: rgba(59, 165, 92, 0.15);
    color: #fff;
}

.invite-response.declined {
    background: rgba(237, 66, 69, 0.15);
    color: #fff;
}

/* Media Preview in Chat Input */
.media-preview {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.media-preview-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-preview-content img {
    max-width: 80px;
    max-height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.media-preview-content.audio {
    padding: 10px 14px;
    gap: 8px;
    color: #fff;
}

.media-preview-content.audio svg {
    color: #fff;
}

.media-preview-name {
    font-size: 13px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.media-preview-remove:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #fff;
    transform: scale(1.1);
}

.media-preview-remove svg {
    width: 12px;
    height: 12px;
}

/* ===== SHARE TO ROOM MODAL ===== */
.share-modal-content {
    width: 480px;
    max-width: 95%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.share-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.share-item-preview {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
}

.share-item-preview .item-card {
    margin: 0;
    pointer-events: none;
}

.share-item-preview .mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-item-preview .shared-item-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.share-item-preview .shared-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-item-preview .shared-item-cover svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.share-item-preview .shared-item-info {
    flex: 1;
    min-width: 0;
}

.share-item-preview .shared-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-item-preview .shared-item-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.share-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.share-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.share-room-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.share-room-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.share-room-item.selected {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.share-room-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.share-room-info {
    flex: 1;
    min-width: 0;
}

.share-room-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-room-members {
    font-size: 12px;
    color: #fff;
}

.share-room-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.share-room-item.selected .share-room-check {
    background: #fff;
    border-color: #fff;
}

.share-room-item.selected .share-room-check svg {
    stroke: #101010;
}

/* Share Modal Tabs */
.share-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.share-tab {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.share-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.share-tab.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #fff;
}

.share-tab-content {
    min-height: 120px;
}

.share-tab-content.hidden {
    display: none;
}

/* Share DM List */
.share-dm-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.share-dm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.share-dm-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.share-dm-item.selected {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.share-dm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.share-dm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-dm-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.share-dm-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.share-dm-item.selected .share-dm-check {
    background: #fff;
    border-color: #fff;
}

.share-dm-item.selected .share-dm-check svg {
    stroke: #101010;
}

.share-comment-section {
    display: flex;
    flex-direction: column;
}

.share-comment-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 14px;
    resize: none;
    min-height: 80px;
    font-family: inherit;
    transition: all 0.15s ease;
}

.share-comment-input:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.share-comment-input::placeholder {
    color: #fff;
}

.share-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.share-submit-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
}

.share-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.share-empty-rooms {
    text-align: center;
    padding: 24px;
    color: #fff;
    font-size: 14px;
}

/* Shared item in room chat */
.shared-item-message {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.shared-item-message .mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.shared-item-message .mini-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin: -8px;
    padding: 8px;
}

.shared-item-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.shared-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shared-item-cover svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.shared-item-info {
    flex: 1;
    min-width: 0;
}

.shared-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shared-item-meta {
    font-size: 12px;
    color: #fff;
}

.shared-item-uploader {
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.shared-item-uploader:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.shared-item-play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.shared-item-play:hover {
    background: rgba(255, 255, 255, 0.2);
}

.shared-item-play svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

/* ===== @MENTION AUTOCOMPLETE ===== */
.mention-autocomplete {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    margin-bottom: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.mention-autocomplete.show {
    display: block;
}

.mention-autocomplete-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mention-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mention-autocomplete-item:hover,
.mention-autocomplete-item.highlighted {
    background: rgba(255, 255, 255, 0.1);
}

.mention-autocomplete-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mention-autocomplete-avatar svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.mention-autocomplete-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.mention-autocomplete-status {
    font-size: 12px;
    color: #fff;
    margin-left: auto;
}

.mention-autocomplete-status.online {
    color: #fff;
}

.mention-autocomplete-empty {
    padding: 12px;
    text-align: center;
    color: #fff;
    font-size: 13px;
}

/* ===== MENTION BADGE ===== */
.mention-badge {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.mention-badge.show {
    display: flex;
}

.mention-badge:hover {
    background: rgba(255, 59, 48, 0.3);
}

.mention-badge-icon {
    width: 16px;
    height: 16px;
    color: #fff;
}

.mention-badge-count {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* ===== MENTION HIGHLIGHT IN MESSAGES ===== */
.mention-highlight {
    background: rgba(16, 185, 129, 0.1);
    color: #fff;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.mention-highlight:hover {
    background: rgba(16, 185, 129, 0.15);
}

.mention-highlight.mention-self {
    background: rgba(16, 185, 129, 0.1);
    color: #fff;
}

.mention-highlight.mention-self:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #fff;
}

/* Message with mention - subtle highlight */
.lounge-message.has-mention {
    background: rgba(16, 185, 129, 0.03);
    border-left: 2px solid #10b981;
    margin-left: -2px;
}

/* Clickable usernames in lounge */
.lounge-clickable-user {
    color: #6ee7b7;
    cursor: pointer;
    transition: color 0.15s ease;
}

.lounge-clickable-user:hover {
    color: #34d399;
    text-decoration: underline;
}

/* Also style shared item uploaders */
.shared-item-uploader {
    color: #34d399;
    cursor: pointer;
    transition: color 0.15s ease;
}

.shared-item-uploader:hover {
    color: #34d399;
    text-decoration: underline;
}

/* ===== GUEST MODE - Hide input bars for non-logged-in users ===== */
body.guest-mode .lounge-input-area {
    display: none !important;
}

body.guest-mode .dm-input-container {
    display: none !important;
}

body.guest-mode #dm-input-area {
    display: none !important;
}

body.guest-mode .lounge-composer {
    display: none !important;
}

/* Hide My Rooms section for guests - only show Community Rooms */
body.guest-mode .my-rooms-tabs {
    display: none !important;
}

body.guest-mode #my-rooms-list {
    display: none !important;
}

body.guest-mode .lounge-section-header {
    display: none !important;
}

/* ===== Lounge Intro Splash Modal ===== */
.lounge-intro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: none;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lounge-intro-content {
    background: linear-gradient(145deg, #141414 0%, #0a0a0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lounge-intro-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.lounge-intro-pepe {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.lounge-intro-brand {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 0.5px;
}

.lounge-intro-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
}

.lounge-intro-body {
    text-align: left;
    margin-bottom: 20px;
}

.lounge-intro-body p {
    color: #a0a0a0;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.lounge-intro-body p:last-child {
    margin-bottom: 0;
}

.lounge-intro-notice {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    margin-bottom: 24px;
}

.lounge-intro-notice strong {
    color: #ef4444;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.lounge-intro-notice p {
    color: #a0a0a0;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.lounge-intro-btn {
    background: linear-gradient(135deg, #10b981 0%, #10b981 100%);
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.lounge-intro-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

