/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 */
header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

header h1 {
    color: #4a5568;
    font-size: 1.8rem;
}

/* 환경 배지 */
.env-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.env-badge.development {
    background: #e6f3ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
}

.env-badge.staging {
    background: #fff4e6;
    color: #cc6600;
    border: 1px solid #ffd9b3;
}

.env-badge.production {
    background: #e6ffe6;
    color: #006600;
    border: 1px solid #b3ffb3;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-info span {
    font-weight: 600;
    color: #2d3748;
}

/* 인증 섹션 */
.auth-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.auth-form h2 {
    margin-bottom: 25px;
    color: #2d3748;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 버튼 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover:not(:disabled) {
    background: #cbd5e0;
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #2f855a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.3);
}

.btn:disabled,
.btn.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 채팅 섹션 */
.chat-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 200px); /* 헤더와 사용자 정보 공간 고려 */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* flex 레이아웃을 위해 hidden 유지 */
    position: relative;
    max-height: calc(100vh - 200px);
}

@media (max-width: 768px) {
    .chat-section {
        height: calc(100vh - 180px); /* 모바일에서 헤더 높이 고려 */
        max-height: calc(100vh - 180px);
    }
}

/* 타이틀 */
.chat-title {
    padding: 15px 20px;
    border-bottom: 2px solid #e2e8f0;
    background: white;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title h2 {
    margin: 0;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.chat-title .user-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 채팅 목록 | 상태 컨테이너 (3:2 비율) */
.chat-list-status-container {
    display: flex;
    flex-direction: row;
    flex: 0 0 auto;
    border-bottom: 2px solid #e2e8f0;
    min-height: 200px;
    max-height: 25vh;
    overflow: hidden;
}

/* 채팅 목록 (3 부분) */
.chat-list-section {
    flex: 3;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #e2e8f0;
    background: #f7fafc;
    min-width: 0;
}

.chat-list-header {
    padding: 15px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: white;
    height: 56px; /* presence-bar와 높이 고정 */
    box-sizing: border-box;
}

.chat-list-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
}

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

/* 상태 (2 부분) */
.status-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    background: white;
    min-width: 0;
    overflow: hidden;
}

/* 상태 헤더는 제거됨 */

/* 채팅방 섹션 */
.chat-room-section {
    padding: 15px 20px;
    border-bottom: 2px solid #e2e8f0;
    background: white;
    flex-shrink: 0;
}

.chat-room-section h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 메시지 영역 */
.messages-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #f7fafc;
    position: relative;
}

.messages {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    width: 100%;
}

/* 메시지 입력 섹션 */
.message-input-section {
    flex: 0 0 auto;
    padding: 15px 20px;
    border-top: 2px solid #e2e8f0;
    background: white;
    /* 높이는 내용에 맞게 자동 조정 */
}

.message-input {
    display: flex !important;
    gap: 10px;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    /* 높이는 내용에 맞게 자동 조정 */
}

/* 채팅 목록 내부 스타일 */
.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

.conversation-item {
    padding: 10px 12px;
    margin-bottom: 6px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 0.9rem;
}

.conversation-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.conversation-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.conversation-title {
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #f56565;
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.conversation-item.active .unread-badge {
    background: white;
    color: #667eea;
}

.conversation-preview {
    font-size: 0.9rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* 기존 메인 채팅 영역 스타일은 제거됨 */

.presence-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
    flex-shrink: 0;
    background: white;
    height: 56px; /* chat-list-header와 높이 고정 */
    box-sizing: border-box;
}

.presence-label {
    font-weight: 600;
    white-space: nowrap;
}

.online-count {
    background: #e6fffa;
    color: #046c4e;
    border-radius: 9999px;
    padding: 2px 8px;
    font-size: 12px;
    white-space: nowrap;
}

.online-users {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}

.conversation-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    flex-shrink: 0;
    background: white;
    overflow-y: auto;
}

