/* ChillSpace - Modern 2025 Glassy Red/Purple Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --bg-dark: #1a1a2e;
    --bg-darker: #0f0f1e;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f5576c 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    padding-bottom: 70px;
}

#nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 20px;
}

#nav button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#nav button:hover {
    color: var(--text);
}

#nav button.active {
    color: var(--primary);
}

#nav button span {
    font-size: 10px;
    font-weight: 500;
}

#nav .icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, #f5576c, #f093fb);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.5);
    border: 2px solid var(--bg-primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.nav-green-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #00ff88;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.8);
    animation: pulse 2s ease-in-out infinite;
    z-index: 10;
}

#nav .avatar-sm {
    width: 40px;
    height: 40px;
    border: 2px solid var(--glass-border);
}

.avatar-sm {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--glass-border);
}

.avatar-md {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--glass-border);
}

/* Auth Views */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: rgba(26, 26, 46, 0.4);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 48px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-card.register-card {
    max-width: 550px;
}

.rules-section {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.rules-section h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    text-align: center;
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rule-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 12px;
    border-left: 3px solid rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-left-color: rgba(102, 126, 234, 0.6);
}

.rule-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.rule-text {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.rule-text strong {
    color: #fff;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    background: var(--secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.tagline {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-card input,
.auth-card textarea {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 16px;
    transition: all 0.3s ease;
}

.auth-card input:focus,
.auth-card textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.auth-card label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 10px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input {
    width: auto;
}

.btn-primary {
    background: var(--secondary);
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #ff6b7e;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 24px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 12px 24px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.6);
}

.btn-warning {
    background: transparent;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 10px;
    padding: 8px 16px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.6);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.btn-icon.active {
    color: #f5576c;
}

.switch-auth {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.switch-auth a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

/* Feed View */
.feed-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.composer {
    background: transparent;
    border: none;
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.composer-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.5);
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.composer-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.composer-dropdown {
    background: rgba(20, 20, 35, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideUp 0.3s ease;
}

.composer-dropdown textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 12px;
}

.composer-dropdown textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
}

.composer-dropdown input[type="file"] {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.composer-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border: none;
    color: #fff;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post {
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    overflow: visible;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.post:last-child {
    border-bottom: none;
}

.post-header {
    padding: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.btn-delete {
    position: absolute;
    right: 0;
    top: 0;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: all 0.2s;
}

.btn-delete:hover {
    color: #ef4444;
    opacity: 1;
    background: rgba(239, 68, 68, 0.1);
}

.post-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
}

.username:hover {
    text-decoration: underline;
}

.timestamp {
    font-size: 13px;
    color: var(--text-secondary);
}

.post-body {
    padding: 0 0 16px 0;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 15px;
}

.post-media {
    width: 100%;
    max-height: 800px;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.2);
}

.post-media[src$=".mp4"],
.post-media[src$=".webm"],
video.post-media {
    object-fit: contain;
}

.post-actions {
    padding: 0;
    display: flex;
    gap: 24px;
    border-top: none;
}

/* Chat View */
.chat-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - 70px);
}

