/* ============================================
   HAMTALK - GLOBAL RESET & VARIABLES
   ============================================ */
:root {
    --primary: #075e54;
    --primary-dark: #054d44;
    --primary-light: #128c7e;
    --accent: #25d366;
    --bg-chat: #e5ddd5;
    --bg-chat-dark: #0f1419;
    --bubble-own: #dcf8c6;
    --bubble-own-dark: #005c4b;
    --bubble-other: #ffffff;
    --bubble-other-dark: #202c33;
    --text-primary: #111b21;
    --text-secondary: #667781;
    --text-light: #ffffff;
    --border: #d1d7db;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --header-height: 56px;
    --footer-height: 62px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-chat);
    color: var(--text-primary);
}

/* ============================================
   SCREENS
   ============================================ */
.screen {
    display: none;
    height: 100dvh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
#login-screen {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease-out;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-light);
}

.logo-icon {
    font-size: 72px;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.logo h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.logo p {
    font-size: 15px;
    opacity: 0.9;
}

.login-form {
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.input-group input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.15);
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-chat);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

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

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
    margin-top: 8px;
}

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

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

.btn-secondary {
    padding: 10px 16px;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

/* ============================================
   CHAT HEADER
   ============================================ */
.chat-header {
    height: var(--header-height);
    background: var(--primary);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    z-index: 100;
    flex-shrink: 0;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-info {
    margin-left: 8px;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.header-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

/* ============================================
   CHAT MAIN AREA
   ============================================ */
.chat-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-chat);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(7, 94, 84, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 211, 102, 0.03) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0,0,0,0.015) 35px, rgba(0,0,0,0.015) 70px);
    z-index: 0;
}

.messages-container {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

/* ============================================
   MESSAGE BUBBLES
   ============================================ */
.message-wrapper {
    display: flex;
    width: 100%;
    margin-bottom: 4px;
    animation: messageIn 0.25s ease-out;
}

.message-wrapper.own {
    justify-content: flex-end;
}

.message-wrapper.other {
    justify-content: flex-start;
}

.message {
    max-width: 75%;
    min-width: 80px;
    padding: 8px 10px;
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.message-wrapper.own .message {
    background: var(--bubble-own);
    border-bottom-right-radius: var(--radius-sm);
}

.message-wrapper.other .message {
    background: var(--bubble-other);
    border-bottom-left-radius: var(--radius-sm);
}

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

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-chat);
}

.message-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.message-callsign {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.message-wrapper.own .message-callsign {
    color: #1b8f7d;
}

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

.message-text {
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--text-primary);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-image {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-top: 4px;
    cursor: pointer;
    display: block;
}

.message-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.message-status {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   CHAT FOOTER / INPUT
   ============================================ */
.chat-footer {
    height: var(--footer-height);
    background: #f0f2f5;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    z-index: 100;
    flex-shrink: 0;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.text-input-wrapper {
    flex: 1;
    background: #fff;
    border-radius: 24px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#message-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 15px;
    outline: none;
}

.input-icon {
    color: var(--text-secondary);
    font-size: 22px;
    flex-shrink: 0;
}

.send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.send-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

#send-icon {
    font-size: 18px;
    margin-left: 2px;
}

/* ============================================
   LIVE KAMERA MODAL & OVERLAY STYLES
   ============================================ */
.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    padding: 16px;
    background: #000;
    border-radius: var(--radius-lg);
}

#camera-view {
    width: 100%;
    max-height: 65vh;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: #111;
}

.camera-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 16px;
    gap: 12px;
}

