* { margin: 0; padding: 0; box-sizing: border-box; } :root { --bg-primary: #ffffff; --bg-secondary: #f8f9fa; --bg-tertiary: #e9ecef; --text-primary: #212529; --text-secondary: #6c757d; --text-muted: #adb5bd; --border-color: #dee2e6; --accent-color: #0d6efd; --success-color: #198754; --danger-color: #dc3545; --warning-color: #ffc107; --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175); } [data-theme="dark"] { --bg-primary: #212529; --bg-secondary: #2d3338; --bg-tertiary: #343a40; --text-primary: #f8f9fa; --text-secondary: #adb5bd; --text-muted: #6c757d; --border-color: #495057; --accent-color: #0d6efd; --success-color: #198754; --danger-color: #dc3545; --warning-color: #ffc107; --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3); --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5); } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif; background: var(--bg-primary); color: var(--text-primary); height: 100vh; overflow: hidden; transition: background-color 0.3s ease, color 0.3s ease; } /* Utility Classes */ .hidden { display: none !important; } /* Username Modal */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 1000; } .modal-content { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; text-align: center; max-width: 420px; width: 90%; box-shadow: var(--shadow-lg); animation: modalSlideIn 0.3s ease-out; } @keyframes modalSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .modal-header h2 { color: var(--text-primary); font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; } .modal-header p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.95rem; } .input-group { position: relative; margin-bottom: 1.5rem; } .input-group input { width: 100%; padding: 0.875rem 1rem; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-secondary); font-size: 1rem; color: var(--text-primary); transition: all 0.2s ease; outline: none; } .input-group input:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1); background: var(--bg-primary); } .input-group input::placeholder { color: var(--text-muted); } #joinButton { width: 100%; padding: 0.875rem 1rem; background: var(--accent-color); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; } #joinButton:hover { background: #0b5ed7; transform: translateY(-1px); box-shadow: var(--shadow); } /* Chat Interface */ #chatInterface { height: 100vh; display: flex; flex-direction: column; margin: 10px; height: calc(100vh - 20px); border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; background: var(--bg-primary); } /* Header */ .chat-header { background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; } .header-left h1 { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0; } #participantCount { color: var(--text-secondary); font-size: 0.9rem; background: var(--bg-primary); padding: 0.25rem 0.5rem; border-radius: 6px; border: 1px solid var(--border-color); } .header-btn { padding: 0.5rem 1rem; background: var(--accent-color); border: none; border-radius: 6px; cursor: pointer; color: white; font-size: 0.875rem; font-weight: 500; transition: all 0.2s ease; } .header-btn:hover { background: #0b5ed7; transform: translateY(-1px); } /* Main Chat Area */ .chat-main { flex: 1; position: relative; padding: 1rem; overflow: hidden; background: var(--bg-primary); } /* Video Grid */ .video-grid { display: flex; flex-wrap: wrap; gap: 1rem; height: 100%; justify-content: flex-start; align-items: flex-start; padding: 1rem; } .remoteVideoContainer { position: relative; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; min-width: 200px; aspect-ratio: 16 / 9; box-shadow: var(--shadow); transition: all 0.2s ease; } .remoteVideoContainer:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); } .remoteVideo { width: 100%; height: 100%; object-fit: cover; } .remoteUsername { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.8); color: white; padding: 0.5rem; font-size: 0.875rem; font-weight: 500; backdrop-filter: blur(10px); } /* Responsive grid sizing */ .remoteVideoContainer:only-child { width: min(70vw, 800px); } .video-grid:has(.remoteVideoContainer:nth-child(2)) .remoteVideoContainer { width: min(45vw, 500px); } .video-grid:has(.remoteVideoContainer:nth-child(3)) .remoteVideoContainer { width: min(30vw, 350px); } .video-grid:has(.remoteVideoContainer:nth-child(4)) .remoteVideoContainer { width: min(22vw, 280px); } /* Self View */ .self-view { position: fixed; bottom: 4rem; right: 1rem; width: 200px; aspect-ratio: 16 / 9; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); z-index: 200; } .self-view:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); } #selfVideo { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); /* Mirror effect */ } .self-view-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.8); color: white; padding: 0.25rem; font-size: 0.75rem; font-weight: 500; text-align: center; backdrop-filter: blur(10px); } /* Chat Controls */ .chat-controls { background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 1rem; display: flex; justify-content: center; gap: 1rem; } .control-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border: 1px solid var(--border-color); background: var(--bg-primary); border-radius: 8px; cursor: pointer; transition: all 0.2s ease; color: var(--text-primary); font-size: 0.875rem; font-weight: 500; } .control-btn:hover { background: var(--accent-color); color: white; border-color: var(--accent-color); transform: translateY(-1px); box-shadow: var(--shadow); } .control-btn span { font-size: 0.875rem; } .mute-btn.muted { background: #dc3545; color: white; border-color: #dc3545; } .mute-btn.muted:hover { background: #c82333; transform: translateY(-1px); } .video-btn.disabled { background: #dc3545; color: white; border-color: #dc3545; } .video-btn.disabled:hover { background: #c82333; transform: translateY(-1px); } .hangup-btn { background: #dc3545; color: white; border-color: #dc3545; } .hangup-btn:hover { background: #c82333; transform: translateY(-1px); } /* Mobile Responsiveness */ @media (max-width: 768px) { .chat-header { padding: 1rem; } .header-left h1 { font-size: 1.2rem; } .chat-main { padding: 0.5rem; } .remoteVideoContainer:only-child { width: 90vw; } .video-grid:has(.remoteVideoContainer:nth-child(2)) .remoteVideoContainer { width: 45vw; } .video-grid:has(.remoteVideoContainer:nth-child(3)) .remoteVideoContainer { width: 45vw; } .video-grid:has(.remoteVideoContainer:nth-child(4)) .remoteVideoContainer { width: 45vw; } .self-view { width: 120px; bottom: 6rem; } .chat-controls { gap: 0.5rem; padding: 0.75rem; } .control-btn { padding: 0.75rem; min-width: 60px; } .control-btn span { font-size: 0.8rem; } }