* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f8fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 480px;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

h1 {
    color: #2563eb;
    margin-bottom: 2rem;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
	
input:disabled {
	background-color: #ccc; /* Gray background */
	color: #888; /* Gray text */
	cursor: not-allowed;
	border: 1px solid #aaa;
}

button {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    background-color: #1d4ed8;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
	background-color: #ccc; /* Gray background */
	color: #888; /* Gray text */
	cursor: not-allowed;
	border: 1px solid #aaa;
}

.error {
	color: red;
	font-weight: bold;
	margin-bottom: 10px;
}

/* Loading animation */
.loader {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    margin: 0 auto;
	margin-top: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
/* --- */
/* user list */
.user-list {
    list-style: none;
    margin-top: 1.5rem;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.user-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-item:last-child {
    border-bottom: none;
}

.user-item:hover {
    background-color: #f3f4f6;
}

.user-item .call-btn {
    padding: 8px 16px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.user-item:hover .call-btn {
    opacity: 1;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 8px;
}

.user-info {
    display: flex;
    align-items: center;
}
/* --- */
/* call popup */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.call-popup {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 90%;
    max-width: 400px;
    animation: popup-appear 0.3s ease-out;
}

@keyframes popup-appear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.call-popup h2 {
    margin-bottom: 1rem;
    color: #2563eb;
}

.call-popup p {
    margin-bottom: 1.5rem;
    font-size: 18px;
}

.call-avatar {
    width: 80px;
    height: 80px;
    background-color: #e5e7eb;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    color: #6b7280;
}

.call-status {
	justify-content: center;
}

#call-status-text {
	display: block;
	padding: 5px;
}

.call-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #abcdef;
    border-radius: 50%;
    margin-right: 8px;
}

.pulse {
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(0.8);
    }
}
/* --- */
/* call screen */
.call-screen {
	max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center; /* center items horizontally */
    justify-content: center; /* center items vertically */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    color: white;
}

#call-with-user {
    margin-bottom: 10px;
    font-size: 1.2em;
	color: black;
}

#call-timer {
    font-size: 1.5em;
    margin-bottom: 20px;
	color: black;
}

.video-container {
    position: relative;
    background-color: black; /* Fallback background for video areas */
}

#remote-video-container {
    width: 90%;
    max-width: 960px; /* Optional: adjust maximum width */
    aspect-ratio: 16 / 9;
    margin-bottom: 20px;
}

#remote-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#local-video-container {
    width: 30%;
    max-width: 240px; /* Optional: adjust maximum width */
    aspect-ratio: 16 / 9;
    position: absolute;
    bottom: 20px;
    right: 20px;
    border: 2px solid white;
    border-radius: 5px;
    overflow: hidden;
}

#local-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#laserpointer-overlay {
	display: none;
	position: absolute;
	pointer-events: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 50, 50, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.call-controls {
    display: flex;
    align-items: center;
}

.call-controls-left {
    display: flex;
	align-items: center;
    gap: 20px;
}

.control-btn {
    padding: 10px 15px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #333;
    color: white;
    position: relative;
}

.control-btn.end-call {
    background-color: #881133;
	margin-left: 20px;
}

.control-btn:hover {
    opacity: 0.8;
}

.control-btn.deactivated::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 10%;
	width: 80%;
	border-bottom: 2px solid red; /* Adjust color and thickness */
	transform: translateY(-50%) rotate(-15deg); /* Adjust angle if needed */
}

/* Responsive adjustments (optional) */
@media (max-width: 768px) {
    #remote-video-container {
        width: 95%;
        max-width: none;
        margin-bottom: 15px;
    }

    #local-video-container {
        width: 40%; /* Adjust local video size on smaller screens */
        max-width: 180px;
        bottom: 10px;
        right: 10px;
    }

    .call-controls-centered {
        gap: 10px;
    }

    .control-btn {
        padding: 8px 12px;
        font-size: 1em;
    }
}
/* --- */

.hidden {
    display: none;
}
