@font-face {
    font-family: 'Ethnocentric';
    src: url('/chat/static/Ethnocentric-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gradient-color1: #667eea;
    --gradient-color2: #764ba2;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --message-bg-sent: #667eea;
    --message-bg-received: #ffffff;
    --hover-bg: #f5f7ff;
}

body.dark-theme {
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #404040;
    --message-bg-sent: #667eea;
    --message-bg-received: #2d2d2d;
    --hover-bg: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    padding: 0;
}

/* Auth Screen */
.auth-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.auth-box h1 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.auth-form h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.auth-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 15px;
}

.auth-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Primary button style */
.btn-primary {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.auth-form button:active {
    transform: translateY(0);
}

.auth-switch {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.privacy-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.privacy-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.privacy-checkbox a {
    color: #667eea;
    text-decoration: none;
}

.privacy-checkbox a:hover {
    text-decoration: underline;
}

.privacy-policy {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.privacy-policy:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9em;
}

/* Main Layout */
.main-layout {
    display: flex;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Chat Screen */
.chat-screen {
    width: 100%;
    height: 100vh;
    animation: fadeIn 0.3s ease;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.user-info {
    flex: 1;
}

.current-username {
    font-weight: bold;
    font-size: 1.1em;
}

.user-status {
    font-size: 0.85em;
    opacity: 0.9;
}

.user-status.online::before {
    content: '●';
    color: #4ade80;
    margin-right: 5px;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.icon-btn ion-icon {
    font-size: 24px;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-actions {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.action-btn {
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.action-btn ion-icon {
    font-size: 1.2em;
}

/* Override action-btn styles for report button */
button.report-btn.action-btn,
.message-actions button.report-btn {
    background: none !important;
    border: none !important;
    padding: 4px 8px !important;
    color: #dc3545 !important;
}

button.report-btn.action-btn:hover,
.message-actions button.report-btn:hover {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #c82333 !important;
}

button.report-btn.action-btn ion-icon,
.message-actions button.report-btn ion-icon {
    color: #dc3545 !important;
    font-size: 16px !important;
}

button.report-btn.action-btn:hover ion-icon,
.message-actions button.report-btn:hover ion-icon {
    color: #c82333 !important;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    padding: 2px 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge.hidden {
    display: none;
}

.rooms-list {
    flex: 1;
    overflow-y: auto;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: var(--bg-primary);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--gradient-color1);
    text-decoration: underline;
}

.footer-separator {
    color: var(--text-secondary);
    margin: 0 8px;
    font-size: 0.85em;
}

.room-item {
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.room-item:hover {
    background: var(--hover-bg);
}

.room-item.active {
    background: var(--bg-secondary);
    border-left: 4px solid #667eea;
    padding-left: 11px;
}

.room-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
    position: relative;
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-dot.online {
    background: #4ade80;
}

.room-info {
    flex: 1;
    min-width: 0;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.room-name {
    font-weight: bold;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-time {
    font-size: 0.8em;
    color: #999;
}

.room-preview {
    font-size: 0.9em;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-badge {
    background: #667eea;
    color: white;
    font-size: 0.75em;
    padding: 4px 9px;
    border-radius: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.no-chat-selected {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
}

.empty-state h2 {
    font-size: 4em;
    margin-bottom: 10px;
}

.active-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    height: 85px;
    box-sizing: border-box;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn-mobile {
    display: none;
}

.chat-info h3 {
    margin-bottom: 5px;
    font-size: 1.3em;
}

.chat-status {
    font-size: 0.9em;
    opacity: 0.9;
}

.chat-status.online {
    color: #4ade80;
}

.chat-status.online::before {
    content: '● ';
}

.chat-status.offline {
    color: #999;
}

.chat-status.offline::before {
    content: '○ ';
}

/* Messages Area */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-secondary);
    min-height: 0;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
}

.message.own {
    flex-direction: row-reverse;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message.own .message-bubble {
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message:not(.own) .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    border: 1px solid #f0f0f0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.85em;
}

.verified-badge {
    color: #1d9bf0;
    font-weight: 700;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-badge {
    color: #ff9800;
    font-weight: 700;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: help;
    position: relative;
}

.admin-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
}

.admin-badge:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

.mod-badge {
    color: #4caf50;
    font-weight: 700;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: help;
    position: relative;
}

.mod-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
}

.mod-badge:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

.verified-badge {
    cursor: help;
    position: relative;
}

.verified-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
}

.verified-badge:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

.message.own .message-header {
    flex-direction: row-reverse;
}

.username {
    font-weight: bold;
    color: #667eea;
    transition: all 0.2s ease;
}

.username:hover {
    text-decoration: underline;
    color: #764ba2;
}

.message.own .username {
    color: rgba(255, 255, 255, 0.9);
}

.message.own .username:hover {
    color: rgba(255, 255, 255, 1);
}

.timestamp {
    color: #999;
    font-size: 0.9em;
}

.message.own .timestamp {
    color: rgba(255, 255, 255, 0.7);
}

.message-text {
    line-height: 1.4;
}

/* Message Reply */
.message-reply {
    font-size: 0.85em;
    color: #667eea;
    padding: 5px 10px;
    margin-bottom: 5px;
    border-left: 3px solid #667eea;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.message-reply ion-icon {
    font-size: 14px;
}

/* Message Actions */
.message-actions {
    display: none;
    gap: 5px;
    margin-top: 5px;
}

.message:hover .message-actions {
    display: flex;
}

.message-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Specific override for report button - must come after general button styles */
.message-actions > button.report-btn {
    color: #dc3545 !important;
    background: none !important;
    border: none !important;
}

.message-actions button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.message-actions > button.report-btn:hover {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #c82333 !important;
}

body.dark-theme .message-actions button {
    color: #a0a0a0;
}

body.dark-theme .message-actions button.report-btn {
    color: #ff6b6b !important;
}

body.dark-theme .message-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-theme .message-actions button.report-btn:hover {
    background: rgba(255, 107, 107, 0.2) !important;
    color: #ff8787 !important;
}

.message-actions button ion-icon {
    font-size: 16px;
    pointer-events: none;
}

.message-actions > button.report-btn ion-icon {
    color: #dc3545 !important;
}

.message-actions > button.report-btn:hover ion-icon {
    color: #c82333 !important;
}

.message-actions button.report-btn,
.message-actions button.report-btn ion-icon,
button.report-btn,
button.report-btn ion-icon {
    color: #dc3545 !important;
}

.message-actions button.report-btn:hover,
.message-actions button.report-btn:hover ion-icon {
    color: #c82333 !important;
}

/* Message Reactions */
.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.reaction-bubble {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.reaction-bubble:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

.reaction-bubble.reacted {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    font-weight: bold;
}

/* Reaction Picker */
.reaction-picker {
    position: fixed;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

body.dark-theme .reaction-picker {
    background: var(--bg-secondary);
}

.reaction-picker button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.reaction-picker button:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.2);
}

/* Reply Indicator */
.reply-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
    font-size: 0.9em;
    color: #667eea;
}

body.dark-theme .reply-indicator {
    background: rgba(102, 126, 234, 0.2);
}

.reply-indicator button {
    background: none;
    border: none;
    cursor: pointer;
    color: #667eea;
    padding: 4px;
    display: flex;
    align-items: center;
}

.reply-indicator button ion-icon {
    font-size: 20px;
}

/* System Messages */
.system-message {
    text-align: center;
    padding: 8px;
    margin: 10px auto;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    max-width: 300px;
}

/* Typing Indicator */
.typing-indicator {
    padding: 10px;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
    animation: fadeIn 0.3s ease;
}

/* Input Area */
.input-container {
    display: flex;
    gap: 10px;
    padding: 20px;
    padding-bottom: 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .input-container {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.emoji-btn ion-icon {
    font-size: 24px;
}

.message-emoji-picker {
    position: absolute;
    bottom: 70px;
    left: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    max-width: 400px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.message-emoji-picker button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.2s;
}

.message-emoji-picker button:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.2);
}

#message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

#message-input:focus {
    outline: none;
    border-color: #667eea;
}

#send-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
}

#send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#send-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.3em;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2em;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    background: #f0f0f0;
    color: #667eea;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="color"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 1em;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.modal-body input:focus {
    outline: none;
    border-color: #667eea;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.user-result {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.user-result:hover {
    background: var(--hover-bg);
    border-color: #667eea;
}

.user-result.selected {
    background: #e8edff;
    border-color: #667eea;
}

.user-result-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.user-result-info {
    flex: 1;
}

.user-result-name {
    font-weight: bold;
    color: #333;
    transition: color 0.2s ease;
}

.user-result-name:hover {
    color: #667eea;
}

.user-result-email {
    font-size: 0.9em;
    color: #666;
}

.selected-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.member-chip {
    background: #e8edff;
    color: #667eea;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.member-chip button {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
}

/* Chat Info Modal */
#chat-info-content {
    padding: 10px 0;
}

.info-section {
    margin-bottom: 25px;
}

.info-section h4 {
    color: #667eea;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.info-room-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    padding: 10px;
}

body.dark-theme .info-room-name {
    color: #e0e0e0;
}

.info-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f8f9fa;
}

body.dark-theme .info-member {
    background: #2d2d2d;
}

.info-member-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: relative;
}

.info-member-details {
    flex: 1;
}

.info-member-name {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.info-member-name:hover {
    color: #667eea;
}

.info-member-status {
    font-size: 0.85em;
    color: #999;
}

.info-member-status.online {
    color: #4ade80;
}

.info-member-status.offline {
    color: #999;
}

.btn-kick-member {
    background: rgba(255, 0, 0, 0.1);
    color: #c33;
    border: 1px solid rgba(255, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
    margin-left: auto;
}

.btn-kick-member:hover {
    background: rgba(255, 0, 0, 0.2);
}

.btn-rename-group {
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-rename-group:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-add-members {
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
    font-weight: 500;
    width: 100%;
    margin-bottom: 10px;
}

.btn-add-members:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.delete-chat-btn {
    background: rgba(255, 0, 0, 0.1);
    color: #dc3545;
    border: 1px solid rgba(255, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
    font-weight: 500;
    width: 100%;
}

.delete-chat-btn:hover {
    background: rgba(255, 0, 0, 0.2);
}

/* Profile Settings Modal */
.profile-edit-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

body.dark-theme .profile-picture-section {
    background: #2d2d2d;
}

body.dark-theme .profile-picture-section {
    background: #2d2d2d;
}

.profile-picture-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

body.dark-theme .profile-picture-preview {
    border-color: #2d2d2d;
}

body.dark-theme .profile-picture-preview {
    border-color: #2d2d2d;
}

.profile-picture-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-info-section label {
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

.profile-info-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
}

.profile-info-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.profile-info-section input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    padding: 5px;
}

.profile-info-section input[type="color"]:focus {
    outline: none;
    border-color: #667eea;
}

.profile-info-section label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

body.dark-theme .profile-info-section label {
    color: var(--text-primary);
}

body.dark-theme .profile-info-section label {
    color: var(--text-primary);
}

.delete-account-btn {
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.3s;
    margin-top: 10px;
}

.delete-account-btn:hover {
    background: #c82333;
}

/* Friends List */
.friends-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 8px;
    background: white;
}

.friend-item-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    overflow: hidden;
    flex-shrink: 0;
}

.friend-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-item-info {
    flex: 1;
}

.friend-item-name {
    font-weight: bold;
    color: #333;
    transition: color 0.2s ease;
}

.friend-item-name:hover {
    color: #667eea;
}

.friend-item-status {
    font-size: 0.85em;
    color: #666;
}

.friend-item-status.online {
    color: #4ade80;
}

.friend-item-status.online::before {
    content: '● ';
}

.friend-item-actions {
    display: flex;
    gap: 8px;
}

.friend-item-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.btn-message {
    background: #667eea;
    color: white;
}

.btn-message:hover {
    background: #5568d3;
}

.btn-remove {
    background: #fee;
    color: #c33;
}

.btn-remove:hover {
    background: #fdd;
}

/* Friends Sections */
.friends-section {
    margin-bottom: 10px;
}

.friend-item.pending {
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid #667eea;
}

.pending-label {
    font-size: 12px;
    color: #667eea;
    margin-top: 2px;
}

/* Delete Chat Button */
.delete-chat-btn {
    background: rgba(255, 0, 0, 0.1);
    color: #c33;
    border: 1px solid rgba(255, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    margin-top: 20px;
    width: 100%;
}

.delete-chat-btn:hover {
    background: rgba(255, 0, 0, 0.2);
}

/* Add Members Button */
.btn-add-members {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    margin-top: 20px;
    width: 100%;
}

.btn-add-members:hover {
    background: #5568d3;
}

.btn-add-user {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.btn-add-user:hover {
    background: #5568d3;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar,
.rooms-list::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track,
.rooms-list::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.messages-container::-webkit-scrollbar-thumb,
.rooms-list::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover,
.rooms-list::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }

    .auth-screen {
        padding: 20px;
    }

    .auth-box {
        width: 100%;
        max-width: 100%;
        padding: 30px 20px;
    }

    .chat-screen {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .main-layout {
        border-radius: 0;
        flex-direction: column;
        position: relative;
    }

    .sidebar {
        width: 100%;
        position: fixed;
        z-index: 100;
        height: 100vh;
        transform: translateX(0);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        border-right: none;
    }

    .sidebar.mobile-hidden {
        transform: translateX(-100%);
    }

    .chat-area {
        width: 100%;
        height: 100dvh;
        position: fixed;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        display: flex;
        flex-direction: column;
        touch-action: pan-y; /* Allow vertical scrolling but enable horizontal gestures */
    }

    .chat-area.mobile-visible {
        transform: translateX(0);
    }

    .chat-header {
        padding: 15px;
    }

    .chat-header-left {
        gap: 10px;
    }

    .chat-header-left .back-btn-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        color: white;
        font-size: 24px;
        padding: 0;
        transition: background 0.2s ease;
    }

    .chat-header-left .back-btn-mobile:hover,
    .chat-header-left .back-btn-mobile:active {
        background: rgba(255, 255, 255, 0.3);
    }

    .chat-header-left .back-btn-mobile ion-icon {
        font-size: 24px;
    }

    .messages-container {
        padding: 15px 10px;
        padding-bottom: 15px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .message-bubble {
        max-width: 85%;
        padding: 10px 14px;
    }

    .message-input-container {
        padding: 10px;
        gap: 8px;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 60px));
    }

    .input-container {
        padding: 10px 8px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        display: flex;
        gap: 6px;
        flex-shrink: 0;
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        width: 100%;
        box-sizing: border-box;
    }

    #message-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 8px 10px;
        flex: 1;
        min-width: 0;
        border-radius: 20px;
    }

    #attach-btn, #emoji-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        flex-shrink: 0;
        padding: 0;
        font-size: 20px;
    }
    
    #send-btn {
        padding: 0 12px !important;
        font-size: 14px !important;
        min-width: 60px !important;
        max-width: 80px !important;
        height: 36px !important;
        flex-shrink: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 18px !important;
        white-space: nowrap;
        overflow: hidden;
    }

    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px;
        max-height: 90vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-body {
        padding: 15px;
    }

    .search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .user-list-item, .search-result-item {
        padding: 12px;
    }

    .room-item {
        padding: 12px 15px;
    }

    .sidebar-header {
        padding: 15px;
        height: auto;
    }

    .sidebar-actions {
        flex-direction: column;
        gap: 5px;
    }

    .sidebar-actions button {
        width: 100%;
        padding: 8px;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    .current-username {
        font-size: 15px;
    }

    .no-chat-selected {
        padding: 20px;
    }

    .no-chat-selected ion-icon {
        font-size: 60px;
    }

    .no-chat-selected h2 {
        font-size: 20px;
    }

    .no-chat-selected p {
        font-size: 14px;
    }

    /* Hide mobile menu toggle on desktop */
    .mobile-menu-btn {
        display: none;
    }
}

/* Desktop - hide back button */
@media (min-width: 769px) {
    .back-btn-mobile {
        display: none !important;
    }
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: #333;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 4px solid #667eea;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* File preview in input */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    max-height: 150px;
    overflow: hidden;
}

.file-preview img {
    max-height: 130px;
    max-width: 200px;
    object-fit: contain;
}

.file-preview button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}

