body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
}

/* 메인 컨테이너: 좌측 콘텐츠 + 우측 채팅 */
.main-container {
    display: flex;
    height: 100vh;
    gap: 0;
}

/* 왼쪽 메인 콘텐츠 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

/* 오른쪽 사이드바: 채팅 (고정) */
.chat-sidebar {
    width: 300px;
    background-color: #ffffff;
    padding: 15px;
    border-left: 2px solid #dee2e6;
    overflow-y: auto;
    box-shadow: -2px 0 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.chat-sidebar h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

h1 {
    color: #0056b3;
    margin-top: 0;
}

.controls {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.controls input {
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 200px;
}

.controls button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.controls button:hover:not(:disabled) {
    background-color: #0056b3;
}

.controls button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 파일 전송 섹션 */
.file-transfer-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
}

.file-transfer-section h3 {
    margin-top: 0;
    color: #0056b3;
}

.file-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.quality-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.quality-selector label {
    font-weight: bold;
    color: #333;
}

.quality-btn {
    padding: 8px 12px;
    background-color: #e9ecef;
    color: #333;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.quality-btn:hover {
    background-color: #dee2e6;
    border-color: #999;
}

.quality-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

/* 비트레이트 선택 (동영상) - quality-selector와 동일한 스타일 */
.bitrate-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.bitrate-selector label {
    font-weight: bold;
    color: #333;
}

.bitrate-btn {
    padding: 8px 12px;
    background-color: #e9ecef;
    color: #333;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.bitrate-btn:hover {
    background-color: #dee2e6;
    border-color: #999;
}

.bitrate-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

#fileInput {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
}

#sendFileButton {
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

#sendFileButton:hover:not(:disabled) {
    background-color: #218838;
}

#sendFileButton:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 압축 통계 테이블 */
.compression-stats {
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
}

.compression-stats table {
    width: 100%;
    border-collapse: collapse;
}

.compression-stats tr {
    border-bottom: 1px solid #dee2e6;
}

.compression-stats tr:last-child {
    border-bottom: none;
}

.compression-stats td {
    padding: 6px;
}

.compression-stats td:first-child {
    font-weight: bold;
    color: #495057;
    width: 50%;
}

.compression-stats td:last-child {
    color: #007bff;
    text-align: right;
    font-family: 'Courier New', monospace;
}

.transfer-status {
    margin-top: 10px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    min-height: 20px;
}

.file-transfer-log {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    color: #495057;
    max-height: 100px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.video-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.video-box {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    text-align: center;
    width: 400px;
}

.video-box h2 {
    color: #007bff;
    margin-top: 0;
}

video {
    width: 100%;
    max-width: 400px;
    height: auto;
    background-color: #000;
    border-radius: 4px;
    transform: scaleX(-1); /* Mirror local video */
}

/* 파일 갤러리 */
.file-gallery {
    margin-top: 20px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    min-height: 20px;
}

.file-gallery img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.file-gallery img:hover {
    transform: scale(1.05);
}

/* File Request Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
    margin: auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

/* 모달 스크롤바 스타일 */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.file-request-details {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.file-request-details p {
    margin: 8px 0;
    font-size: 14px;
}

.file-request-details strong {
    color: #495057;
    display: inline-block;
    width: 120px;
}

.file-request-details span {
    color: #007bff;
    font-family: 'Courier New', monospace;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-accept,
.btn-reject {
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-accept {
    background-color: #28a745;
    color: white;
}

.btn-accept:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-reject {
    background-color: #dc3545;
    color: white;
}

.btn-reject:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(90, 98, 104, 0.3);
}