.btn-camera-snap {
    flex: 2;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-camera-cancel {
    flex: 1;
    padding: 12px;
    background: #444;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
}



/* ============================================
   VIDEO-AUFNAHME
   ============================================ */
.camera-record-status {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(180, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.camera-controls {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
}

.camera-controls button {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
}

.btn-camera-record {
    padding: 12px 8px;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-camera-record.recording {
    background: #8b0000;
    animation: recordingPulse 1.2s infinite;
}

.btn-camera-record:disabled,
.btn-camera-snap:disabled {
    cursor: not-allowed;
}

@keyframes recordingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

@media (max-width: 600px) {
    .camera-controls {
        grid-template-columns: 1fr 1fr;
    }

    .camera-controls button {
        min-height: 48px;
    }
}
/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 90%;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(32, 44, 51, 0.95);
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
    body {
        background: #d1d7db;
    }
    
    #chat-screen.screen.active {
        max-width: 900px;
        margin: 0 auto;
        height: 95vh;
        top: 2.5vh;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-lg);
    }
    
    .chat-header {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .chat-footer {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    .message {
        max-width: 65%;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 50px;
        --footer-height: 56px;
    }
    
    .login-form {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 26px;
    }
    
    .message {
        max-width: 85%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-chat: var(--bg-chat-dark);
        --bubble-own: var(--bubble-own-dark);
        --bubble-other: var(--bubble-other-dark);
        --text-primary: #e9edef;
        --text-secondary: #8696a0;
    }
    
    .chat-footer {
        background: #202c33;
    }
    
    .text-input-wrapper {
        background: #2a3942;
    }
    
    #message-input {
        color: var(--text-primary);
    }
    
    .input-icon {
        color: #8696a0;
    }
    
    .message-wrapper.own .message-callsign {
        color: #53bdeb;
    }
    
    .message-wrapper.other .message-callsign {
        color: #53bdeb;
    }
    
    .message-text {
        color: var(--text-primary);
    }
    
    .login-form {
        background: rgba(30, 40, 45, 0.98);
    }
    
    .input-group input[type="text"] {
        background: #2a3942;
        border-color: #374248;
        color: var(--text-primary);
    }
}
/* Sidebar Hauptmenü */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #202c33;
    color: #ffffff;
    z-index: 9999;
    padding: 20px;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374248;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: #aebac1;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 12px 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.sidebar-list li:hover {
    background-color: #111b21;
}
/* Profil Modal Styles */
#profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #202c33;
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374248;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #aebac1;
}

.modal-body input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #374248;
    background-color: #2a3942;
    color: #ffffff;
    box-sizing: border-box;
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 15px;
}

.avatar-placeholder {
    font-size: 3rem;
    background-color: #111b21;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto;
}
/* ============================================
   RÄUME & KANÄLE MODAL STYLES
   ============================================ */
#channels-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.channel-btn {
    padding: 10px 14px;
    background-color: #2a3942;
    color: #ffffff;
    border: 1px solid #374248;
    border-radius: 6px;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.channel-btn:hover, .channel-btn.active {
    background-color: #005c4b;
    border-color: #00a884;
}

.custom-channel-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.custom-channel-box input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #374248;
    background-color: #2a3942;
    color: #ffffff;
    box-sizing: border-box;
}

.custom-channel-box button {
    padding: 10px;
    background-color: #00a884;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
/* Styling für das Info-Modal */
.modal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.5); 
}

.modal-content {
  background-color: #fff;
  color: #333;
  margin: 15% auto; 
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}
/* --- Dark Mode Farben --- */
body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

/* Modals und Seitenmenü im Dark Mode */
body.dark-mode .modal-content,
body.dark-mode .sidebar-menu,
body.dark-mode .sidebar-header {
  background-color: #1e1e1e;
  color: #ffffff;
  border-color: #333;
}

/* Eingabeleiste unten abdunkeln */
body.dark-mode footer {
  background-color: #1e1e1e;
  border-top: 1px solid #333;
}

body.dark-mode .text-input-wrapper input {
  background-color: #2c2c2c;
  color: #ffffff;
  border: 1px solid #444;
}
/* --- Suchleiste Styling --- */
.search-bar {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  background-color: #f0f2f5;
  border-bottom: 1px solid #ccc;
}

body.dark-mode .search-bar {
  background-color: #2a2a2a;
  border-bottom: 1px solid #444;
}

.search-bar input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 20px;
  outline: none;
}

body.dark-mode .search-bar input {
  background-color: #1e1e1e;
  color: #ffffff;
  border: 1px solid #555;
}

body.dark-mode .input-container {
    background-color: #2a2a2a !important;
    border-color: #2a2a2a !important;
}

body.dark-mode .chat-footer {
    background-color: #2a2a2a !important;
    border-color: #2a2a2a !important;
}

body.dark-mode #message-input {
    background-color: #2a2a2a !important;
    background: #2a2a2a !important;
    color: #ffffff !important;
    border: 1px solid #444444 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
}

body.dark-mode .text-input-wrapper {
    background-color: #2a2a2a !important;
    border: 1px solid #444444 !important;
}

.close-search-btn {
  margin-left: 10px;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

body.dark-mode .close-search-btn {
  color: #aaa;
}
/* --- Sprachnachrichten Styling --- */
#mic-btn {
  transition: color 0.2s ease, transform 0.1s ease;
  user-select: none;
}

#mic-btn:active {
  transform: scale(1.2);
}

