/* ========== CSS Variables & Reset ========== */
:root {
  --bg-primary: #0e1621;
  --bg-secondary: #17212b;
  --bg-tertiary: #1e2c3a;
  --bg-hover: #202d3b;
  --bg-active: #2b3d4f;
  --bg-message-out: #2b5278;
  --bg-message-in: #182533;
  --bg-input: #242f3d;
  --accent: #7512C7;
  --accent-light: #9333ea;
  --accent-gradient: linear-gradient(135deg, #7512C7 0%, #a855f7 100%);
  --text-primary: #f5f5f5;
  --text-secondary: #8b9bab;
  --text-muted: #6b7c8d;
  --text-link: #6ab2f2;
  --border: rgba(255, 255, 255, 0.06);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-full: 50%;
  --sidebar-width: 380px;
  --header-height: 56px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  border: none;
  background: none;
}

a {
  color: var(--accent-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* ========== Views ========== */
.view {
  display: none;
  height: 100vh;
  width: 100vw;
}

.view.active {
  display: flex;
}

/* ========== Auth View ========== */
.auth-container {
  margin: auto;
  width: 100%;
  max-width: 400px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.auth-logo-img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 20px rgba(117, 18, 199, 0.4));
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  text-align: center;
  font-size: 13px;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group input {
  width: 100%;
  padding: 16px 16px 8px;
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  transition: var(--transition);
}

.form-group input::placeholder {
  color: transparent;
}

.form-group input:focus {
  border-color: var(--accent);
  background: var(--bg-secondary);
}

.form-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: var(--transition);
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label {
  top: 8px;
  transform: translateY(0);
  font-size: 10px;
  color: var(--accent-light);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(117, 18, 199, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: 13px;
  text-align: center;
  animation: shake 0.3s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.auth-lang {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

.lang-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--accent);
  color: white;
}

.lang-btn:hover:not(.active) {
  background: var(--bg-tertiary);
}

/* ========== Main App Layout ========== */
#app-view {
  display: none;
  flex-direction: row;
  height: 100vh;
}

#app-view.active {
  display: flex;
}

/* ========== Sidebar ========== */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--transition);
}

.sidebar-header {
  padding: 8px 8px 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-height);
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  background: var(--bg-primary);
  border-radius: 20px;
  color: var(--text-muted);
  transition: var(--transition);
}

.search-bar:focus-within {
  background: var(--bg-tertiary);
  box-shadow: 0 0 0 2px rgba(117, 18, 199, 0.3);
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

#sidebar-nav {
  display: flex;
  padding: 2px 8px;
  gap: 2px;
  flex-shrink: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:hover {
  background: var(--bg-hover);
}

.nav-item.active {
  color: var(--accent-light);
  background: rgba(117, 18, 199, 0.1);
}

.sidebar-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}

.sidebar-list::-webkit-scrollbar {
  width: 6px;
}

.sidebar-list::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

/* ========== Chat List Items ========== */
.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.chat-item:hover {
  background: var(--bg-hover);
}

.chat-item.active {
  background: var(--bg-active);
}

.chat-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  position: relative;
}

.avatar .online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  background: #4ade80;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.chat-item-info {
  flex: 1;
  min-width: 0;
}

.chat-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.chat-item-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 8px;
}

.chat-item-preview {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.unread-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Channel list items */
.channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.channel-item:hover {
  background: var(--bg-hover);
}

.channel-item.active {
  background: var(--bg-active);
}

.channel-item .channel-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.channel-item-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.channel-item-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ========== Sidebar Footer ========== */
.sidebar-footer {
  padding: 8px 16px;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ========== Chat Area ========== */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg-primary);
  position: relative;
  min-width: 0;
}

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0.6;
}

.empty-logo {
  width: 80px;
  height: 80px;
  opacity: 0.3;
  margin-bottom: 8px;
}

.empty-state h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Chat header */
.chat-header {
  height: var(--header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-header-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.chat-header-info h3 {
  font-size: 15px;
  font-weight: 600;
}

.chat-status {
  font-size: 12px;
  color: var(--text-secondary);
}

.chat-status.online {
  color: #4ade80;
}

/* ========== Messages ========== */
.messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}

.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 5%;
  min-height: 100%;
  justify-content: flex-end;
}

