/*
 * Surge.Live Modern UI Theme
 * Updated for 2025 with modern design patterns
 */

:root {
    /* Brand Colors */
    --surge-primary: #4f86f7;
    --surge-primary-light: #6b9bff;
    --surge-primary-dark: #3b6fd9;
    --surge-secondary: #9b5cf6;
    --surge-secondary-light: #b37fff;
    --surge-success: #10b981;
    --surge-danger: #ef4444;
    --surge-warning: #f59e0b;
    --surge-info: #06b6d4;

    /* Background Colors */
    --surge-dark: #0f0f23;
    --surge-darker: #0a0a1a;
    --surge-darkest: #05050f;
    --surge-light: #f8fafc;
    --surge-gray: #64748b;
    --surge-accent: #e11d48;

    /* Text Colors - Enhanced for Legibility */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.65);
    --text-dim: rgba(255, 255, 255, 0.45);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4f86f7 0%, #9b5cf6 100%);
    --gradient-primary-hover: linear-gradient(135deg, #3b6fd9 0%, #8847e3 100%);
    --gradient-dark: linear-gradient(180deg, #0f0f23 0%, #0a0a1a 50%, #05050f 100%);
    --gradient-accent: linear-gradient(135deg, #e11d48 0%, #f59e0b 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(79, 134, 247, 0.15) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(155, 92, 246, 0.15) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
                      radial-gradient(at 0% 100%, rgba(239, 68, 68, 0.1) 0px, transparent 50%);

    /* Enhanced Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(79, 134, 247, 0.3);
    --shadow-glow-hover: 0 0 30px rgba(79, 134, 247, 0.5);

    /* Border Radius */
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-hover: rgba(255, 255, 255, 0.12);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--surge-darkest);
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Better scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Typography - Enhanced Legibility */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-primary);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.875rem);
    color: var(--text-secondary);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Modern Buttons - Enhanced */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    border: none;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    font-weight: 700;
    box-shadow: var(--shadow), var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--gradient-primary-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow-hover);
    color: var(--text-primary);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}

.btn-success {
    background: var(--surge-success);
    color: var(--text-primary);
    box-shadow: var(--shadow), 0 0 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #0d9668;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: var(--surge-danger);
    color: var(--text-primary);
    box-shadow: var(--shadow), 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(239, 68, 68, 0.5);
}

.btn-warning {
    background: var(--surge-warning);
    color: var(--surge-darkest);
    font-weight: 700;
    box-shadow: var(--shadow), 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: #d97706;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(245, 158, 11, 0.5);
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.0625rem;
    border-radius: var(--border-radius-xl);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Modern Cards - Enhanced Glass Effect */
.card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.05));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
}

.card-header h3,
.card-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.card-body {
    padding: 2rem;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
}

/* Modern Forms - Enhanced */
.form-control,
.form-input {
    display: block;
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border: 1.5px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-control:focus,
.form-input:focus {
    outline: none;
    border-color: var(--surge-primary);
    box-shadow: 0 0 0 3px rgba(79, 134, 247, 0.15),
                inset 0 1px 2px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(79, 134, 247, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.11));
}

.form-control::placeholder,
.form-input::placeholder {
    color: var(--text-dim);
}

.form-label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

/* Modern Modals */
.modal,
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    animation: modalBackdropFadeIn 0.3s ease-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
}

@keyframes modalBackdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.show,
.modal-backdrop.show {
    display: flex;
}

.modal-dialog,
.modal-backdrop > .modal {
    position: relative;
    width: auto;
    margin: 1.5rem;
    max-width: 520px;
    pointer-events: auto;
    width: 100%;
}

.modal-content,
.modal-backdrop .modal {
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.98), rgba(10, 10, 26, 0.98));
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-2xl);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow: var(--shadow-2xl), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}

.modal-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.875rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.15);
}

