:root {
    --primary-gradient: linear-gradient(135deg, #58447f 0%, #58447f 50%, #58447f 100%);
    --secondary-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --purple-primary: #7c3aed;
    --purple-dark: #6d28d9;
    --purple-light: #58447f;
    --yellow-primary: #fbbf24;
    --yellow-dark: #f59e0b;
    --success-color: #10b981;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.18);
}

body {
    background: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
.btn-primary,
button.btn-primary,
.btn.btn-primary {
    color: #fff !important;
    background-color: #58447f !important;
    border-color: #58447f !important;
}

.btn-primary:hover,
.btn-primary:focus,
button.btn-primary:hover,
button.btn-primary:focus,
.btn.btn-primary:hover,
.btn.btn-primary:focus {
    background-color: #58447f !important;
    border-color: #58447f !important;
    color: #fff !important;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}


.container-fluid {
    padding: 12px;
}

.video-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-wrapper {
    position: relative;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 15px;
}

.video-wrapper h6 {
    color: white;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.local-video {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #7c3aed;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

.remote-video {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #7c3aed;
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.4);
}


.connection-status {
    position: absolute;
    top: 11px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

.connected-users-count {
    position: absolute;
    top: 6px;
    left: 20px;
    background: rgba(40, 167, 69, 0.9);    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.connected-users-count i {
    font-size: 1em;
}

.connected-users-count span {
    font-size: 1.1em;
}

.call-controls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.call-controls button {
    margin: 0 8px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.call-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.chat-container {
    height: 650px;
}

.chat-container .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 20px;
    max-width: 85%;
    word-wrap: break-word;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.own {
    background: linear-gradient(135deg, #58447f, #58447f);
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.other {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #333;
}

.message-info {
    font-size: 0.75em;
    opacity: 0.8;
    margin-top: 6px;
    font-style: italic;
}

/* Personal message sent - align to right (sender's own message) */
.message.personal-message.sent {
    background: linear-gradient(135deg, #58447f, #58447f);
    color: white;
    margin-left: auto;
    text-align: right;
}

/* Personal message received - align to left (received message) */
.message.personal-message.received {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #333;
}

.personal-message-header {
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.9;
}

.users-list {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-badge {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
    transition: transform 0.2s ease;
}

.user-badge:hover {
    transform: scale(1.05);
}

/* Status Colors */
.status-online {
    color: #fbbf24;
}

.status-offline {
    color: #dc3545;
}

.status-connecting {
    color: #ffc107;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Home Page Styling */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    background: linear-gradient(135deg, #58447f, #58447f) !important;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error Alerts */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }

    .video-container {
        padding: 15px;
    }

    .video-container .row>div {
        margin-bottom: 3px;
    }

    .call-controls button {
        width: 45px;
        height: 45px;
        margin: 0 6px;
        font-size: 16px;
    }

    .chat-container {
        margin-top: 20px;
        height: 500px;
    }

    .chat-messages {
        height: 300px;
    }

    .local-video {
        height: 400px;
    }
    
    .remote-video {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .call-controls {
        padding: 12px;
    }

    .call-controls button {
        width: 40px;
        height: 40px;
        font-size: 14px;
        margin: 0 4px;
    }

    .video-wrapper {
        padding: 10px;
    }

    .chat-messages {
        height: 370px;
    }

    .local-video {
        height: 300px;
    }
    
    .remote-video {
        height: 300px;
    }
}


/* Add to public/css/style.css */

.connection-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.user-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.user-status {
    font-size: 0.7em;
}

.status-offline .user-badge {
    opacity: 0.6;
    text-decoration: line-through;
}

/* Animation for user leaving */
.user-leaving {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.8);
    }
}








@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

.main-container {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
}

.hero-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header-custom {
    background: var(--primary-gradient);
    padding: 2.5rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.card-header-custom::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.card-header-custom h3 {
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

.card-header-custom i {
    font-size: 2rem;
    margin-right: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.card-body-custom {
    padding: 3rem;
}

.form-label {
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control-custom {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control-custom:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    transform: translateY(-2px);
}

.btn-join,
button.btn-join,
.btn.btn-join {
    background: #58447f !important;
    border: none !important;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 68, 127, 0.4);
    position: relative;
    overflow: hidden;
    color: #fff !important;
}

.btn-join::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-join:hover::before {
    width: 300px;
    height: 300px;
}

.btn-join:hover,
button.btn-join:hover,
.btn.btn-join:hover {
    background: #58447f !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(88, 68, 127, 0.5);
    color: #fff !important;
}

.btn-join:active,
button.btn-join:active,
.btn.btn-join:active {
    background: #58447f !important;
    transform: translateY(-1px);
    color: #fff !important;
}

.btn-join i {
    margin-right: 0.5rem;
    position: relative;
    z-index: 1;
}

.btn-join span {
    position: relative;
    z-index: 1;
}

.info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateX(8px);
}

.info-card h5 {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(8px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    }

    50% {
        box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
    }
}

.feature-icon i {
    color: white;
    font-size: 1.125rem;
}

.feature-text {
    color: #374151;
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .main-container {
        padding: 2rem 0;
    }

    .card-header-custom,
    .card-body-custom {
        padding: 2rem;
    }

    .card-header-custom h3 {
        font-size: 1.5rem;
    }
}

.input-group-icon {
    position: relative;
}

.input-group-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 10;
}

.input-group-icon .form-control-custom {
    padding-left: 3rem;
}

.modern-navbar {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar-brand-custom {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: #58447f !important;
    text-shadow: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.navbar-brand-custom:hover {
    transform: translateY(-2px);
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
}

.brand-logo {
    width: 200px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.6rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.room-badge {
    background: #58447f;
    backdrop-filter: none;
    border: 1px solid rgba(88, 68, 127, 0.3);
    padding: 0.25rem 0.85rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(88, 68, 127, 0.2);
    transition: all 0.3s ease;
    animation: fadeInRight 0.5s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.room-badge:hover {
    background: #58447f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 68, 127, 0.3);
}

.room-badge i {
    margin-right: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.room-id-text {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    color: #f3f3f3;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .brand-title {
        font-size: 0.8rem;
    }
    
    .brand-subtitle {
        font-size: 0.5rem;
    }
    
    .brand-logo {
        width: 160px;
        max-height: 70px;
    }
    
    .room-badge {
        padding: 0.2rem 0.7rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .brand-logo {
        width: 140px;
        max-height: 60px;
    }
    
    .room-badge {
        padding: 0.2rem 0.65rem;
        font-size: 0.7rem;
    }
    
    .room-id-text {
        font-size: 0.75rem;
    }
}

/* Navbar background removed - using solid white */

/* Toast Notifications - Fixed position, no screen movement */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    pointer-events: none;
}

#toast-container .alert {
    pointer-events: auto;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    animation: slideInRight 0.3s ease-out;
}

/* Toast Animation - Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Toast Animation - Slide out to right */
@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Responsive toast for mobile */
@media (max-width: 576px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}

/* Viewer Exit Button - Positioned on black video screen (WhatsApp style) */
.viewer-exit-button {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* Position exit button within video wrapper for viewers */
#remoteVideos .video-wrapper {
    position: relative;
}

#remoteVideos .video-wrapper .viewer-exit-button {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    pointer-events: auto;
}

.btn-exit-call {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #dc3545;
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 30px rgba(220, 53, 69, 0.6), 0 0 0 4px rgba(220, 53, 69, 0.2);
    transition: all 0.3s ease;
    animation: pulseExit 2s ease-in-out infinite;
}

.btn-exit-call:hover {
    background: #c82333;
    transform: scale(1.15);
    box-shadow: 0 8px 35px rgba(220, 53, 69, 0.8), 0 0 0 6px rgba(220, 53, 69, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-exit-call:active {
    transform: scale(1.05);
}

.btn-exit-call i {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes pulseExit {
    0%, 100% {
        box-shadow: 0 6px 30px rgba(220, 53, 69, 0.6), 0 0 0 4px rgba(220, 53, 69, 0.2);
    }
    50% {
        box-shadow: 0 6px 35px rgba(220, 53, 69, 0.8), 0 0 0 6px rgba(220, 53, 69, 0.3);
    }
}

/* Responsive exit button */
@media (max-width: 768px) {
    #remoteVideos .video-wrapper .viewer-exit-button {
        bottom: 25px;
    }
    
    .btn-exit-call {
        width: 65px;
        height: 65px;
        font-size: 26px;
    }
}

@media (max-width: 576px) {
    #remoteVideos .video-wrapper .viewer-exit-button {
        bottom: 20px;
    }
    
    .btn-exit-call {
        width: 60px;
        height: 60px;
        font-size: 24px;
        border-width: 2px;
    }
    
    .connected-users-count {
        position: absolute;
        top: 6px;
        left: 20px;
        background: rgba(40, 167, 69, 0.9);
        color: white;
        padding: 3px 5px;
        border-radius: 20px;
        font-size: 0.9em;
        font-weight: 400;
        z-index: 10;
        display: flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
   
    
}

/* Custom Tooltips */
.tooltip-btn {
    position: relative;
}

.tooltip-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: #6b7280;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tooltip-btn::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 5px solid transparent;
    border-top-color: #6b7280;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.tooltip-btn:hover::before,
.tooltip-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.tooltip-btn:hover::after {
    transform: translateX(-50%) translateY(-6px);
}

.video-controls{
    margin-top: 5px;
}
