* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background: #0b141a; color: #e9edef; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* Login & Modal */
.login-container, .modal-content { max-width: 380px; margin: auto; padding: 30px; background: #111b21; border-radius: 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.5); transform: translateY(50%); }
.login-container h2, .modal-content h3 { margin-bottom: 20px; color: #d1d7db; }
.modal-content p { font-size: 14px; color: #8696a0; margin-bottom: 20px; }
input { width: 100%; padding: 14px; margin: 10px 0; background: #2a3942; color: #d1d7db; border: none; border-radius: 8px; font-size: 16px; outline: none; }
button, .btn { padding: 14px; background: #00a884; color: #111b21; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; width: 100%; text-decoration: none; display: inline-block; transition: 0.2s; }
button:hover, .btn:hover { background: #008f6f; }

/* Chat App Layout */
.chat-app { display: flex; flex-direction: column; height: 100vh; background: #0b141a; }
header { background: #202c33; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #2a3942; box-shadow: 0 1px 3px rgba(0,0,0,0.2); z-index: 10; }
.user-info { font-size: 16px; font-weight: 500; }
.actions { display: flex; gap: 15px; align-items: center; }
.call-btn { background: transparent; color: #00a884; font-size: 20px; width: auto; padding: 5px; cursor: pointer; }
.call-btn:hover { background: rgba(255,255,255,0.1); border-radius: 50%; }
.logout-btn { background: #ef5350; padding: 8px 15px; width: auto; color: white; }

/* Video Call Area */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background: #0b141a; color: #e9edef; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* Login & Modal */
.login-container, .modal-content { max-width: 380px; margin: auto; padding: 30px; background: #111b21; border-radius: 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.5); transform: translateY(50%); }
.login-container h2, .modal-content h3 { margin-bottom: 20px; color: #d1d7db; }
.modal-content p { font-size: 14px; color: #8696a0; margin-bottom: 20px; }
input { width: 100%; padding: 14px; margin: 10px 0; background: #2a3942; color: #d1d7db; border: none; border-radius: 8px; font-size: 16px; outline: none; }
button, .btn { padding: 14px; background: #00a884; color: #111b21; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; width: 100%; text-decoration: none; display: inline-block; transition: 0.2s; }
button:hover, .btn:hover { background: #008f6f; }

/* Chat App Layout */
.chat-app { display: flex; flex-direction: column; height: 100vh; background: #0b141a; }
header { background: #202c33; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #2a3942; box-shadow: 0 1px 3px rgba(0,0,0,0.2); z-index: 10; }
.user-info { font-size: 16px; font-weight: 500; }
.actions { display: flex; gap: 15px; align-items: center; }
.call-btn { background: transparent; color: #00a884; font-size: 20px; width: auto; padding: 5px; cursor: pointer; }
.call-btn:hover { background: rgba(255,255,255,0.1); border-radius: 50%; }
.logout-btn { background: #ef5350; padding: 8px 15px; width: auto; color: white; }

/* Video Call Area - UPDATED FOR FULLSCREEN */
#video-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #000; z-index: 9999; display: none; }
#remote-video { width: 100%; height: 100%; object-fit: cover; }
#local-video { position: absolute; bottom: 90px; right: 20px; width: 110px; height: 150px; background: #222; object-fit: cover; border-radius: 12px; border: 2px solid #00a884; box-shadow: 0 4px 10px rgba(0,0,0,0.5); z-index: 10000; }
.end-call-btn { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); width: auto; background: #ef5350; border-radius: 30px; padding: 15px 40px; color: white; font-size: 18px; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.5); z-index: 10000; border: none; cursor: pointer; }

/* Messages Area */
.messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; background: #0b141a; }
.msg { padding: 12px 16px; border-radius: 12px; max-width: 75%; font-size: 15px; line-height: 1.4; position: relative; word-wrap: break-word; }
.msg.self { background: #005c4b; color: #e9edef; align-self: flex-end; border-top-right-radius: 0; }
.msg.other { background: #202c33; color: #e9edef; align-self: flex-start; border-top-left-radius: 0; }
.msg img, .msg video { max-width: 100%; border-radius: 8px; margin-top: 5px; }
.msg audio { max-width: 250px; margin-top: 5px; }
.msg a { color: #53bdeb; text-decoration: none; font-weight: bold; }

/* Input Area */
.input-area { display: flex; align-items: center; padding: 12px 15px; background: #202c33; gap: 10px; }
.input-area input[type="text"] { flex: 1; background: #2a3942; border-radius: 24px; padding: 12px 20px; margin: 0; color: #d1d7db; }
.icon-btn { background: transparent; color: #8696a0; font-size: 22px; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.2s; }
.icon-btn:hover { background: #2a3942; }
.send-btn { background: #00a884; color: #111b21; border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; font-size: 20px; padding: 0; }
#record-btn.recording { color: #ef5350; animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.modal { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(11,20,26,0.95); z-index: 1000; }
/* Messages Area */
.messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; background: #0b141a; }
.msg { padding: 12px 16px; border-radius: 12px; max-width: 75%; font-size: 15px; line-height: 1.4; position: relative; word-wrap: break-word; }
.msg.self { background: #005c4b; color: #e9edef; align-self: flex-end; border-top-right-radius: 0; }
.msg.other { background: #202c33; color: #e9edef; align-self: flex-start; border-top-left-radius: 0; }
.msg img, .msg video { max-width: 100%; border-radius: 8px; margin-top: 5px; }
.msg audio { max-width: 250px; margin-top: 5px; }
.msg a { color: #53bdeb; text-decoration: none; font-weight: bold; }

/* Input Area */
.input-area { display: flex; align-items: center; padding: 12px 15px; background: #202c33; gap: 10px; }
.input-area input[type="text"] { flex: 1; background: #2a3942; border-radius: 24px; padding: 12px 20px; margin: 0; color: #d1d7db; }
.icon-btn { background: transparent; color: #8696a0; font-size: 22px; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.2s; }
.icon-btn:hover { background: #2a3942; }
.send-btn { background: #00a884; color: #111b21; border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; font-size: 20px; padding: 0; }
#record-btn.recording { color: #ef5350; animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.modal { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(11,20,26,0.95); z-index: 1000; }