.message audio {
  max-width: 240px;
  height: 40px;
  outline: none;
}
#mic-btn.recording {
    color: #ff0000 !important;
    transform: scale(1.2);
}
/* Styling für das aktive Nutzer-Fenster */
#user-list-modal {
    font-family: inherit;
    font-size: 14px;
    z-index: 9999;
}
#user-list-content {
    max-height: 200px;
    overflow-y: auto;
}
/* Markierte Nachricht – Dezent und kompakt um den Inhalt */
.message.message-selected {
    background-color: transparent !important;
    border: none !important;
}

.message.message-selected .message-content,
.message.message-selected .message-bubble {
    outline: 2px solid rgba(255, 255, 255, 0.4) !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px;
}

/* Optional: Damit der Mülleimer oben immer gut aussieht */
#deleteBtnTop {
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* ============================================
   WEBRTC VIDEOANRUF
   ============================================ */
.call-container {
    width: min(96vw, 900px);
    height: min(90vh, 720px);
    background: #111;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,.45);
}

.call-header {
    min-height: 52px;
    padding: 10px 14px;
    background: #202c33;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#call-status {
    font-size: 13px;
    opacity: .8;
}

.call-videos {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

#local-video {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 28%;
    max-width: 240px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #222;
    border: 2px solid #fff;
    border-radius: 10px;
    z-index: 2;
}

#call-placeholder {
    position: absolute;
    color: #fff;
    text-align: center;
    font-size: 42px;
    line-height: 1.4;
    opacity: .7;
}

#call-placeholder span {
    font-size: 16px;
}

.call-controls {
    min-height: 72px;
    background: #202c33;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px;
}

.call-control-btn,
.call-hangup-btn,
.call-accept-btn {
    border: 0;
    cursor: pointer;
    color: #fff;
    border-radius: 28px;
    min-height: 48px;
    padding: 0 18px;
    font-size: 16px;
}

.call-control-btn {
    width: 52px;
    padding: 0;
    background: #3b4a54;
}

.call-control-btn.off {
    background: #7a2525;
}

.call-hangup-btn {
    background: #c62828;
}

.call-accept-btn {
    background: #238636;
}

.incoming-call-box {
    width: min(90vw, 380px);
    background: #fff;
    color: #222;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,.45);
}

.incoming-call-icon {
    font-size: 54px;
    margin-bottom: 8px;
}

.incoming-call-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

@media (max-width: 600px) {
    .call-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    #local-video {
        width: 34%;
        right: 8px;
        bottom: 8px;
    }

    .call-controls {
        min-height: 80px;
    }
}


/* Online-Benutzer Auswahl für Videoanruf */
.video-call-users-box {
    width: min(92vw, 430px);
    max-height: 80vh;
    background: #fff;
    color: #222;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.45);
}
.video-call-users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #202c33;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}
.video-call-users-header button {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
}
.video-call-users-subtitle {
    padding: 12px 16px 8px;
    color: #667781;
    font-size: 14px;
}
.video-call-user-list {
    max-height: 55vh;
    overflow-y: auto;
    padding: 4px 10px 12px;
}
.video-call-user {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #e9edef;
    background: #fff;
    min-height: 58px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
}
.video-call-user:hover { background: #f0f2f5; }
.video-call-user-icon { font-size: 15px; }
.video-call-user-name { flex: 1; font-weight: 600; font-size: 15px; }
.video-call-user-action { font-size: 20px; }
.video-call-no-users { padding: 30px 15px; text-align: center; color: #667781; }
.video-call-no-users div { font-size: 34px; margin-bottom: 8px; }

/* Gruppen-Videochat */
.group-call-container{width:min(96vw,1000px);height:min(90vh,760px);background:#111;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 10px 40px rgba(0,0,0,.45)}
.group-call-grid{flex:1;min-height:0;overflow:auto;padding:10px;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;background:#000}
.group-call-tile{position:relative;min-height:180px;background:#222;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.group-call-tile video{width:100%;height:100%;min-height:180px;object-fit:cover;background:#000}
.group-call-label{position:absolute;left:8px;bottom:8px;background:rgba(0,0,0,.65);color:#fff;padding:4px 8px;border-radius:6px;font-size:13px;z-index:2}
@media(max-width:600px){.group-call-container{width:100vw;height:100vh;border-radius:0}.group-call-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px}.group-call-tile,.group-call-tile video{min-height:130px}}

/* Eigener Hauptmenü-Button für den Gruppen-Videochat */
.group-video-main-button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    cursor: pointer;
}
.group-video-main-button .main-menu-button-icon {
    font-size: 20px;
    line-height: 1;
}
