Files
call-me/public/style.css
T
2025-07-20 22:28:36 +02:00

497 lines
8.8 KiB
CSS

/* Import font-family */
@import url('https://fonts.googleapis.com/css?family=Comfortaa:wght@500&display=swap');
/* Variables */
:root {
--border-radius: 10px;
--bg-color: #222;
--text-color: #fff;
--btn-size: 48px;
--btn-size-mobile: 40px;
--highlight-color: rgba(0, 0, 0, 0.1);
--fallback-bg: #222;
}
/* Global Styles */
* {
outline: none;
font-family: 'Comfortaa', sans-serif;
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: auto;
scroll-behavior: smooth;
}
body {
display: flex;
justify-content: center;
align-items: center;
background:
url('background.jpg') center/cover no-repeat fixed,
var(--fallback-bg);
will-change: background;
}
@media (max-width: 768px) {
body {
background-attachment: scroll;
}
}
/* Unsplash and Author attribution */
#attribution {
z-index: 3;
position: absolute;
padding: 10px;
bottom: 0;
right: 10px;
font-size: small;
color: var(--text-color);
background: var(--highlight-color);
border-radius: var(--border-radius);
}
/* Random image */
img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* Ensure the random image spans the entire screen */
#randomImage {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
/* Prevent buttons from inheriting the image as background */
button {
background: none;
color: inherit;
touch-action: manipulation; /* Prevent zoom and other default behaviors */
}
/* Swap camera mobile only */
#swapCameraBtn {
display: none;
}
/* Session Time */
#sessionTime {
z-index: 4;
display: none;
position: absolute;
text-align: center;
align-items: center;
padding: 5px;
top: 10px;
right: 20px;
font-size: 0.9rem;
font-weight: bold;
color: var(--text-color);
background: rgba(0, 0, 0, 0.5);
border-radius: var(--border-radius);
}
/* Room */
#roomPage {
position: absolute;
display: none;
}
/* Home Sign in */
#signInPage {
position: absolute;
display: none;
}
/* General Card Styles */
.card {
max-width: 90% !important;
margin: 0 auto !important;
color: var(--text-color) !important;
font-weight: bold !important;
border: none !important;
border-radius: var(--border-radius) !important;
background: rgba(0, 0, 0, 0.07) !important;
}
.card-header h1 {
margin-top: 15px;
}
/* Video Styles */
video {
width: 100%;
height: auto;
border: none;
border-radius: var(--border-radius);
object-fit: contain;
cursor: pointer;
}
video:hover {
filter: contrast(105%);
}
video::-webkit-media-controls {
display: none !important;
}
.mirror {
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
transform: rotateY(180deg);
}
/* Local Video Styles */
#localVideoContainer {
z-index: 3;
position: absolute;
top: 10px;
left: 20px;
width: 15vw;
height: 15vh;
border-radius: var(--border-radius);
border: none;
}
#localUsername {
position: absolute;
top: 0;
left: 0;
color: var(--text-color);
font-size: x-small;
border-radius: 5px;
margin: 5px;
}
/* Remote Video Styles */
#remoteVideo {
z-index: 1;
width: 100%;
background: rgba(0, 0, 0, 0.5);
border-radius: var(--border-radius);
border: none;
}
#streamStatusContainer {
z-index: 2;
display: inline-flex;
position: absolute;
text-align: center;
align-items: center;
gap: 10px;
padding: 8px 12px;
top: 10px;
left: 20px;
font-size: 1.2rem;
font-weight: bold;
border-radius: 12px;
}
/* Hide Local Video on Mobile */
@media (max-width: 768px) {
#localUsername {
font-size: 8px;
}
#remoteVideo {
height: 70vh;
object-fit: cover;
}
}
/* Hidden Elements */
.hide {
visibility: hidden;
opacity: 0;
}
.show {
visibility: visible;
opacity: 1;
}
input {
text-align: center;
}
/* Style the input field */
#usernameIn {
width: 100%;
padding: 10px 15px;
font-size: 16px;
color: var(--text-color);
border: 1px solid #ccc;
border-radius: 8px;
background: rgba(0, 0, 0, 0.5);
transition:
border-color 0.3s,
background-color 0.3s;
}
#usernameIn:hover {
border-color: #007bff;
}
/* Center Alignment */
.center {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* Custom button */
.btn-custom {
height: var(--btn-size);
width: var(--btn-size);
margin: 0.1rem;
border: none;
border-radius: 50px !important;
}
@media (max-width: 768px) {
.btn-custom {
height: var(--btn-size-mobile);
width: var(--btn-size-mobile);
}
.btn-custom i {
font-size: 12px;
}
}
/* GitHub div */
#githubDiv {
position: absolute;
top: 10px;
right: 10px;
}
/* User Sidebar Styles */
.user-sidebar {
z-index: 5;
position: fixed;
display: flex;
top: 0;
right: 0;
width: 320px;
height: 100vh;
background: rgba(30, 32, 36, 0.98);
flex-direction: column;
box-shadow: -2px 0 16px rgba(0, 0, 0, 0.25);
transition:
transform 0.3s ease,
opacity 0.3s;
transform: translateX(100%);
opacity: 0;
pointer-events: none;
}
.user-sidebar.active {
transform: translateX(0);
opacity: 1;
pointer-events: auto;
box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
animation: none !important;
}
/* User Sidebar Header */
.user-sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.5rem 1rem 0.5rem 1rem;
background: rgba(30, 32, 36, 0.98);
}
.user-sidebar-title {
font-weight: bold;
font-size: 1rem;
color: #fff;
}
.btn-exit-sidebar {
background: none;
border: none;
color: #fff;
font-size: 1.3rem;
padding: 0.2rem 0.5rem;
cursor: pointer;
transition: color 0.2s;
}
.btn-exit-sidebar:hover {
color: #d9534f;
}
/* User Search Bar */
.user-search-bar {
padding: 16px 16px 16px 16px;
background: #23242a;
}
#userSearchInput {
width: 100%;
padding: 8px 12px;
border-radius: 6px;
border: none;
background: #18191c;
color: #fff;
font-size: 1em;
outline: none;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
/* User List Styles */
.user-list {
flex: 1;
margin: 0;
padding: 0 0 16px 0;
list-style: none;
overflow-y: auto;
}
.user-list li {
padding: 12px 20px;
color: #fff;
cursor: pointer;
transition:
background 0.15s,
color 0.15s;
display: flex;
align-items: center;
font-size: 1.05em;
}
.user-list li:hover {
background: #2a2b31;
color: #ffd700;
}
.user-list li.selected {
background: #444;
color: #ffd700;
}
/* Swal2 custom theme */
.swal2-popup {
background: rgba(0, 0, 0, 0.5) !important;
color: var(--text-color) !important;
border: none !important;
}
.swal2-popup .swal2-styled:focus {
box-shadow: none !important;
}
.swal2-title {
color: var(--text-color) !important;
}
.swal2-actions .swal2-confirm {
background-color: #157346 !important;
color: var(--text-color) !important;
border: none !important;
}
.swal2-actions .swal2-cancel {
background-color: #666 !important;
color: var(--text-color) !important;
border: none !important;
}
.swal2-timer-progress-bar {
background-color: green !important;
}
/* Webkit-Scrollbar Styles */
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-thumb {
background: radial-gradient(#333, #000000);
border-radius: 5px;
cursor: pointer;
}
::-webkit-scrollbar-thumb:hover {
background-color: radial-gradient(#333, #000000);
}
::-webkit-scrollbar-track {
background: #1a1b1f;
}
.red {
background: red !important;
}
.color-red {
color: red !important;
}
/*--------------------------------------------------------------
# Pulse class effect
--------------------------------------------------------------*/
.pulsate {
animation: pulsate 3s ease-out;
animation-iteration-count: infinite;
-webkit-animation: pulsate 3s ease-out;
-webkit-animation-iteration-count: infinite;
opacity: 0.5;
}
@-webkit-keyframes pulsate {
0% {
opacity: 0.5;
}
50% {
opacity: 1;
}
100% {
opacity: 0.5;
}
}
@keyframes pulsate {
0% {
opacity: 0.5;
}
50% {
opacity: 1;
}
100% {
opacity: 0.5;
}
}
@-webkit-keyframes pulsate {
0% {
opacity: 0.5;
}
50% {
opacity: 1;
}
100% {
opacity: 0.5;
}
}
/*
z-index:
- 1. remoteVideo
- 2. streamStatusContainer
- 3. localVideoContainer, attribution
- 4. sessionTime
- 5. userSidebar
*/