/* ===== Group Call Modal ===== */
.group-call-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.group-call-modal-container {
    width: 90vw;
    height: 90vh;
    background: #1e1e2f;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.group-call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #2a2a3a;
    color: white;
}
.group-call-title {
    font-size: 18px;
    font-weight: 500;
}
.call-duration {
    margin-left: 12px;
    font-size: 14px;
    opacity: 0.7;
}
.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}
.group-call-videos {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.video-cell {
    position: relative;
    background: #2a2a3a;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.participant-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.participant-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    color: white;
}
.participant-name .badge {
    margin-left: 8px;
    background: #4caf50;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
}
.group-call-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: #2a2a3a;
}
.group-call-controls .call-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3a3a4a;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}
.group-call-controls .call-btn.active {
    background: #4caf50;
}
.group-call-controls .call-btn.hangup {
    background: #f44336;
}










.participants-list {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    border-radius: 12px;
    padding: 12px;
    min-width: 200px;
    color: white;
    z-index: 10;
}
.participants-list h4 {
    margin: 0 0 8px;
    font-size: 14px;
}
.participants-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.participants-list li {
    font-size: 12px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.participants-list li i {
    margin-left: auto;
}

.group-call-header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}
.participants-btn {
    position: relative;
}
.participants-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.group-call-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.group-call-videos {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.participants-panel {
    width: 260px;
    background: rgba(30, 30, 47, 0.9);
    backdrop-filter: blur(8px);
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 16px;
    overflow-y: auto;
    color: white;
}
.participants-panel h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
}
.participant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.call-btn.active {
    background: #4caf50;
}

/* Панель участников */
.participants-panel {
    width: 300px;
    background: rgba(30, 30, 47, 0.95);
    backdrop-filter: blur(8px);
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 16px;
    overflow-y: auto;
    color: white;
}
.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.participant-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.muted-icon, .video-off-icon {
    font-size: 12px;
    color: #ff9800;
}
.role-badge {
    background: #3a3a4a;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
}
.participant-actions {
    display: flex;
    gap: 8px;
}
.action-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}
.action-btn:hover {
    color: #4caf50;
}
.kick-btn:hover {
    color: #f44336;
}
.role-select {
    background: #2a2a3a;
    border: none;
    color: white;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
}





.call-history-modal {
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    background: var(--bg-primary);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}
.call-history-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.call-history-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.calls-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.call-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
}
.call-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.call-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.call-avatar i {
    font-size: 28px;
    color: var(--text-secondary);
}
.call-details {
    flex: 1;
}
.call-user {
    font-weight: 600;
    margin-bottom: 4px;
}
.call-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}
.call-direction i {
    font-size: 10px;
}
.call-duration {
    margin-left: 4px;
}
.call-again-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.call-again-btn:disabled {
    opacity: 0.5;
}
.load-more-btn {
    text-align: center;
    margin-top: 16px;
}
.load-more-btn button {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
}