* { box-sizing: border-box; }
body { margin: 0; background: #EDE3DA; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
#app { max-width: 380px; margin: 20px auto; }
.phone { background: #FFF6EF; border-radius: 24px; overflow: hidden; border: 8px solid #2C1A22; min-height: 640px; display: flex; flex-direction: column; }
.screen { display: none; flex-direction: column; height: 640px; }
.screen.active { display: flex; }
.topbar { background: #3B2130; color: #FBEAE0; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { font-size: 19px; margin: 0; font-weight: 500; }
.tabs { display: flex; background: #3B2130; }
.tab { flex: 1; text-align: center; padding: 10px 0; color: #E8B9C6; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: #FBEAE0; border-bottom: 2px solid #E85C72; }
.list { overflow-y: auto; flex: 1; padding: 10px; }
.room, .conv { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; }
.room:hover, .conv:hover { background: #FBEAE0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; flex-shrink: 0; color: #fff; object-fit: cover; }
.name { font-size: 14px; font-weight: 500; color: #3B2130; margin: 0; }
.sub { font-size: 12px; color: #8A6B75; margin: 0; }
.badge { background: #E85C72; color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 7px; margin-left: auto; }
.chatmsgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #FFF6EF; }
.bubble { max-width: 75%; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.bubble.them { background: #F3D9DE; color: #3B2130; align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: #3B2130; color: #FBEAE0; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble img.photo-msg { width: 170px; border-radius: 10px; display: block; }
.audio-msg { display: flex; align-items: center; gap: 8px; }
.inputbar { position: relative; display: flex; align-items: center; gap: 6px; padding: 10px; background: #FBEAE0; border-top: 0.5px solid #E8B9C6; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #3B2130; cursor: pointer; flex-shrink: 0; font-size: 16px; background: none; border: none; }
.icon-btn:hover { background: #F3D9DE; }
.icon-btn.recording { background: #E85C72; color: #fff; }
.txt-input { flex: 1; border: none; background: #fff; border-radius: 16px; padding: 8px 12px; font-size: 13px; color: #3B2130; }
.send { width: 32px; height: 32px; border-radius: 50%; background: #E85C72; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; border: none; }
.call { background: #1B1218; height: 640px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; position: relative; }
.call video { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; background: #1B1218; }
.call-self { position: absolute; top: 14px; right: 14px; width: 78px; height: 110px; background: #3B2130; border-radius: 10px; border: 1px solid #6B4A57; overflow: hidden; z-index: 2; }
.call-self video { position: static; width: 100%; height: 100%; object-fit: cover; }
.call-remote-label { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 12px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.call-controls { position: relative; z-index: 2; display: flex; justify-content: center; gap: 16px; padding: 24px; }
.cbtn { width: 48px; height: 48px; border-radius: 50%; background: rgba(59,33,48,.85); display: flex; align-items: center; justify-content: center; font-size: 19px; cursor: pointer; border: none; color: #fff; }
.cbtn.hang { background: #E85C72; }
.back { cursor: pointer; font-size: 18px; }
.auth-screen { padding: 32px 24px; display: flex; flex-direction: column; gap: 12px; }
.auth-screen input, .auth-screen textarea, .auth-screen select { border: 0.5px solid #E8B9C6; border-radius: 10px; padding: 10px 12px; font-size: 13px; background: #fff; color: #3B2130; }
.auth-screen button.primary { background: #E85C72; color: #fff; border: none; border-radius: 10px; padding: 11px; font-size: 14px; cursor: pointer; }
.auth-link { text-align: center; font-size: 12px; color: #8A6B75; cursor: pointer; text-decoration: underline; }
.error-msg { background: #FCEBEB; color: #791F1F; font-size: 12px; padding: 8px 10px; border-radius: 8px; display: none; }
.profile-photo { height: 230px; background: #D4537E; display: flex; align-items: center; justify-content: center; color: #4B1528; position: relative; flex-shrink: 0; overflow: hidden; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-body { flex: 1; overflow-y: auto; padding: 16px; }
.stats-row { display: flex; gap: 10px; margin: 12px 0; }
.stat { flex: 1; background: #FBEAE0; border-radius: 10px; padding: 8px; text-align: center; }
.stat input { width: 100%; text-align: center; border: none; background: transparent; font-size: 15px; font-weight: 500; color: #3B2130; }
.stat-lbl { font-size: 10px; color: #8A6B75; margin: 2px 0 0; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; background: #E1F5EE; color: #085041; font-size: 11px; padding: 3px 10px; border-radius: 10px; }
.emoji-panel { display: none; position: absolute; bottom: 52px; left: 10px; right: 10px; background: #fff; border: 0.5px solid #E8B9C6; border-radius: 12px; padding: 10px; grid-template-columns: repeat(8,1fr); gap: 4px; max-height: 150px; overflow-y: auto; }
.emoji-panel.active { display: grid; }
.emoji-panel span { cursor: pointer; font-size: 18px; text-align: center; border-radius: 6px; padding: 4px 0; }
.emoji-panel span:hover { background: #F3D9DE; }
.incoming-call-banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: #3B2130; color: #FBEAE0; padding: 10px 16px; border-radius: 12px; font-size: 13px; display: none; z-index: 50; gap: 10px; align-items: center; }
.incoming-call-banner button { border: none; border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