.file-preview button:hover {
    color: #ff4444;
}

/* File attachments in messages */
.message-file {
    margin-top: 8px;
}

.message-file img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 8px;
}

.message-bubble img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

.message-file .file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.message-file .file-link:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Link preview */
.link-preview {
    margin-top: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.2s;
    background: rgba(255, 255, 255, 0.1);
}

.link-preview:hover {
    opacity: 0.9;
}

.link-preview-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.link-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.link-preview-text {
    flex: 1;
    padding: 12px;
}

.link-preview-site {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 4px;
}

.link-preview-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.link-preview-desc {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Read receipts */
.read-receipts {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.read-receipts ion-icon {
    font-size: 14px;
}

/* Search modal styling */
.search-result-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--hover-bg);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px;
}

.search-result-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.search-result-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.search-result-content mark {
    background: #ffeb3b;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Chat actions in header */
.chat-actions {
    display: flex;
    gap: 8px;
}

/* Admin Panel Styles */
.admin-only {
    display: none;
}

.admin-only.visible {
    display: flex;
}

.action-btn.admin-only:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.admin-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.admin-tab.active {
    color: #dc3545;
    border-bottom-color: #dc3545;
}

.admin-tab:hover {
    color: #dc3545;
}

.admin-tab-content {
    display: block;
}

.admin-tab-content.hidden {
    display: none;
}

.admin-room-item,
.admin-user-item {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-room-item:hover,
.admin-user-item:hover {
    background: var(--hover-bg);
    transform: translateX(5px);
}

.admin-room-info,
.admin-user-info {
    flex: 1;
}

.admin-room-name,
.admin-user-name {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.admin-room-meta,
.admin-user-meta {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.admin-room-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 8px;
}

.admin-room-type.dm {
    background: #e3f2fd;
    color: #1976d2;
}

.admin-room-type.group {
    background: #f3e5f5;
    color: #7b1fa2;
}

.admin-action-btn {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s;
}

.admin-action-btn:hover {
    background: #c82333;
}

/* Ban and Report Styles */
.banned-badge {
    color: white;
    background: #dc3545;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-left: 8px;
}

.admin-report-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background: var(--bg-primary);
    transition: all 0.2s;
}

.admin-report-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
}

/* Call UI Styles */
.call-modal-content {
    max-width: 900px;
    height: 85vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.call-header {
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.call-header h3 {
    margin: 0;
    font-size: 1.2em;
}

#call-timer {
    font-size: 1.1em;
    font-weight: 500;
}

.call-body {
    flex: 1;
    background: #000;
    position: relative;
    overflow: hidden;
}

.call-participants {
    width: 100%;
    height: 100%;
    position: relative;
}

.remote-video-container {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.call-avatar {
    position: absolute;
    font-size: 120px;
    color: rgba(255, 255, 255, 0.3);
}

.call-username {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    font-size: 1.2em;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.local-video-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.call-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.call-control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.2s;
}

.call-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.call-control-btn.muted {
    background: #dc3545;
}

.call-control-btn.video-off {
    background: #dc3545;
}

.call-control-btn.end-call {
    background: #dc3545;
}

.call-control-btn.end-call:hover {
    background: #c82333;
}

/* Incoming Call Modal */
.incoming-call-content {
    max-width: 400px;
    text-align: center;
}

.incoming-call-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.call-action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    min-width: 140px;
    justify-content: center;
}

.call-action-btn ion-icon {
    font-size: 24px;
}

.accept-call {
    background: #4caf50;
    color: white;
}

.accept-call:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.decline-call {
    background: #dc3545;
    color: white;
}

.decline-call:hover {
    background: #c82333;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .call-modal-content {
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .local-video-container {
        width: 120px;
        height: 90px;
        bottom: 100px;
        right: 10px;
    }
    
    .call-control-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

.report-status-pending {
    background: #ff9800;
}

.report-status-reviewed {
    background: #2196f3;
}

.report-status-resolved {
    background: #4caf50;
}

.report-status-dismissed {
    background: #9e9e9e;
}

#report-reason {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    resize: vertical;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
}

#report-status-filter {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.user-profile-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.report-button {
    background: #dc3545 !important;
}

.report-button:hover {
    background: #c82333 !important;
}

/* Call Settings Modal */
#call-settings-modal .form-group {
    margin-bottom: 20px;
}