.close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.close:hover,
.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Group */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Text Utilities */
.text-muted {
    color: var(--text-muted);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* User List Styles */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(79, 134, 247, 0.3);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: rgba(79, 134, 247, 0.2);
    border: 1px solid rgba(79, 134, 247, 0.5);
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-badge.host {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}

/* Navigation */
.navbar {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Status Indicators */
.status-online {
    color: var(--surge-success);
}

.status-offline {
    color: var(--surge-gray);
}

.status-error {
    color: var(--surge-danger);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Room Interface Improvements */
.room-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.video-container {
    position: relative;
    background: #000000;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-xl);
}

.chat-container {
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.user-list {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .room-container {
        padding: 1rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
*:focus {
    outline: 2px solid var(--surge-primary);
    outline-offset: 2px;
}

button:focus,
.btn:focus {
    outline: 2px solid var(--surge-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #ffffff;
    }

    .form-control {
        border: 2px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================== */
/* SURGE ROOM LAYOUT */
/* ===================== */

/* Navbar - Enhanced */
.surge-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.98), rgba(10, 10, 26, 0.95));
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: var(--shadow-lg), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.surge-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.surge-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.surge-navbar-brand:hover {
    color: var(--surge-primary-light);
    transform: scale(1.02);
}

.surge-navbar-brand img {
    height: 42px;
    width: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(79, 134, 247, 0.3));
}

.surge-navbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.surge-navbar-right {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.navbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.125rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.navbar-badge:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.11));
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-badge.live {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.2));
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    animation: pulse 2s infinite;
    box-shadow: var(--shadow-sm), 0 0 15px rgba(239, 68, 68, 0.3);
}

.navbar-badge.controller {
    background: linear-gradient(135deg, rgba(79, 134, 247, 0.25), rgba(59, 110, 217, 0.2));
    border-color: rgba(79, 134, 247, 0.5);
    color: #93c5fd;
    box-shadow: var(--shadow-sm), 0 0 15px rgba(79, 134, 247, 0.2);
}

/* Main Container - Enhanced */
.surge-container {
    min-height: 100vh;
    padding-top: 72px;
    position: relative;
}

.surge-main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2.5rem;
}

.surge-content {
    width: 100%;
}

/* Join Screen - Enhanced */
.join-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 172px);
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
}

.join-screen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 134, 247, 0.15), transparent 70%);
    pointer-events: none;
    filter: blur(40px);
}

.join-screen h1 {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.join-screen p {
    font-size: 1.1875rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.join-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

/* Video Section - Enhanced */
.video-wrapper {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: linear-gradient(135deg, #000000, #0a0a0a);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl), 0 0 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 134, 247, 0.05), transparent);
    pointer-events: none;
    z-index: 1;
}

.video-container video,
.video-container iframe,
.video-container #video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Room Controls - Enhanced */
.room-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.06));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.room-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.room-controls .btn {
    flex: 1 1 auto;
    min-width: 150px;
}

/* Chat Panel - Enhanced */
.chat-panel {
    position: fixed;
    top: 72px;
    right: 0;
    width: 400px;
    height: calc(100vh - 72px);
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.98), rgba(10, 10, 26, 0.98));
    backdrop-filter: blur(24px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    display: none;
    flex-direction: column;
    z-index: 999;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5), inset 1px 0 0 rgba(255, 255, 255, 0.05);
}

.chat-panel.active {
    display: flex;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chat-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.chat-header h3 i {
    color: var(--surge-primary-light);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    background: rgba(0, 0, 0, 0.1);
}

.chat-message {
    display: flex;
    gap: 0.875rem;
    animation: fadeInUp 0.3s ease-out;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: background 0.2s ease;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.03);
}

.chat-message-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79, 134, 247, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.chat-message.system .chat-message-avatar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.chat-message-content {
    flex: 1;
    min-width: 0;
}

.chat-message-user {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.chat-message-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    word-wrap: break-word;
    word-break: break-word;
}

.chat-input-container {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15));
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.625rem;
}

.chat-input {
    flex: 1;
    padding: 0.875rem 1.125rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.chat-input:focus {
    outline: none;
    border-color: var(--surge-primary);
    box-shadow: 0 0 0 3px rgba(79, 134, 247, 0.15),
                0 0 20px rgba(79, 134, 247, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.11));
}

.chat-input::placeholder {
    color: var(--text-dim);
}

