/* ═══════════════════════════════════════════════════
   CallT — Design System
   Premium dark theme with glassmorphism & gradients
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Variables ─── */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-tertiary: #1a1a3e;
  --bg-card: rgba(25, 25, 60, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  --text-primary: #ffffff;
  --text-secondary: #a0a0cc;
  --text-muted: #6060a0;

  --accent-primary: #6c5ce7;
  --accent-secondary: #00cec9;
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #00cec9);
  --accent-gradient-hover: linear-gradient(135deg, #7c6cf7, #10ded9);
  --accent-pink: #fd79a8;
  --accent-orange: #fdcb6e;
  --accent-green: #00b894;
  --accent-red: #e74c3c;

  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(108, 92, 231, 0.5);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(108, 92, 231, 0.5); }

/* ─── Animated Background ─── */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.bg-orb:nth-child(1) {
  width: 500px; height: 500px;
  background: var(--accent-primary);
  top: -10%; left: -10%;
  animation-delay: 0s;
}

.bg-orb:nth-child(2) {
  width: 400px; height: 400px;
  background: var(--accent-secondary);
  top: 50%; right: -10%;
  animation-delay: -7s;
}

.bg-orb:nth-child(3) {
  width: 350px; height: 350px;
  background: var(--accent-pink);
  bottom: -10%; left: 30%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -50px) scale(1.1); }
  50% { transform: translate(-30px, 60px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.05); }
}

/* ─── Glass Card ─── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.glass:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-active);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-full);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(108, 92, 231, 0.6);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  background: rgba(108, 92, 231, 0.15);
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #00b894, #00a381);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 184, 148, 0.4);
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

/* ─── Inputs ─── */
.input-group {
  position: relative;
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.input::placeholder { color: var(--text-muted); }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0cc' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

select.input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ─── Toggle Switch ─── */
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-track {
  width: 48px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  position: relative;
  transition: var(--transition);
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle.active .toggle-track {
  background: var(--accent-primary);
}

.toggle.active .toggle-track::after {
  transform: translateX(22px);
}

.toggle-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═══════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════ */
.landing-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 20px;
}

.landing-card {
  width: 100%;
  max-width: 480px;
  padding: 48px 40px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.logo-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-glow);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.3); }
  50% { box-shadow: 0 0 40px rgba(108, 92, 231, 0.6); }
}

.logo-text {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.landing-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 36px;
  line-height: 1.5;
}

.landing-subtitle span {
  color: var(--accent-secondary);
  font-weight: 600;
}

.landing-card .input-group {
  text-align: left;
}

.join-btn {
  width: 100%;
  margin-top: 8px;
}

.features-strip {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.feature-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 6px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.05);
}

.feature-badge .emoji { font-size: 1rem; }

/* ═══════════════════════════════════════
   MAIN APP (Dashboard)
   ═══════════════════════════════════════ */
.app-container {
  display: flex;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  width: 320px;
  min-width: 320px;
  background: rgba(15, 15, 40, 0.8);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header .logo {
  margin-bottom: 0;
  gap: 8px;
}

.sidebar-header .logo-icon {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

.sidebar-header .logo-text {
  font-size: 1.3rem;
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.sidebar-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Inter', sans-serif;
}

.sidebar-tab:hover { color: var(--text-secondary); }
.sidebar-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.user-item, .room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.user-item:hover, .room-item:hover {
  background: rgba(108, 92, 231, 0.1);
}

.user-item.active, .room-item.active {
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  position: relative;
}

.user-avatar .status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid var(--bg-secondary);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-lang {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(108, 92, 231, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Main Chat Area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg-primary);
}

.main-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 15, 40, 0.5);
  backdrop-filter: blur(10px);
}

.main-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}

.chat-empty .emoji { font-size: 3rem; margin-bottom: 16px; }
.chat-empty h3 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Chat Bubbles */
.message {
  max-width: 70%;
  animation: msgIn 0.3s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.sent { align-self: flex-end; }
.message.received { align-self: flex-start; }

.message-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  position: relative;
  word-wrap: break-word;
}

.message.sent .message-bubble {
  background: var(--accent-primary);
  border-bottom-right-radius: 4px;
}

.message.received .message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message-sender {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 4px;
}

.message-text {
  font-size: 0.95rem;
  line-height: 1.5;
}

.message-translated {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}

.message-original {
  margin-top: 4px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  display: none;
}

.message-original.show { display: block; }

.message-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  justify-content: flex-end;
}

.message-lang-tag {
  font-size: 0.7rem;
  padding: 1px 6px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
}

/* Chat Input */
.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: rgba(15, 15, 40, 0.5);
  backdrop-filter: blur(10px);
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-input {
  flex: 1;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.chat-input::placeholder { color: var(--text-muted); }

.translate-toggle-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
}

.typing-indicator {
  padding: 4px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  min-height: 20px;
}

/* ═══════════════════════════════════════
   CALL SCREEN
   ═══════════════════════════════════════ */
.call-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: var(--bg-primary);
  overflow: hidden;
  z-index: 1;
}

.call-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--bg-tertiary), var(--bg-primary));
}

.call-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Remote Video (full screen) */
.remote-video-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.remote-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Local Video (PiP) */
.local-video-container {
  position: absolute;
  bottom: 120px;
  right: 24px;
  width: 180px;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.local-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Call Info */
.call-info {
  z-index: 5;
  text-align: center;
  padding: 20px;
}

.call-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-glow);
  animation: pulse-glow 3s ease-in-out infinite;
}