#call-settings-modal label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

#call-settings-modal .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

#call-settings-modal .form-control:focus {
    outline: none;
    border-color: #667eea;
}

#test-devices-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

#test-devices-btn:hover {
    background: #5568d3;
}

/* Image Lightbox Styles */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.image-lightbox.hidden {
    display: none;
    opacity: 0;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close ion-icon {
    font-size: 32px;
    color: white;
}

#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile adjustments for lightbox */
@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 10px;
        width: 44px;
        height: 44px;
    }
    
    .lightbox-close ion-icon {
        font-size: 28px;
    }
    
    #lightbox-image {
        max-width: 95vw;
        max-height: 95vh;
    }
}


.brand {
    font-family: 'Ethnocentric', sans-serif;
}

.navbar {
    background-color: red;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.nav-center {
    justify-self: center;
}

.warning {
    color: white;
    font-weight: bold;
    text-align: center;
    position: relative;
}

.warning ion-icon {
    vertical-align: middle;
    margin-right: 5px;
}

/* Call Interface Styles */
.call-modal-content {
    max-width: 400px;
    text-align: center;
}

.incoming-call-container {
    padding: 40px 20px;
}

.caller-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-color1) 0%, var(--gradient-color2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
    }
}

.incoming-call-container h2 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 1.8em;
}