.conversation-controls input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
    max-width: 100%;
}

.conversation-controls .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* 버튼을 가로로 나눠서 배치 */
.conversation-controls .btn-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.conversation-controls .btn-group .btn {
    flex: 1;
    min-width: 0;
}

.conversation-controls.connected {
    background: #e6fffa;
    height: 100%;
}

.conversation-controls.disconnected {
    background: #fed7d7;
    height: 100%;
}

@media (max-width: 768px) {
    .conversation-controls {
        width: 100%;
    }
}

.conversation-controls input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    width: 200px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .conversation-controls input {
        width: 100%;
    }
}

/* 연결 상태는 버튼 그룹 색상으로 표시하므로 제거됨 */

/* 메시지 영역은 위의 .messages-container와 .messages로 대체됨 */

.message {
    margin-bottom: 0;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 70%;
    word-wrap: break-word;
    flex-shrink: 0;
}

.message.own {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.other {
    background: white;
    color: #2d3748;
    border: 2px solid #e2e8f0;
}

.message-header {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.message-body {
    font-size: 1rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* 메시지 입력은 위의 .message-input-section과 .message-input으로 대체됨 */

.message-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.message-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 알림 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #48bb78;
}

.notification.error {
    background: #f56565;
}

.notification.info {
    background: #4299e1;
}

/* 유틸리티 클래스 */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 새 채팅 버튼은 헤더로 이동했으므로 제거됨 */

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 1.3rem;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.users-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #f7fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.user-id {
    font-size: 0.9rem;
    color: #718096;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* 모바일 우선 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 5px;
        max-width: 100%;
    }
    
    header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.2rem;
    }
    
    .header-left {
        flex-direction: column;
        gap: 8px;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .user-info {
        flex-direction: row;
        gap: 8px;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .user-info span {
        font-size: 0.9rem;
    }
    
    .user-info .btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .chat-title {
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .chat-title h2 {
        font-size: 1.2rem;
    }
    
    .chat-title .user-info {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .chat-list-status-container {
        min-height: 150px;
    }
    
    .chat-list-header {
        padding: 10px 12px;
        height: 48px; /* 모바일에서 presence-bar와 높이 고정 */
        box-sizing: border-box;
    }
    
    .chat-list-header h3 {
        font-size: 0.95rem;
    }
    
    .presence-bar {
        padding: 10px 12px;
        height: 48px; /* 모바일에서 chat-list-header와 높이 고정 */
        box-sizing: border-box;
    }
    
    .chat-list-actions {
        gap: 6px;
    }
    
    .chat-list-actions .btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    /* 상태 헤더는 제거됨 */
    
    .chat-room-section {
        padding: 10px 15px;
    }
    
    .chat-room-section h3 {
        font-size: 0.95rem;
    }
    
    .conversations-list {
        padding: 4px;
    }
    
    .conversation-item {
        padding: 6px 8px;
        margin-bottom: 3px;
        font-size: 0.75rem;
    }
    
    .presence-bar {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .presence-label {
        font-size: 0.85rem;
    }
    
    .online-count {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .conversation-controls {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .conversation-controls input {
        padding: 6px 8px;
        font-size: 0.8rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .conversation-controls .btn-group {
        gap: 6px;
    }
    
    .conversation-controls .btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .conversation-controls .btn-group .btn {
        flex: 1;
        min-width: 0;
    }
    
    .messages-container {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }
    
    .messages {
        padding: 10px;
        flex: 1 1 auto;
        overflow-y: auto;
        min-height: 0;
    }
    
    .message {
        max-width: 90%;
        padding: 8px 10px;
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .message-input-section {
        flex: 0 0 auto;
        padding: 10px 15px;
        /* 높이는 내용에 맞게 자동 조정 */
    }
    
    .message-input {
        gap: 8px;
        /* 높이는 내용에 맞게 자동 조정 */
    }
    
    .message-input input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .message-input .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 50px;
    }
    
    .notification {
        right: 5px;
        left: 5px;
        top: 5px;
        padding: 10px 15px;
        font-size: 0.9rem;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .new-chat-section {
        position: fixed;
        bottom: 80px;
        right: 15px;
        z-index: 100;
    }
    
    .new-chat-section .btn {
        padding: 12px 20px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(90vh - 100px);
    }
    
    .auth-section {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .auth-form h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* 통화 관련 스타일 */
.call-modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
}

.call-modal.large {
    max-width: 900px;
    width: 90vw;
}

.caller-info {
    text-align: center;
    padding: 30px;
}

.caller-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    border: 3px solid #4a90e2;
}

.caller-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.call-type {
    font-size: 1rem;
    color: #718096;
}

.call-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
}

.call-actions .btn {
    min-width: 120px;
}

/* 음성 통화용 컨테이너 */
.audio-call-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 300px;
}

.caller-avatar-large {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.avatar-placeholder {
    font-size: 4rem;
    color: white;
}

.call-participants {
    text-align: center;
    margin-top: 20px;
}

.participant-info {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 500;
}

/* 오디오 레벨 인디케이터 */
.audio-level-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 30px;
}

.audio-level-bar {
    width: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.1s ease;
    min-height: 4px;
}

.audio-level-bar.active {
    background: #48bb78;
    box-shadow: 0 0 8px rgba(72, 187, 120, 0.6);
}

.audio-level-bar:nth-child(1) {
    height: 8px;
}

.audio-level-bar:nth-child(2) {
    height: 12px;
}

.audio-level-bar:nth-child(3) {
    height: 16px;
}

.audio-level-bar:nth-child(4) {
    height: 20px;
}

.audio-level-bar.active:nth-child(1) {
    height: 8px;
}

.audio-level-bar.active:nth-child(2) {
    height: 12px;
}

.audio-level-bar.active:nth-child(3) {
    height: 16px;
}

.audio-level-bar.active:nth-child(4) {
    height: 20px;
}

/* 비디오 관련 스타일 (함수 유지를 위해 남겨둠, 사용 안 함) */
.video-container {
    position: relative;
    width: 100%;
    min-height: 500px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#local-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    border-radius: 8px;
    border: 2px solid white;
    object-fit: cover;
    z-index: 10;
}

.remote-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 10px;
}

.remote-videos video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: #1a202c;
}

.call-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0 0 12px 12px;
}

.call-controls .btn {
    min-width: 150px;
}

@media (max-width: 768px) {
    .call-modal.large {
        width: 95vw;
        max-width: none;
    }

    .audio-call-container {
        min-height: 250px;
        padding: 30px 15px;
    }

    .caller-avatar-large {
        width: 120px;
        height: 120px;
        margin-bottom: 20px;
    }

    .avatar-placeholder {
        font-size: 3rem;
    }

    .participant-info {
        font-size: 1rem;
    }

    #local-video {
        width: 120px;
        height: 90px;
        bottom: 10px;
        right: 10px;
    }

    .video-container {
        min-height: 300px;
    }

    .call-controls .btn {
        min-width: 100px;
        font-size: 0.9rem;
    }

    .audio-level-indicator {
        bottom: 5px;
        height: 25px;
    }

    .audio-level-bar {
        width: 3px;
    }
}

/* 검색 모달 스타일 */
.search-input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-filter {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    flex: 1;
    min-width: 150px;
}

.search-filter:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px 0;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-item {
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: #edf2f7 !important;
    border-color: #cbd5e0 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .search-filters {
        flex-direction: column;
    }

    .search-filter {
        width: 100%;
        min-width: auto;
    }

    .search-results {
        max-height: 300px;
    }
    
    .search-input-section {
        flex-direction: column;
    }
    
    .search-input-section .btn {
        width: 100%;
    }
}