.message {
  max-width: 65%;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  animation: msgIn 0.2s ease;
  position: relative;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message.outgoing {
  background: var(--bg-message-out);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message.incoming {
  background: var(--bg-message-in);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message-text {
  white-space: pre-wrap;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}

.message-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.message-check {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.message-check.read {
  color: #4ade80;
}

.typing-indicator {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--accent-light);
  font-style: italic;
  animation: fadeIn 0.3s ease;
}

.date-separator {
  text-align: center;
  padding: 8px 0;
}

.date-separator span {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 12px;
}

/* ========== Message Input ========== */
.message-input-area {
  padding: 8px 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.input-wrapper {
  flex: 1;
  background: var(--bg-input);
  border-radius: 20px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  min-height: 40px;
  transition: var(--transition);
}

.input-wrapper:focus-within {
  box-shadow: 0 0 0 2px rgba(117, 18, 199, 0.3);
}

#message-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  resize: none;
  padding: 10px 0;
  max-height: 120px;
  line-height: 1.4;
  font-size: 14px;
}

#message-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.send-btn:hover {
  background: var(--accent-light);
  transform: scale(1.05);
}

.send-btn:active {
  transform: scale(0.95);
}

/* ========== Channel View ========== */
.channel-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.channel-header {
  height: var(--header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.channel-icon {
  font-size: 28px;
}

.channel-header h3 {
  font-size: 15px;
  font-weight: 600;
}

.channel-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.channel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 5%;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}

.channel-messages::-webkit-scrollbar {
  width: 6px;
}

.channel-messages::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.news-item {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
  animation: msgIn 0.3s ease;
}

.news-item:hover {
  border-color: rgba(117, 18, 199, 0.3);
  transform: translateY(-1px);
}

.news-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.news-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.news-item-link {
  color: var(--accent-light);
  font-size: 12px;
}

.news-item-link:hover {
  text-decoration: underline;
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-body {
  padding: 20px;
}

.modal-body .form-group {
  margin-bottom: 16px;
}

.modal-body .btn-primary {
  margin-top: 12px;
}

.code-display {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent-light);
  cursor: pointer;
  transition: var(--transition);
  margin: 12px 0;
}

.code-display:hover {
  background: var(--bg-tertiary);
}

.code-display small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0;
  margin-top: 8px;
  font-weight: 400;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transition: transform 0.3s ease;
  border: 1px solid var(--border);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ========== Responsive ========== */
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: absolute;
    z-index: 10;
  }

  .chat-area {
    width: 100%;
  }

  .sidebar.hidden-mobile {
    display: none;
  }

  .mobile-only {
    display: flex;
  }

  .messages-list {
    padding: 0 3%;
  }

  .message {
    max-width: 85%;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 32px 20px;
  }

  .auth-title {
    font-size: 24px;
  }
}

/* ========== PWA Install Banner ========== */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 500;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.install-banner-text {
  font-size: 13px;
}

.install-banner .btn-primary {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
}

/* ========== Settings Panel ========== */
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 14px;
}

.settings-value {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Encryption badge */
.encryption-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #4ade80;
  padding: 2px 8px;
  background: rgba(74, 222, 128, 0.1);
  border-radius: 12px;
  margin-bottom: 8px;
}

/* Loading spinner */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== Call Overlay ========== */
.call-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.call-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  position: relative;
}

.call-screen.video {
  background: #000;
}

.call-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  color: white;
  animation: pulseCall 2s ease-in-out infinite;
}

@keyframes pulseCall {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(117, 18, 199, 0.5);
  }

  50% {
    box-shadow: 0 0 0 20px rgba(117, 18, 199, 0);
  }
}

.call-name {
  font-size: 22px;
  font-weight: 600;
  color: white;
}

.call-type {
  font-size: 13px;
  color: var(--text-secondary);
}

.call-status {
  font-size: 14px;
  color: var(--accent-light);
  margin-top: 4px;
}

.call-timer {
  font-size: 16px;
  color: white;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.call-actions {
  display: flex;
  gap: 20px;
  margin-top: 32px;
}

.call-action-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.call-action-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.08);
}

.call-action-btn.active {
  background: rgba(255, 255, 255, 0.2);
}

.call-action-btn.reject {
  background: #dc2626;
}

.call-action-btn.reject:hover {
  background: #ef4444;
}

.call-action-btn.accept {
  background: #22c55e;
}

.call-action-btn.accept:hover {
  background: #4ade80;
}

.call-remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.call-local-video {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 140px;
  height: 105px;
  border-radius: var(--radius);
  object-fit: cover;
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
}

.call-screen.video .call-name,
.call-screen.video .call-type,
.call-screen.video .call-status,
.call-screen.video .call-timer {
  position: relative;
  z-index: 10;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.call-screen.video .call-actions {
  position: absolute;
  bottom: 40px;
  z-index: 10;
}

/* ========== Voice Messages ========== */
.voice-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  min-width: 200px;
  cursor: pointer;
}

.voice-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: var(--transition);
}

.voice-play-btn:hover {
  background: var(--accent-light);
  transform: scale(1.08);
}

.voice-waveform {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.voice-progress {
  height: 100%;
  background: var(--accent-light);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.voice-duration {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 36px;
  font-variant-numeric: tabular-nums;
}

.voice-message audio {
  display: none;
}

/* ========== Recording Indicator ========== */
.recording-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0 12px;
}

.recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dc2626;
  animation: recPulse 1s ease-in-out infinite;
}

@keyframes recPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

#recording-time {
  font-size: 15px;
  font-weight: 500;
  color: white;
  font-variant-numeric: tabular-nums;
}

.chat-header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}