.incoming-call-container p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.incoming-call-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.call-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    width: 80px;
    height: 80px;
}

.call-action-btn ion-icon {
    font-size: 32px;
}

.decline-btn {
    background: #ef4444;
    color: white;
}

.decline-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.accept-btn {
    background: #10b981;
    color: white;
}

.accept-btn:hover {
    background: #059669;
    transform: scale(1.1);
}

/* Active Call Interface */
.active-call-interface {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.call-header {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    backdrop-filter: blur(10px);
}

.call-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.call-info span:first-child {
    font-size: 16px;
    font-weight: 600;
}

.call-info span:last-child {
    font-size: 14px;
    opacity: 0.8;
}

.call-video-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    overflow-y: auto;
}

#remote-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #000;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Remote video participants for group calls */
.remote-video-participant {
    background: #000;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Grid layouts for different participant counts */
.call-video-container.grid-2 .remote-video-participant {
    width: calc(50% - 10px);
    height: 100%;
}

.call-video-container.grid-4 .remote-video-participant {
    width: calc(50% - 10px);
    height: calc(50% - 10px);
}

.call-video-container.grid-6 .remote-video-participant {
    width: calc(33.333% - 10px);
    height: calc(33.333% - 10px);
}

#local-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.call-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    backdrop-filter: blur(10px);
}