/* Alert Messages - Enhanced */
.alert {
    padding: 1.25rem 1.75rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    font-weight: 500;
    backdrop-filter: blur(20px) saturate(180%);
    animation: fadeInUp 0.4s ease-out;
    box-shadow: var(--shadow-lg);
    border: 1.5px solid;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.alert i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.15));
    border-color: rgba(16, 185, 129, 0.6);
    color: #6ee7b7;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(16, 185, 129, 0.2);
}

.alert-success i {
    color: #34d399;
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.15));
    border-color: rgba(239, 68, 68, 0.6);
    color: #fca5a5;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(239, 68, 68, 0.2);
}

.alert-error i {
    color: #f87171;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.15));
    border-color: rgba(245, 158, 11, 0.6);
    color: #fcd34d;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(245, 158, 11, 0.2);
}

.alert-warning i {
    color: #fbbf24;
}

.alert-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(6, 182, 212, 0.15));
    border-color: rgba(6, 182, 212, 0.6);
    color: #67e8f9;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(6, 182, 212, 0.2);
}

.alert-info i {
    color: #22d3ee;
}

/* Button Variants - Enhanced */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    box-shadow: none;
    transition: all 0.2s ease;
}

.btn-ghost::before {
    opacity: 0;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(0);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-icon i {
    font-size: 1.125rem;
}

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

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 1rem;
}

.flex {
    display: flex;
}

.gap-3 {
    gap: 0.75rem;
}

.justify-center {
    justify-content: center;
}

.hide-mobile {
    display: inline;
}

.btn-text {
    display: inline;
}

/* Responsive Adjustments - Enhanced */
@media (max-width: 1200px) {
    .surge-main {
        padding: 2rem;
    }

    .room-controls .btn {
        min-width: 130px;
    }
}

@media (max-width: 1024px) {
    .chat-panel {
        width: 100%;
        max-width: 400px;
    }

    .surge-main {
        padding: 1.75rem;
    }

    .room-controls {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .surge-navbar {
        padding: 0 1.25rem;
        height: 64px;
    }

    .surge-navbar-brand {
        font-size: 1.125rem;
    }

    .surge-navbar-brand img {
        height: 36px;
        width: 36px;
    }

    .surge-navbar-brand span {
        font-size: 1rem;
    }

    .hide-mobile {
        display: none;
    }

    .surge-navbar-center {
        display: none;
    }

    .navbar-badge {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    .chat-panel {
        width: 100%;
        max-width: none;
        top: 64px;
        height: calc(100vh - 64px);
    }

    .surge-container {
        padding-top: 64px;
    }

    .surge-main {
        padding: 1.25rem;
    }

    .video-container {
        border-radius: var(--border-radius-lg);
    }

    .room-controls {
        gap: 0.625rem;
        padding: 1.25rem;
        flex-direction: column;
    }

    .room-controls .btn {
        min-width: auto;
        width: 100%;
        flex: 1 1 auto;
    }

    .btn-text {
        display: inline;
    }

    .btn-icon {
        width: 48px;
        height: 48px;
    }

    .join-screen {
        padding: 1.5rem 1rem;
        min-height: calc(100vh - 124px);
    }

    .join-screen::before {
        width: 400px;
        height: 400px;
    }

    .join-screen h1 {
        font-size: 2rem;
    }

    .join-screen p {
        font-size: 1rem;
    }

    .join-form {
        max-width: 100%;
    }

    .card-body {
        padding: 1.5rem;
    }

    .modal-dialog {
        margin: 1rem;
    }

    .chat-header {
        padding: 1.25rem 1rem;
    }

    .chat-messages {
        padding: 1rem;
    }

    .chat-input-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .surge-navbar {
        padding: 0 1rem;
        height: 60px;
    }

    .surge-navbar-brand {
        font-size: 1rem;
    }

    .surge-navbar-brand img {
        height: 32px;
        width: 32px;
    }

    .surge-container {
        padding-top: 60px;
    }

    .chat-panel {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .surge-main {
        padding: 1rem;
    }

    .room-controls {
        padding: 1rem;
        gap: 0.5rem;
    }

    .btn {
        padding: 0.625rem 1.125rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .join-screen {
        padding: 1rem;
        min-height: calc(100vh - 100px);
    }

    .join-screen h1 {
        font-size: 1.75rem;
    }

    .alert {
        padding: 1rem 1.25rem;
        font-size: 0.875rem;
    }
}