.call-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.call-status {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.call-timer {
  font-size: 1.1rem;
  color: var(--accent-secondary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}

/* Subtitles Overlay */
.subtitles-overlay {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: 90%;
  max-width: 700px;
  text-align: center;
  pointer-events: none;
}

.subtitle-line {
  padding: 10px 20px;
  margin-bottom: 6px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  line-height: 1.4;
  animation: subtitleIn 0.3s ease;
  pointer-events: auto;
}

@keyframes subtitleIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.subtitle-original {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.subtitle-translated {
  background: rgba(108, 92, 231, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  font-weight: 500;
}

.subtitle-speaker {
  font-size: 0.75rem;
  color: var(--accent-secondary);
  font-weight: 600;
  margin-bottom: 2px;
}

/* Call Controls */
.call-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.1);
}

.call-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.call-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.call-btn.active {
  background: var(--accent-primary);
}

.call-btn.end-call {
  background: var(--accent-red);
  width: 60px;
  height: 60px;
  font-size: 1.4rem;
}

.call-btn.end-call:hover {
  background: #c0392b;
}

.translate-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}

.translate-btn.active {
  border-color: var(--accent-primary);
  background: rgba(108, 92, 231, 0.3);
}

/* ═══════════════════════════════════════
   TABLE MODE (Face-to-Face)
   ═══════════════════════════════════════ */
.table-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.table-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-y: auto;
}

.table-top {
  transform: rotate(180deg);
  background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
  border-bottom: 2px solid var(--accent-primary);
}

.table-bottom {
  background: linear-gradient(to top, var(--bg-primary), var(--bg-secondary));
  border-top: 2px solid var(--accent-secondary);
}

.table-divider {
  height: 4px;
  background: var(--accent-gradient);
  position: relative;
  flex-shrink: 0;
}

.table-divider::after {
  content: '🌐';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent-primary);
  font-size: 1.2rem;
}

.table-lang-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.table-text-display {
  width: 90%;
  max-width: 600px;
  min-height: 100px;
  text-align: center;
}

.table-text-item {
  padding: 12px 20px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  font-size: 1.3rem;
  line-height: 1.5;
  animation: msgIn 0.3s ease;
}

.table-text-mine {
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
}

.table-text-theirs {
  background: rgba(0, 206, 201, 0.15);
  border: 1px solid rgba(0, 206, 201, 0.3);
}

.table-controls {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 12px;
}

.table-bottom .table-controls {
  bottom: 16px;
}

.table-top .table-controls {
  bottom: 16px; /* rotated, so this appears at top */
}

.table-mic-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gradient);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-mic-btn:hover { transform: scale(1.1); }

.table-mic-btn.recording {
  animation: recording-pulse 1.5s ease-in-out infinite;
}

@keyframes recording-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.4); }
  50% { box-shadow: 0 0 40px rgba(231, 76, 60, 0.6); background: linear-gradient(135deg, #e74c3c, #c0392b); }
}

.table-exit-btn {
  position: fixed;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 20;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════
   GROUP ROOM
   ═══════════════════════════════════════ */
.room-container {
  display: flex;
  height: 100vh;
  position: relative;
  z-index: 1;
}

.room-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.room-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 15, 40, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.room-participants-panel {
  width: 280px;
  min-width: 280px;
  background: rgba(15, 15, 40, 0.8);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}

.room-subtitle-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.room-subtitle-item {
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: msgIn 0.3s ease;
}

.room-subtitle-speaker {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 4px;
}

.room-subtitle-original {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}

.room-subtitle-translated {
  font-size: 1.1rem;
  font-weight: 500;
}

.room-controls {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(15, 15, 40, 0.5);
  backdrop-filter: blur(10px);
}

.participant-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.participant-speaking {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(0,184,148,0.3);
}

/* ═══════════════════════════════════════
   Welcome / Empty States
   ═══════════════════════════════════════ */
.welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.welcome-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.welcome-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-desc {
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Quick action buttons on welcome */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  min-width: 120px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
}

.quick-action:hover {
  background: rgba(108, 92, 231, 0.1);
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.quick-action .emoji { font-size: 1.8rem; }
.quick-action span {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════
   Incoming Call Modal
   ═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 380px;
  width: 90%;
  animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.modal p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ═══════════════════════════════════════
   Notifications / Toast
   ═══════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
  max-width: 360px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-20px); }
}

/* ═══════════════════════════════════════
   Responsive
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    z-index: 100;
    left: -320px;
    transition: left 0.3s ease;
  }
  .sidebar.open { left: 0; }

  .message { max-width: 85%; }

  .call-controls {
    padding: 12px 20px;
    gap: 10px;
  }

  .call-btn { width: 44px; height: 44px; font-size: 1rem; }
  .call-btn.end-call { width: 52px; height: 52px; }

  .local-video-container {
    width: 120px;
    height: 160px;
    bottom: 100px;
    right: 12px;
  }

  .room-participants-panel { display: none; }

  .features-strip { gap: 12px; }
  .feature-badge { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .landing-card { padding: 32px 24px; }
  .logo-text { font-size: 1.8rem; }
  .landing-subtitle { font-size: 0.9rem; }

  .quick-action { min-width: 100px; padding: 16px; }
}
