* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', Arial, sans-serif;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body {
    background-color: #f0f4f8;
    color: #333;
    direction: rtl;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Login Section */
#login-container {
    max-width: 400px;
    margin: 50px auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

button {
    background-color: #128C7E;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #075E54;
}

/* Call Container */
#call-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-section {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#online-users-list {
    list-style-type: none;
}

#online-users-list li {
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.call-button {
    background-color: #25D366;
    padding: 8px 15px;
    font-size: 14px;
}

.call-button:hover {
    background-color: #128C7E;
}

/* Video and Chat Container */
.video-chat-container {
    display: flex;
    gap: 20px;
}

/* Video Section */
.video-section {
    flex: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.video-container {
    background-color: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
}

.video-container p {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 10;
}

.video-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.control-button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    margin: 5px;
}

.control-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.call-actions {
    grid-column: span 2;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    gap: 15px;
}

.action-button {
    background-color: #128C7E;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
}

.action-button:hover {
    background-color: #075E54;
}

.action-button.end-call {
    background-color: #e74c3c;
}

.action-button.end-call:hover {
    background-color: #c0392b;
}

.muted, .video-off {
    background-color: #7f8c8d;
}

/* Chat Container */
.chat-container {
    flex: 1;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 400px;
    max-height: 100%;
}

.chat-header {
    padding: 15px;
    background-color: #128C7E;
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.received {
    background-color: #f0f0f0;
    align-self: flex-start;
}

.message.sent {
    background-color: #DCF8C6;
    align-self: flex-end;
}

.message-time {
    font-size: 12px;
    color: #888;
    text-align: right;
    margin-top: 5px;
}

.chat-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

#chat-input {
    flex: 1;
    padding: 10px;
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-radius: 20px;
}

#send-message-button {
    background-color: #128C7E;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
}

/* Call Dialog */
.call-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
}

.call-dialog p {
    margin-bottom: 20px;
    font-size: 18px;
}

.call-dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#accept-call-button {
    background-color: #25D366;
}

#accept-call-button:hover {
    background-color: #128C7E;
}

#reject-call-button {
    background-color: #e74c3c;
}

#reject-call-button:hover {
    background-color: #c0392b;
}

.call-status {
    text-align: center;
    padding: 15px;
    font-size: 18px;
    color: #7f8c8d;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-chat-container {
        flex-direction: column;
    }
    
    .video-section {
        grid-template-columns: 1fr;
    }
    
    .call-actions {
        grid-column: 1;
    }
    
    .chat-container {
        height: 300px;
    }
} 