.call-control-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;
    font-size: 24px;
}

.call-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.call-control-btn.active {
    background: #667eea;
}

.call-control-btn.muted {
    background: #ef4444;
}

.call-control-btn.end-call {
    background: #ef4444;
    width: 70px;
    height: 70px;
}

.call-control-btn.end-call:hover {
    background: #dc2626;
}

/* Minimized Call */
.active-call-interface.minimized {
    width: 320px;
    height: 240px;
    top: auto;
    bottom: 20px;
    right: 20px;
    left: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.active-call-interface.minimized .call-header {
    padding: 10px;
}

.active-call-interface.minimized .call-info span:first-child {
    font-size: 14px;
}

.active-call-interface.minimized .call-info span:last-child {
    font-size: 12px;
}

.active-call-interface.minimized #local-video {
    width: 100px;
    height: 75px;
    bottom: 10px;
    right: 10px;
}

.active-call-interface.minimized .call-controls {
    padding: 10px;
    gap: 8px;
}

.active-call-interface.minimized .call-control-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
}

.active-call-interface.minimized .call-control-btn.end-call {
    width: 50px;
    height: 50px;
}

/* Device Selection */
.device-select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

.device-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Mobile Call Interface */
@media (max-width: 768px) {
    #local-video {
        width: 120px;
        height: 90px;
        bottom: 100px;
        right: 10px;
    }

    .call-controls {
        padding: 15px;
        gap: 10px;
    }

    .call-control-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .call-control-btn.end-call {
        width: 60px;
        height: 60px;
    }

    .active-call-interface.minimized {
        width: 200px;
        height: 150px;
        bottom: 80px;
        right: 10px;
    }

    .active-call-interface.minimized #local-video {
        width: 60px;
        height: 45px;
    }

    .active-call-interface.minimized .call-control-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}