.room-list {
    background: rgba(26, 26, 46, 0.4);
    backdrop-filter: blur(40px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
    height: 100%;
}

.room-list.hidden {
    display: none;
}

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

.create-room-form {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.create-room-form input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.create-room-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.file-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.file-upload-btn .icon {
    width: 16px;
    height: 16px;
}

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

.form-actions button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}

.rooms {
    display: flex;
    flex-direction: column;
}

.room {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    border-left: 3px solid transparent;
}

.room:hover {
    background: rgba(255, 255, 255, 0.03);
}

.room.active {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #f5576c;
}

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

.room-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.room-last {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-main {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-header {
    padding: 16px 20px;
    flex-shrink: 0;
    background: rgba(26, 26, 46, 0.4);
    backdrop-filter: blur(40px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.btn-back .icon {
    width: 20px;
    height: 20px;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.room-members-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    max-width: 200px;
    padding: 4px;
    scrollbar-width: none;
}

.room-members-scroll::-webkit-scrollbar {
    display: none;
}

.avatar-xs {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-xs:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.btn-call {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-room {
    padding: 10px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-room:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.4);
    transform: scale(1.05);
}

.btn-delete-room .icon {
    width: 18px;
    height: 18px;
    color: #ff3b30;
}

.btn-call:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-call.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-call .icon {
    width: 20px;
    height: 20px;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.messages::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
}

.message.own {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-avatar:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 70%;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-author {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.message-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.btn-msg-delete {
    background: none;
    border: none;
    color: rgba(239, 68, 68, 0.6);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    margin-left: auto;
    opacity: 0;
    transition: all 0.2s ease;
}

.message:hover .btn-msg-delete {
    opacity: 1;
}

.btn-msg-delete:hover {
    color: #ef4444;
    transform: scale(1.2);
}

.message-text {
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.message.own .message-text {
    color: white;
}

.message-media {
    margin-top: 4px;
}

.message-image, .message-video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-composer {
    padding: 16px 20px;
    background: rgba(26, 26, 46, 0.4);
    backdrop-filter: blur(40px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.message-composer label.btn-icon {
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.message-composer label.btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
}

.message-composer label.btn-icon .icon {
    width: 20px;
    height: 20px;
}

.message-composer input[type="text"] {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 12px 20px;
    color: var(--text);
    font-size: 14px;
}

.message-composer input[type="text"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.message-composer button.btn-icon {
    padding: 10px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-composer button.btn-icon:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.message-composer button.btn-icon .icon {
    width: 20px;
    height: 20px;
}

/* Profile View */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.profile-header {
    background: transparent;
    margin-bottom: 24px;
}

.profile-banner {
    width: 100%;
    height: 240px;
    background-size: cover;
    background-position: center;
    border-radius: 0;
}

.profile-banner-placeholder {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
}

.profile-info {
    padding: 0 24px;
    margin-top: -60px;
    position: relative;
}

.profile-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(10, 10, 20, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.profile-details {
    margin-top: 16px;
    margin-bottom: 20px;
}

.profile-username {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.profile-display-name {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 12px 0;
}

.profile-bio {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.profile-stats {
    display: flex;
    gap: 32px;
    margin: 16px 0;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.stat.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.stat.clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat.clickable.active {
    background: rgba(239, 68, 68, 0.2);
}

.stat.clickable.active .stat-number {
    color: #ef4444;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0 24px 24px 24px;
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 16px 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: #8b5cf6;
}

.profile-tab-content {
    padding: 0 24px;
}

.comment-card {
    background: rgba(20, 20, 35, 0.6);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.comment-context {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.comment-context a {
    color: #8b5cf6;
    text-decoration: none;
}

.comment-context a:hover {
    text-decoration: underline;
}

/* Profile Comments (Guestbook-style) */
.profile-comment-composer {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.profile-comment-composer textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 15px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.profile-comment-composer textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.profile-comment-composer button {
    margin-top: 12px;
}

.profile-comment-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.profile-comment-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.profile-comment-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.profile-comment-author {
    flex: 1;
}

.profile-comment-author h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.profile-comment-author h4:hover {
    color: rgba(102, 126, 234, 1);
}

.profile-comment-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-comment-body {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.profile-comment-delete {
    background: rgba(239, 68, 68, 0.2);
    border: none;
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-comment-delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

.error-state {
    text-align: center;
    padding: 60px 24px;
}

.error-state h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.error-state p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

/* Friends View */
.friends-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.friends-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.friends-header h1 {
    margin: 0;
}

.friends-header .search-input {
    width: 100%;
    max-width: 400px;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.user-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-card-banner {
    width: 100%;
    height: 60px;
    background-size: cover;
    background-position: center;
    background-color: rgba(102, 126, 234, 0.3);
}

.user-card-content {
    padding: 12px 16px 16px;
    position: relative;
    margin-top: -25px;
}

.user-card-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    cursor: pointer;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.user-card-avatar:hover {
    transform: scale(1.1);
}

.user-card-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-name:hover {
    text-decoration: underline;
}

.user-card-bio {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.3;
    min-height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.user-card-actions {
    display: flex;
    gap: 6px;
}

.user-card-actions button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    font-size: 13px;
}

.user-card-actions button .icon {
    width: 16px;
    height: 16px;
}

.user-card-self {
    padding: 6px;
    text-align: center;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

/* Friends Tab (Profile Page) */
.friends-section {
    margin-bottom: 32px;
}

.friends-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text);
}

.friend-request-card,
.friend-list-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.friend-request-card:hover,
.friend-list-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.friend-request-card .avatar-md,
.friend-list-card .avatar-md {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.friend-request-card .avatar-md:hover,
.friend-list-card .avatar-md:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.friend-request-info,
.friend-list-info {
    flex: 1;
    min-width: 0;
}

.friend-request-info h4,
.friend-list-info h4 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.friend-request-info h4:hover,
.friend-list-info h4:hover {
    color: rgba(102, 126, 234, 1);
}

.friend-request-info p,
.friend-list-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-request-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.friend-request-actions button {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.friend-request-actions button:first-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.friend-request-actions button:first-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.friend-request-actions button:last-child {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.friend-request-actions button:last-child:hover {
    background: rgba(255, 255, 255, 0.2);
}

.friend-list-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.friend-list-actions button {
    width: 40px;
    height: 40px;
}

/* Notifications */
.notif-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f5576c, #f093fb);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    min-width: 20px;
    text-align: center;
}

.notifications-list {
    padding: 20px;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 5px 0;
    color: var(--text);
    font-size: 14px;
}

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
}

.notification-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.friend-list-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.friend-list-actions button svg {
    width: 20px;
    height: 20px;
    stroke: var(--text);
}

.friends-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
}

.friend-card {
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.friend-info h3 {
    margin-bottom: 4px;
    cursor: pointer;
}

.friend-info h3:hover {
    text-decoration: underline;
}

.friend-info p {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* Settings View */
.settings-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.settings-container h1 {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-section {
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0 0 32px 0;
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h2 {
    font-size: 18px;
    margin-bottom: 20px;
}

.settings-section form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-section input,
.settings-section textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text);
    font-family: inherit;
}

.settings-section input:focus,
.settings-section textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.settings-section textarea {
    resize: vertical;
}

.profile-edit-avatar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(139, 92, 246, 0.3);
}

.banner-preview {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    margin-bottom: 12px;
}

.file-label {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.file-label:hover {
    background: rgba(139, 92, 246, 0.3);
}

.file-label input[type="file"] {
    display: none;
}

.settings-section label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
}

.settings-section.danger {
    border-color: rgba(239, 68, 68, 0.2);
}

/* Admin View */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-container h1 {
    margin-bottom: 24px;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.admin-tab-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-tab-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.admin-tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: var(--accent);
}

.admin-tab-content {
    animation: fadeIn 0.3s ease;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(255, 0, 100, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.admin-section {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.admin-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.admin-section input {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    margin-bottom: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.activity-content {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.activity-target {
    background: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.activity-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    white-space: nowrap;
}

.reports-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.report-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.report-reporter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-reason {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.report-body {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.report-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.report-status-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.audit-log-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.audit-log-icon {
    font-size: 1.5rem;
}

.audit-log-content {
    flex: 1;
}

.audit-log-header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.audit-log-action {
    color: var(--accent);
}

.audit-log-target {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.audit-log-details {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-family: monospace;
}

.audit-log-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    white-space: nowrap;
}

.admin-user-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 10px;
}

.admin-user-card .user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-user-card .username {
    font-weight: 600;
    font-size: 1rem;
}

.admin-user-card .user-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-user-card .user-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    background: var(--glass);
    border-radius: 12px;
    width: fit-content;
}

.admin-user-card .admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #6366f1;
    color: white;
}

.btn-secondary:hover {
    background: #4f46e5;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}

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

.modal-content {
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.2s ease;
}

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

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

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.btn-close:hover {
    background: transparent;
    color: var(--text);
    transform: scale(1.1);
}

.modal form {
    padding: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal textarea {
    background: rgba(255, 255, 255, 0.02);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding: 16px 0;
    color: var(--text);
    resize: vertical;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    min-height: 140px;
    transition: all 0.2s;
}

.modal textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.4;
}

.modal textarea:focus {
    outline: none;
    border-bottom-color: var(--secondary);
    background: transparent;
}

.modal input[type="file"] {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 16px 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.modal input[type="file"]:hover {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-actions .btn-primary {
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    background: var(--secondary);
    border: none;
    border-radius: 24px;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.modal-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(245, 87, 108, 0.4);
    background: #ff6b7e;
}

.modal-actions .btn-secondary {
    padding: 14px 28px;
    font-size: 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.modal-actions .btn-secondary:hover {
    background: transparent;
    color: var(--text);
}

/* Utilities */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--danger);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr;
    }
    
    .room-list {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 70px;
        z-index: 100;
        height: calc(100vh - 70px);
    }
    
    .room-list.hidden {
        display: none;
    }
    
    .friends-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 100%;
    }
}

/* ============= MODAL SYSTEM ============= */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

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

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

/* Comments Dropdown */
.comments-dropdown {
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: slideUp 0.3s ease;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
}

.no-comments {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 16px;
    font-size: 13px;
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.comment:hover {
    background: rgba(255, 255, 255, 0.04);
}

.comment:last-child {
    margin-bottom: 0;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.comment-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

.comment-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.75);
}

.comment-form {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.comment-form textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    color: #fff;
    font-size: 13px;
    resize: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(255, 255, 255, 0.06);
}

.btn-send {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(236, 72, 153, 0.8));
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.btn-send:hover {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    transform: translateY(-1px);
}

/* Confirm Dialog */
.confirm-dialog {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(40px);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.confirm-dialog p {
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-confirm-cancel, .btn-confirm-yes {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

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

.btn-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-confirm-yes {
    background: #ef4444;
    color: #fff;
}

.btn-confirm-yes:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Settings Grid Layout */
.settings-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-col h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.95);
}

.image-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-preview {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.upload-preview.avatar-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid rgba(139, 92, 246, 0.4);
}

.upload-preview.banner-rect {
    height: 140px;
    border: 2px dashed rgba(139, 92, 246, 0.3);
}

.upload-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.upload-btn {
    padding: 10px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: rgba(139, 92, 246, 0.3);
}

.settings-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-actions button {
    flex: 1;
    padding: 14px;
    font-size: 15px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(40px);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 2000;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* ============================================
   UPDATED CHAT LAYOUT - SMALLER SIDEBAR WITH TABS
   ============================================ */

.chat-container {
    display: grid !important;
    grid-template-columns: 220px 1fr !important;
}

.chat-sidebar {
    background: rgba(26, 26, 46, 0.4);
    backdrop-filter: blur(40px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
}

.chat-sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn .icon {
    width: 20px;
    height: 20px;
}

.tab-btn span {
    font-size: 11px;
    font-weight: 600;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(245, 87, 108, 0.05);
}

.chat-list-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.chat-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.chat-list.active {
    display: flex;
}

.chat-items {
    display: flex;
    flex-direction: column;
}

.chat-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
    background: rgba(245, 87, 108, 0.1);
    border-left-color: var(--primary);
}

.chat-item-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

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

.chat-item-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-preview {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.create-room-section {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-create-room {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.1), rgba(240, 147, 251, 0.1));
    border: 1px solid rgba(245, 87, 108, 0.3);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-create-room:hover {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.2), rgba(240, 147, 251, 0.2));
    transform: translateY(-1px);
}

.btn-create-room .icon {
    width: 16px;
    height: 16px;
}

.create-room-form input[type="text"] {
    padding: 8px 12px !important;
    font-size: 13px !important;
    margin-bottom: 0 !important;
}

.icon-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-upload-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.icon-upload-btn .icon {
    width: 16px;
    height: 16px;
}

.form-btns {
    display: flex;
    gap: 6px;
}

.form-btns button {
    flex: 1;
    padding: 6px;
    font-size: 14px;
    border-radius: 6px;
}

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

.chat-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
}

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

.chat-title {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.btn-delete-conversation {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.btn-delete-conversation svg {
    width: 16px !important;
    height: 16px !important;
}

.btn-delete-conversation:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    transform: translateY(-1px) !important;
}

.btn-delete-comment {
    background: transparent !important;
    border: none !important;
    color: rgba(239, 68, 68, 0.7) !important;
    cursor: pointer !important;
    font-size: 20px !important;
    line-height: 1 !important;
    padding: 0 4px !important;
    margin-left: auto !important;
    transition: all 0.2s ease !important;
}

.btn-delete-comment:hover {
    color: #ef4444 !important;
    transform: scale(1.2) !important;
}

.call-members {
    display: flex;
    align-items: center;
}

.call-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(26, 26, 46, 0.4);
    margin-left: -10px;
    transition: all 0.2s ease;
    position: relative;
}

.call-avatar:first-child {
    margin-left: 0;
}

/* Voice activity indicator - Discord-style glow */
.call-avatar.speaking {
    border-color: #43b581;
    box-shadow: 0 0 10px rgba(67, 181, 129, 0.8);
    animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(67, 181, 129, 0.8);
    }
    50% {
        box-shadow: 0 0 20px rgba(67, 181, 129, 1);
    }
}

.call-count {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(245, 87, 108, 0.2);
    border: 2px solid rgba(26, 26, 46, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    margin-left: -8px;
}

.empty-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-chat .icon-lg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.empty-chat p {
    font-size: 15px;
    margin: 0;
}

.btn-send {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.2), rgba(240, 147, 251, 0.2));
    border: 1px solid rgba(245, 87, 108, 0.3);
}

.btn-send:hover {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.3), rgba(240, 147, 251, 0.3));
}

@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr !important;
    }
    
    .chat-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 70px;
        width: 220px;
        z-index: 100;
    }
}

/* ==================== NEW ICON BAR CHAT LAYOUT ==================== */

/* Override old chat container */
.chat-container {
    display: block !important;
    height: calc(100vh - 70px) !important;
    max-height: calc(100vh - 70px) !important;
    background: transparent !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Vertical icon bar - HIDDEN */
.chat-icon-bar {
    display: none !important;
}

.icon-bar-btn {
    display: none !important;
}

.icon-bar-btn .icon {
    width: 20px !important;
    height: 20px !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.icon-bar-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1) !important;
}

.icon-bar-btn.active {
    background: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5) !important;
}

.icon-bar-btn.active .icon {
    color: white !important;
}

/* Chat content area - FULL WIDTH */
.chat-content {
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
    position: relative !important;
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
}

/* Chat views */
.chat-view {
    display: none !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

.chat-view.active {
    display: flex !important;
}

/* View headers */
.chat-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 15px 20px !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
}

.chat-view-header h2 {
    margin: 0 !important;
    color: white !important;
    font-size: 24px !important;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input {
    width: 100% !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 14px !important;
    margin-bottom: 15px !important;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.btn-create {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-create:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4) !important;
}

.btn-create .icon {
    width: 18px !important;
    height: 18px !important;
}

/* Create room inline form */
.create-room-inline {
    margin-top: 15px !important;
    padding: 15px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.create-room-inline input[type="text"] {
    flex: 1 !important;
    min-width: 200px !important;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: white !important;
}

.icon-upload-label {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 10px 15px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    color: white !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
}

.icon-upload-label:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.icon-upload-label .icon {
    width: 16px !important;
    height: 16px !important;
}

.btn-small {
    padding: 10px 15px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.btn-primary {
    background: #667eea !important;
    color: white !important;
}

.btn-primary:hover {
    background: #5568d3 !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Chat items grid */
.chat-items-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 12px !important;
    padding: 15px 20px 80px 20px !important;
    overflow-y: auto !important;
    flex: 1 !important;
    align-content: start !important;
}

/* Hide scrollbar but keep functionality */
.chat-items-grid::-webkit-scrollbar {
    display: none !important;
}

.chat-items-grid {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Chat cards - SMALLER */
.chat-card {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    height: fit-content !important;
    position: relative !important;
}

.chat-card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
}

.chat-card .btn-delete-chat {
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.chat-card .btn-delete-chat:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: #ef4444 !important;
    transform: scale(1.1) !important;
}

.chat-card.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%) !important;
    border-color: #667eea !important;
}

.chat-card-avatar {
    width: 60px !important;
    height: 60px !important;
    border-radius: 14px !important;
    object-fit: cover !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
}

.chat-card-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.chat-card-name {
    font-weight: 600 !important;
    color: white !important;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 14px !important;
}

.chat-card-preview {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* New Streamlined DM List */
.dm-list {
    padding: 0 !important;
}

.dm-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.dm-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dm-item.active {
    background: rgba(102, 126, 234, 0.15);
    border-left: 3px solid #667eea;
}

.dm-unread-dot {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1.2);
    }
}

.dm-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dm-avatar:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.dm-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dm-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-preview {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-delete {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0;
}

.dm-item:hover .dm-delete {
    opacity: 1;
}

.dm-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.dm-delete .icon {
    width: 18px;
    height: 18px;
}

/* Room Controls */
.room-controls {
    padding: 0 20px 15px 20px;
    background: transparent;
}

.room-controls .search-input {
    margin-bottom: 0;
}

.create-room-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.create-room-form input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.btn-icon-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-upload:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon-upload .icon {
    width: 20px;
    height: 20px;
}

/* Room List - Clean & Simple */
.room-list {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.room-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    background: transparent;
}

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

.room-item.active {
    background: linear-gradient(90deg, rgba(245, 87, 108, 0.1), rgba(240, 147, 251, 0.1));
    border-left: 3px solid var(--primary);
}

.room-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.room-item:hover .room-icon {
    transform: scale(1.05);
    border-color: var(--primary);
}

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

.room-delete {
    background: none;
    border: none;
    color: rgba(239, 68, 68, 0.6);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.room-item:hover .room-delete {
    opacity: 1;
}

.room-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: scale(1.1);
}

.room-delete .icon {
    width: 18px;
    height: 18px;
}

/* Friends Dropdown */
.friends-dropdown {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(20, 20, 35, 0.98);
    backdrop-filter: blur(40px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.friends-dropdown-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.btn-close-dropdown {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-close-dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.friends-list-dm {
    padding: 12px;
}

.friend-dm-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.friend-dm-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.friend-dm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.friend-dm-name {
    font-size: 15px;
    font-weight: 500;
    color: white;
}

.btn-friends-toggle {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.4);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-friends-toggle:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.btn-friends-toggle .icon {
    width: 18px;
    height: 18px;
}

/* Empty states */
.empty-state,
.no-items {
    text-align: center !important;
    padding: 40px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 14px !important;
}

/* Chat header in chat view */
#chatView .chat-header {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px 20px !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
}

.btn-back {
    width: 36px !important;
    height: 36px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.btn-back .icon {
    width: 20px !important;
    height: 20px !important;
    color: white !important;
}

#chatHeaderContent {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 !important;
}

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

.chat-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
}

.chat-header-text {
    display: flex !important;
    flex-direction: column !important;
}

.chat-title {
    font-weight: 600 !important;
    color: white !important;
    font-size: 16px !important;
}

.chat-subtitle {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.chat-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chat-items-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Override any old sidebar styles */
.chat-sidebar {
    display: none !important;
}


/* HIDE ALL SCROLLBARS */
body::-webkit-scrollbar,
html::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body,
html,
* {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.chat-container::-webkit-scrollbar,
.chat-content::-webkit-scrollbar,
.chat-view::-webkit-scrollbar {
    display: none !important;
}

.chat-container,
.chat-content,
.chat-view {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* ALLOW SCROLLING BUT HIDE SCROLLBARS */
html, body {
    overflow-x: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
}

#app {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    padding-bottom: 70px;
}

.chat-container {
    overflow: hidden !important;
    max-height: calc(100vh - 70px) !important;
}

/* Call UI */
.call-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.call-videos {
    flex: 1;
    position: relative;
    background: #000;
}

.remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.local-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    object-fit: cover;
    background: #000;
}

.call-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
}

.call-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.call-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.call-btn.muted {
    background: rgba(255, 0, 0, 0.3);
}

.call-btn.disabled {
    background: rgba(100, 100, 100, 0.3);
}

.call-btn.call-end {
    background: linear-gradient(135deg, #ff0066, #ff4444);
}

.call-btn.call-end:hover {
    transform: scale(1.1);
}

.btn-call {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-call:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-call.active {
    background: var(--accent);
}

@media (max-width: 768px) {
    .local-video {
        width: 120px;
        height: 90px;
        bottom: 120px;
        right: 10px;
    }
    
    .call-controls {
        bottom: 20px;
        padding: 15px;
        gap: 15px;
    }
    
    .call-btn {
        width: 50px;
        height: 50px;
    }
}
