﻿@font-face {
    font-family: 'IRANSansWeb';
    src: url('/fonts/IRANSansWeb/IRANSansWeb_Light.ttf') format('truetype'), url('/fonts/IRANSansWeb/IRANSansWeb_Bold.ttf') format('truetype'), url('/fonts/IRANSansWeb/IRANSansWeb_Medium.ttf') format('truetype'), url('/fonts/IRANSansWeb/IRANSansWeb_UltraLight.ttf') format('truetype'), url('/fonts/IRANSansWeb/IRANSansWeb_Black.ttf') format('truetype'), url('/fonts/IRANSansWeb/IRANSansWeb.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
.video-frame:empty, .video-container div:empty {
    display: none;
}
body {
    margin: 0;
    font-family: 'IRANSansWeb', sans-serif;
    /*background: linear-gradient(135deg, #4e54c8, #8f94fb);*/
    color: #fff;
    height: 100vh;
    overflow: hidden;
    direction: rtl;
}
/*error*/
.error-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 10px;
    height: calc(100vh - 20px);
}

.error-container {
    text-align: center;
    max-width: 500px;
    border: 2px solid #e63946;
    background-color: white;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin: 10px;
}

    .error-container h1 {
        color: #e63946;
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .error-container p {
        font-size: 1rem;
        color: #495057;
        line-height: 1.2;
    }

    .error-container img {
        width: 100%;
        max-width: 100px;
        margin-top: 20px;
        animation: scaleImage 0.5s infinite alternate;
    }

@keyframes scaleImage {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}


.video-call-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    text-align: center;
}

.video-call-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

    .video-call-header h1 {
        margin: 0;
        font-size: 1.8rem;
    }

    .video-call-header p {
        margin: 5px 0;
        font-size: 1.2rem;
    }

.video-container {
    flex-grow: 1;
    background: black;
    width: 100%;
    position: relative;
}

video {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.video-frame {
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    background: #000;
}


    .video-frame.current-user {
        position: fixed;
        bottom: 120px;
        right: 10px;
        width: 120px;
        height: 180px;
        z-index: 10;
        border-radius: 12px;
    }

        .video-frame.current-user video {
            border-radius: 12px;
        }


@media (max-width: 768px) {
    .video-frame.current-user {
        width: 100px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .video-frame.current-user {
        width: 80px;
        height: 120px;
    }
}

.video-frame:not(.current-user) {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}

.video-call-footer {
    display: flex;
    justify-content: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
}

.control-btn {
    width: 50px;
    height: 50px;
    margin: 0 10px;
    border: none;
    border-radius: 50%;
    background: #ff4757;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

    .control-btn:hover {
        transform: scale(1.1);
        background: #ff6f61;
    }

.end-call {
    background: #e74c3c;
}

    .end-call:hover {
        background: #ff6f61;
    }

/*call btns*/
.video-call-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    max-width: 100%;
}

.control-btn {
    background-color: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

    .control-btn img {
        width: 24px;
        height: 24px;
        filter: brightness(0) invert(0.5);
    }

    .control-btn.end-call {
        background-color: #ff5c5c;
    }

        .control-btn.end-call img {
            filter: brightness(0) invert(1);
        }

    .control-btn:active {
        transform: scale(0.9);
    }

    .control-btn:hover {
        background-color: #e0e0e0;
    }

    .control-btn.end-call:hover {
        background-color: #ff4d4d;
    }


@media (max-width: 480px) {
    .video-call-footer {
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }

        .control-btn img {
            width: 20px;
            height: 20px;
        }
}

@media (max-width: 768px) {
    .video-call-footer {
        padding: 10px 15px;
        gap: 15px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }

        .control-btn img {
            width: 22px;
            height: 22px;
        }
}

/*loader*/
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem 1.5rem;
    background: rgba(240, 240, 240, 0.9);
    color: #333;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    backdrop-filter: blur(10px);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

    .loader span {
        display: inline-block;
        animation: waveText 1.8s infinite ease-in-out;
    }

@keyframes waveText {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.3;
        transform: scale(1);
    }
}
/*call end*/
.end-call-container {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


    .end-call-container p {
        font-size: 20px;
        color: #555;
        font-weight: bold;
        margin-bottom: 10px;
    }

.end-call-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}
/*call request*/
.call-request-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f2f5;
    font-family: 'IRANSansWeb', sans-serif;
    direction: rtl;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.call-request-container {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 24px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: slideUp 0.8s ease-in-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.call-request-container h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 16px;
    animation: fadeInText 1s ease-in-out;
}

.call-request-container p {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
    animation: fadeInText 1.2s ease-in-out;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.call-request-image {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeInButtons 1.5s ease-in-out;
}

@keyframes fadeInButtons {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.call-request-control-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

    .call-request-control-btn img {
        width: 24px;
        height: 24px;
        filter: brightness(0) invert(1);
    }

#accept-call {
    background-color: #25d366; 
}

    #accept-call:hover {
        background-color: #1eb65b;
        transform: scale(1.1);
    }

    #accept-call:active {
        transform: scale(0.9); 
    }

#reject-call {
    background: #e74c3c;
}

    #reject-call:hover {
        background: #ff6f61;
        transform: scale(1.1); 
    }

    #reject-call:active {
        transform: scale(0.9);
    }