:root{--bg:#0f172a;--surface:#1e293b;--surface-2:#334155;--border:#334155;--text:#e2e8f0;--text-muted:#94a3b8;--primary:#3b82f6;--primary-hover:#2563eb;--accent:#10b981;--accent-hover:#059669;--danger:#ef4444;--danger-hover:#dc2626;--white:#fff}*{box-sizing:border-box;margin:0;padding:0}body{background-color:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;line-height:1.6}h1,h2,h3{color:var(--text)}button{cursor:pointer;color:var(--white);border:none;border-radius:8px;font-size:1rem;font-weight:600;transition:background .2s,opacity .2s,transform .1s}button:active{transform:scale(.98)}.home-container{text-align:center;flex-direction:column;justify-content:center;max-width:800px;min-height:100vh;margin:0 auto;padding:2rem;display:flex}header{margin-bottom:2.5rem}header h1{color:var(--white);align-items:center;gap:.6rem;font-size:2.25rem;display:inline-flex}header h1 svg{color:var(--primary)}.form-container{background:var(--surface);border:1px solid var(--border);border-radius:16px;width:100%;max-width:500px;margin:0 auto;padding:2.5rem;box-shadow:0 10px 30px -10px #00000080}.form-container h2{margin-bottom:1.75rem;font-size:1.4rem}.input-group{text-align:left;margin-bottom:1.5rem}.input-group label{color:var(--text-muted);margin-bottom:.5rem;font-weight:500;display:block}.input-group input,.input-group select{border:1px solid var(--border);background:var(--bg);width:100%;color:var(--text);border-radius:8px;padding:.75rem;font-size:1rem;transition:border-color .2s,box-shadow .2s}.input-group input::placeholder{color:var(--text-muted)}.input-group input:read-only{opacity:.7;cursor:not-allowed}.input-group input:focus,.input-group select:focus{border-color:var(--primary);outline:none;box-shadow:0 0 0 3px #3b82f640}.button-group{gap:1rem;margin-top:2rem;display:flex}.button-group button{flex:1;justify-content:center;align-items:center;gap:.5rem;padding:.85rem;display:inline-flex}.btn-primary{background-color:var(--primary)}.btn-primary:hover{background-color:var(--primary-hover)}.btn-secondary{background-color:var(--surface-2)}.btn-secondary:hover{background-color:#475569}@media (width<=480px){.button-group{flex-direction:column}}.room-container{flex-direction:column;height:100vh;padding:1rem;display:flex}.room-header{flex-wrap:wrap;flex:none;justify-content:center;align-items:center;gap:.5rem 1rem;margin-bottom:1rem;display:flex}.room-header h2{font-size:1.25rem}.copy-link-btn{background:var(--surface-2);color:var(--text);border:1px solid var(--border);align-items:center;gap:.4rem;padding:.5rem .9rem;font-size:.85rem;display:inline-flex}.copy-link-btn:hover{background:#475569}.copy-link-btn.copied{background:var(--accent);color:var(--white);border-color:#0000}.room-content{flex-direction:column;flex:1;gap:1rem;display:flex;overflow:hidden}.video-section{background:#000;border-radius:16px;flex:1;position:relative;overflow:hidden;box-shadow:0 10px 30px -10px #0009}.controls-bar{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:20;background:#0f172abf;border:1px solid #ffffff1a;border-radius:40px;align-items:center;gap:12px;padding:10px 18px;display:flex;position:absolute;bottom:20px;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #00000073}.ctrl-btn{width:48px;height:48px;color:var(--white);background:#ffffff26;border-radius:50%;justify-content:center;align-items:center;padding:0;display:inline-flex}.ctrl-btn:hover{background:#ffffff47}.ctrl-btn.active{background:var(--danger)}.ctrl-btn.active:hover{background:var(--danger-hover)}.ctrl-btn.leave{background:var(--danger)}.ctrl-btn.leave:hover{background:var(--danger-hover)}.volume-control{color:var(--white);align-items:center;gap:8px;padding:0 4px;display:flex}.volume-control input[type=range]{cursor:pointer;width:80px;accent-color:var(--accent)}.video-box.remote{z-index:1;position:absolute;inset:0}.video-box.remote video{object-fit:cover;width:100%;height:100%}.waiting-overlay{z-index:5;color:var(--text-muted);text-align:center;background:radial-gradient(circle,#1e293b 0%,#0f172a 100%);flex-direction:column;justify-content:center;align-items:center;gap:1rem;padding:1rem;display:flex;position:absolute;inset:0}.waiting-spinner{border:3px solid #94a3b840;border-top-color:var(--primary);border-radius:50%;width:42px;height:42px;animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.local-wrapper{z-index:10;flex-direction:column;align-items:center;gap:8px;display:flex;position:absolute;top:20px;right:20px}.video-box.local{background:#222;border:2px solid #ffffff40;border-radius:10px;width:160px;height:100px;transition:transform .3s;overflow:hidden;box-shadow:0 10px 15px -3px #00000080}.video-box.local:hover{transform:scale(1.03)}.local-controls{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0f172ab3;border:1px solid #ffffff1a;border-radius:30px;gap:8px;padding:6px;display:flex;box-shadow:0 4px 15px #00000059}.local-controls .ctrl-btn{width:40px;height:40px}.video-box.local video{object-fit:cover;width:100%;height:100%;transform:scaleX(-1)}.chat-section{background:var(--surface);border:1px solid var(--border);border-radius:16px;flex-direction:column;flex:none;height:30vh;min-height:200px;display:flex;overflow:hidden;box-shadow:0 10px 30px -10px #00000080}.chat-messages{flex-direction:column;flex:1;gap:.5rem;padding:1rem;display:flex;overflow-y:auto}.system-msg{text-align:center;color:var(--text-muted);margin:.25rem 0;font-size:.8rem;font-style:italic}.msg-row{justify-content:flex-start;display:flex}.msg-row.me{justify-content:flex-end}.bubble{background:var(--surface-2);max-width:80%;color:var(--text);border-radius:12px 12px 12px 4px;padding:8px 12px}.msg-row.me .bubble{background:var(--primary);color:var(--white);border-bottom-right-radius:4px;border-bottom-left-radius:12px}.bubble-main{font-size:1rem}.bubble-sub{opacity:.75;border-top:1px solid #ffffff26;margin-top:6px;padding-top:6px;font-size:.75rem}.chat-input-area{border-top:1px solid var(--border);gap:.5rem;padding:.75rem;display:flex}.chat-input-area input{border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:8px;flex:1;padding:.75rem;font-size:1rem}.chat-input-area input::placeholder{color:var(--text-muted)}.chat-input-area input:focus{border-color:var(--primary);outline:none}.chat-input-area button{background:var(--accent);flex:none;justify-content:center;align-items:center;padding:0 1rem;display:inline-flex}.chat-input-area button:hover{background:var(--accent-hover)}@media (width>=768px){.room-container{padding:2rem}.room-content{flex-direction:row}.chat-section{width:320px;height:100%}.local-wrapper{top:30px;right:30px}.video-box.local{width:200px;height:130px}}@media (width>=1024px){.chat-section{width:380px}.video-box.local{width:250px;height:160px}}.conn-status{background:var(--surface);border:1px solid var(--border);color:var(--text-muted);z-index:100;border-radius:999px;align-items:center;gap:8px;padding:6px 12px;font-size:.8rem;display:flex;position:fixed;top:12px;right:12px}.conn-dot{border-radius:50%;flex-shrink:0;width:9px;height:9px}.conn-connecting .conn-dot{background:#f59e0b}.conn-connected .conn-dot{background:var(--accent)}.conn-failed .conn-dot{background:var(--danger)}.conn-failed{color:var(--danger)}.conn-retry{color:var(--primary);cursor:pointer;font-size:inherit;background:0 0;border:none;padding:0;text-decoration:underline}.conn-retry:hover{color:var(--primary-hover)}
