/* ═══════════════════════════════════════════
   VOXAI — Design System
   Palette: Acid Neon (#CCFF00, #FF3CAC, #0D0D0D, #1A1A2E)
   Fonts: Clash Display + Syne + Space Mono
═══════════════════════════════════════════ */

:root {
  --neon: #CCFF00;
  --pink: #FF3CAC;
  --dark: #0D0D0D;
  --dark2: #1A1A2E;
  --dark3: #0F0F1A;
  --surface: #141428;
  --surface2: #1E1E38;
  --surface3: #252545;
  --border: rgba(204, 255, 0, 0.12);
  --border2: rgba(255, 255, 255, 0.06);
  --text: #F0F0FF;
  --text2: #9090B0;
  --text3: #5A5A7A;
  --success: #00FF88;
  --danger: #FF4444;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-neon: 0 0 20px rgba(204,255,0,0.25);
  --shadow-pink: 0 0 20px rgba(255,60,172,0.25);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Syne', sans-serif;
  background: var(--dark3);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
a { color: var(--neon); text-decoration: none; }

/* ── Screen System ── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1),
              transform 0.4s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  background: var(--dark3);
}
.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
.screen.slide-out {
  opacity: 0;
  transform: translateX(-30px);
}

/* ══════════════════════════════════════════
   SCREEN 1: LOGIN
══════════════════════════════════════════ */
#screen-login {
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #CCFF00, transparent);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #FF3CAC, transparent);
  bottom: -80px; right: -80px;
  animation-delay: -3s;
}
.orb-3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, #7B68EE, transparent);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -6s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(204,255,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,255,0,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 48px; height: 48px;
  background: rgba(204,255,0,0.08);
  border: 1px solid rgba(204,255,0,0.3);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-neon);
}
.brand-icon.small {
  width: 32px; height: 32px;
  border-radius: 9px;
}
.brand-name {
  font-family: 'Clash Display', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(204,255,0,0.4);
}

.login-card {
  width: 100%;
  background: rgba(20, 20, 40, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
}

.login-header h1 {
  font-family: 'Clash Display', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.login-header p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.security-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  color: var(--neon);
  background: rgba(204,255,0,0.08);
  border: 1px solid rgba(204,255,0,0.2);
  border-radius: 20px;
  padding: 4px 10px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-google:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.btn-google:active { transform: translateY(0); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text3);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border2);
}

.phone-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.country-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-width: 90px;
  transition: var(--transition);
  user-select: none;
}
.country-select:hover { border-color: rgba(204,255,0,0.3); }
.country-select .flag { font-size: 18px; }
.country-select .code { font-size: 13px; font-weight: 600; color: var(--text); }

.country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 220px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 100;
  display: none;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
}
.country-dropdown.open { display: block; animation: dropIn 0.2s ease; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.country-option {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  transition: background 0.15s;
}
.country-option:hover { background: rgba(204,255,0,0.08); color: var(--neon); }

#phone-input {
  flex: 1;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}
#phone-input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(204,255,0,0.1);
}
#phone-input::placeholder { color: var(--text3); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: var(--neon);
  border-radius: var(--radius-sm);
  color: var(--dark);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Clash Display', sans-serif;
  letter-spacing: 0.3px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(204,255,0,0.3);
}
.btn-primary:hover {
  background: #d4ff1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(204,255,0,0.4);
}
.btn-primary:active { transform: translateY(0); }

.otp-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: fadeUp 0.3s ease;
}
.otp-panel.visible { display: flex; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.otp-label { font-size: 13px; color: var(--text2); text-align: center; }
.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.otp-box {
  width: 44px; height: 52px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--neon);
  font-size: 20px;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  text-align: center;
  outline: none;
  transition: var(--transition);
}
.otp-box:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(204,255,0,0.15);
  background: rgba(204,255,0,0.05);
}

.terms {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  line-height: 1.6;
}
.terms a { color: var(--text2); }
.terms a:hover { color: var(--neon); }

/* ══════════════════════════════════════════
   SCREEN 2: HOME
══════════════════════════════════════════ */
#screen-home {
  background: var(--dark3);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(13,13,26,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
  position: relative;
  z-index: 10;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Clash Display', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--neon);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text2);
  transition: var(--transition);
}
.nav-btn:hover { color: var(--neon); border-color: var(--border); }
.avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--neon), var(--pink));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--dark);
  cursor: pointer;
  transition: var(--transition);
}
.avatar:hover { transform: scale(1.08); box-shadow: var(--shadow-neon); }

.home-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scrollbar-width: none;
}
.home-content::-webkit-scrollbar { display: none; }

.greeting-section { padding: 4px 0; }
.greeting-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 2px;
}
.greeting-name {
  font-family: 'Clash Display', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: var(--neon);
  background: rgba(204,255,0,0.08);
  border: 1px solid rgba(204,255,0,0.2);
  border-radius: 20px;
  padding: 5px 12px;
}
.status-dot {
  width: 7px; height: 7px;
  background: var(--neon);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Call Hub */
.call-hub {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}
.call-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(204,255,0,0.15);
  animation: ringExpand 3s ease-out infinite;
}
.ring-1 { width: 130px; height: 130px; animation-delay: 0s; }
.ring-2 { width: 170px; height: 170px; animation-delay: 0.8s; }
.ring-3 { width: 210px; height: 210px; animation-delay: 1.6s; }
@keyframes ringExpand {
  0% { opacity: 0.6; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.1); }
}

.call-btn {
  position: relative;
  z-index: 2;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon) 0%, #88FF00 100%);
  box-shadow: 0 0 40px rgba(204,255,0,0.4), 0 8px 32px rgba(0,0,0,0.4);
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.call-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 60px rgba(204,255,0,0.6), 0 12px 40px rgba(0,0,0,0.5);
}
.call-btn:active { transform: scale(0.97); }
.call-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.call-btn-inner span {
  font-family: 'Clash Display', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.5px;
}

/* Dialpad */
.dialpad-section {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px;
}
.dialpad-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  min-height: 46px;
}
#dial-number {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 2px;
  flex: 1;
}
#dial-number.placeholder { color: var(--text3); font-size: 13px; letter-spacing: 0; }
.backspace-btn {
  color: var(--text2);
  padding: 4px;
  transition: var(--transition);
}
.backspace-btn:hover { color: var(--pink); }

.dialpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.dial-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  gap: 1px;
}
.dial-key:hover {
  background: var(--surface3);
  border-color: rgba(204,255,0,0.2);
}
.dial-key:active {
  background: rgba(204,255,0,0.1);
  transform: scale(0.95);
}
.key-num {
  font-family: 'Clash Display', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.key-sub {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  color: var(--text3);
  letter-spacing: 1px;
}

/* Settings Row */
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.setting-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.setting-label {
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.voice-toggle {
  display: flex;
  gap: 6px;
}
.voice-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}
.voice-btn.active {
  background: rgba(204,255,0,0.12);
  border-color: var(--neon);
  color: var(--neon);
}
.voice-btn:hover:not(.active) {
  border-color: rgba(255,255,255,0.15);
  color: var(--text);
}

.lang-select-wrap {
  position: relative;
}
.lang-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: var(--transition);
}
.lang-select:focus { border-color: var(--neon); }
.lang-select option { background: var(--surface2); }

/* Recent Section */
.recent-section { display: flex; flex-direction: column; gap: 10px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-header span {
  font-family: 'Clash Display', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.section-header button {
  font-size: 12px;
  color: var(--neon);
  font-weight: 600;
}

.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.recent-item:hover {
  border-color: rgba(204,255,0,0.2);
  background: var(--surface2);
}
.recent-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Clash Display', sans-serif;
  flex-shrink: 0;
}
.recent-icon.out { background: rgba(204,255,0,0.12); color: var(--neon); }
.recent-icon.inc { background: rgba(0,255,136,0.12); color: var(--success); }
.recent-icon.miss { background: rgba(255,68,68,0.12); color: var(--danger); }
.recent-info { flex: 1; min-width: 0; }
.recent-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
  font-family: 'Space Mono', monospace;
}
.recent-right { text-align: right; flex-shrink: 0; }
.recent-time { font-size: 11px; color: var(--text3); font-family: 'Space Mono', monospace; }
.lang-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  margin-top: 3px;
  font-family: 'Space Mono', monospace;
}
.lang-badge.translated {
  background: rgba(255,60,172,0.12);
  color: var(--pink);
  border: 1px solid rgba(255,60,172,0.2);
}

/* Bottom Nav */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 20px 20px;
  background: rgba(13,13,26,0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border2);
  position: absolute;
  bottom: 0; left: 0; right: 0;
}
.bnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 20px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.bnav-btn.active { color: var(--neon); }
.bnav-btn:hover { color: var(--text); }

/* ══════════════════════════════════════════
   SCREEN 3: ACTIVE CALL
══════════════════════════════════════════ */
#screen-call {
  background: var(--dark3);
}
.call-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.call-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  animation: callOrbPulse 4s ease-in-out infinite;
}
.call-orb-1 {
  width: 300px; height: 300px;
  background: var(--neon);
  top: -80px; left: -80px;
}
.call-orb-2 {
  width: 250px; height: 250px;
  background: var(--pink);
  bottom: -60px; right: -60px;
  animation-delay: -2s;
}
@keyframes callOrbPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.1); }
}

.call-screen-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 20px;
  overflow-y: auto;
  scrollbar-width: none;
}
.call-screen-content::-webkit-scrollbar { display: none; }

.call-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(20,20,40,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
}
.call-contact { display: flex; align-items: center; gap: 14px; }
.contact-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Clash Display', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  box-shadow: var(--shadow-neon);
}
.contact-info h3 {
  font-family: 'Clash Display', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.call-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.call-status-dot {
  width: 7px; height: 7px;
  background: var(--neon);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
#call-status-text {
  font-size: 12px;
  color: var(--neon);
  font-family: 'Space Mono', monospace;
}
.call-timer {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
}

/* Translation Panel */
.translation-panel {
  background: rgba(20,20,40,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.translation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: var(--neon);
}
.ai-dot {
  width: 8px; height: 8px;
  background: var(--neon);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon);
  animation: aiPulse 1s ease-in-out infinite;
}
@keyframes aiPulse {
  0%, 100% { box-shadow: 0 0 4px var(--neon); }
  50% { box-shadow: 0 0 16px var(--neon), 0 0 30px rgba(204,255,0,0.3); }
}
.lang-pair {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--pink);
  background: rgba(255,60,172,0.1);
  border: 1px solid rgba(255,60,172,0.2);
  border-radius: 20px;
  padding: 4px 12px;
}

/* Waveform */
.waveform-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 100%;
  padding: 8px 16px;
}
.wave-bar {
  width: 3px;
  background: var(--neon);
  border-radius: 2px;
  min-height: 4px;
  animation: waveAnim 0.8s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(204,255,0,0.4);
}
.wave-bar:nth-child(1)  { animation-delay: 0.0s; }
.wave-bar:nth-child(2)  { animation-delay: 0.05s; }
.wave-bar:nth-child(3)  { animation-delay: 0.1s; }
.wave-bar:nth-child(4)  { animation-delay: 0.15s; }
.wave-bar:nth-child(5)  { animation-delay: 0.2s; }
.wave-bar:nth-child(6)  { animation-delay: 0.25s; }
.wave-bar:nth-child(7)  { animation-delay: 0.3s; }
.wave-bar:nth-child(8)  { animation-delay: 0.35s; }
.wave-bar:nth-child(9)  { animation-delay: 0.4s; }
.wave-bar:nth-child(10) { animation-delay: 0.45s; }
.wave-bar:nth-child(11) { animation-delay: 0.5s; }
.wave-bar:nth-child(12) { animation-delay: 0.45s; }
.wave-bar:nth-child(13) { animation-delay: 0.4s; }
.wave-bar:nth-child(14) { animation-delay: 0.35s; }
.wave-bar:nth-child(15) { animation-delay: 0.3s; }
.wave-bar:nth-child(16) { animation-delay: 0.25s; }
.wave-bar:nth-child(17) { animation-delay: 0.2s; }
.wave-bar:nth-child(18) { animation-delay: 0.15s; }
.wave-bar:nth-child(19) { animation-delay: 0.1s; }
.wave-bar:nth-child(20) { animation-delay: 0.05s; }

@keyframes waveAnim {
  0%, 100% { height: 6px; }
  50% { height: var(--wave-h, 30px); }
}

.wave-bar:nth-child(1)  { --wave-h: 12px; }
.wave-bar:nth-child(2)  { --wave-h: 22px; }
.wave-bar:nth-child(3)  { --wave-h: 35px; }
.wave-bar:nth-child(4)  { --wave-h: 28px; }
.wave-bar:nth-child(5)  { --wave-h: 44px; }
.wave-bar:nth-child(6)  { --wave-h: 38px; }
.wave-bar:nth-child(7)  { --wave-h: 50px; }
.wave-bar:nth-child(8)  { --wave-h: 42px; }
.wave-bar:nth-child(9)  { --wave-h: 48px; }
.wave-bar:nth-child(10) { --wave-h: 55px; }
.wave-bar:nth-child(11) { --wave-h: 48px; }
.wave-bar:nth-child(12) { --wave-h: 42px; }
.wave-bar:nth-child(13) { --wave-h: 50px; }
.wave-bar:nth-child(14) { --wave-h: 38px; }
.wave-bar:nth-child(15) { --wave-h: 44px; }
.wave-bar:nth-child(16) { --wave-h: 28px; }
.wave-bar:nth-child(17) { --wave-h: 35px; }
.wave-bar:nth-child(18) { --wave-h: 22px; }
.wave-bar:nth-child(19) { --wave-h: 14px; }
.wave-bar:nth-child(20) { --wave-h: 8px; }

.waveform.paused .wave-bar { animation-play-state: paused; height: 4px !important; opacity: 0.3; }

/* Transcript */
.transcript-box {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 100px;
}
.transcript-label {
  font-size: 10px;
  font-family: 'Space Mono', monospace;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.transcript-line {
  font-size: 14px;
  line-height: 1.6;
  padding: 6px 0;
}
.transcript-line.original { color: var(--text); }
.transcript-line.translated { color: var(--pink); font-style: italic; }
.transcript-divider {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  padding: 4px 0;
  font-family: 'Space Mono', monospace;
}

.voice-info-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.voice-info-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  color: var(--text2);
}
.voice-info-item.secure { color: var(--neon); }

/* Call Controls */
.call-controls {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px 10px 24px;
  background: rgba(13,13,26,0.8);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border2);
  border-radius: var(--radius) var(--radius) 0 0;
  margin: 0 -20px -20px;
}
.ctrl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  color: var(--text2);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  min-width: 56px;
}
.ctrl-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.ctrl-btn.active { color: var(--neon); }
.ctrl-btn.muted { color: var(--pink); }

.end-call-btn {
  width: 64px; height: 64px;
  border-radius: 50% !important;
  background: var(--danger) !important;
  color: white !important;
  box-shadow: 0 4px 20px rgba(255,68,68,0.4);
  padding: 0 !important;
  min-width: unset !important;
  justify-content: center;
}
.end-call-btn:hover {
  background: #ff2222 !important;
  box-shadow: 0 6px 30px rgba(255,68,68,0.6) !important;
  transform: scale(1.05);
}
.end-call-btn span { display: none; }

/* ══════════════════════════════════════════
   SCREEN 4: CALL HISTORY
══════════════════════════════════════════ */
#screen-history { background: var(--dark3); }

.subscreen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(13,13,26,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
}
.subscreen-header h2 {
  font-family: 'Clash Display', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.back-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text2);
  transition: var(--transition);
}
.back-btn:hover { color: var(--neon); border-color: var(--border); }
.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
  transition: var(--transition);
}
.icon-btn:hover { color: var(--danger); }

.filter-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border2);
  white-space: nowrap;
  transition: var(--transition);
}
.filter-tab.active {
  background: rgba(204,255,0,0.12);
  border-color: var(--neon);
  color: var(--neon);
}
.filter-tab:hover:not(.active) { color: var(--text); }

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
}
.history-list::-webkit-scrollbar { display: none; }

.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  animation: slideIn 0.3s ease both;
}
.history-item:hover {
  border-color: rgba(204,255,0,0.2);
  background: var(--surface2);
  transform: translateX(3px);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.history-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Clash Display', sans-serif;
  flex-shrink: 0;
}
.history-icon.out { background: rgba(204,255,0,0.1); color: var(--neon); }
.history-icon.inc { background: rgba(0,255,136,0.1); color: var(--success); }
.history-icon.miss { background: rgba(255,68,68,0.1); color: var(--danger); }

.history-info { flex: 1; min-width: 0; }
.history-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.history-type {
  font-size: 11px;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
}
.history-type.out { color: var(--neon); }
.history-type.inc { color: var(--success); }
.history-type.miss { color: var(--danger); }

.history-right { text-align: right; flex-shrink: 0; }
.history-time { font-size: 11px; color: var(--text3); font-family: 'Space Mono', monospace; }
.history-dur { font-size: 12px; color: var(--text2); margin-top: 2px; font-family: 'Space Mono', monospace; }
.history-lang-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  margin-top: 4px;
  font-family: 'Space Mono', monospace;
  background: rgba(255,60,172,0.1);
  color: var(--pink);
  border: 1px solid rgba(255,60,172,0.2);
}

.empty-history {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-history svg { opacity: 0.3; }
.empty-history p { font-size: 14px; }

/* ══════════════════════════════════════════
   SCREEN 5: PROFILE
══════════════════════════════════════════ */
#screen-profile { background: var(--dark3); overflow-y: auto; }

.profile-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px 40px;
  gap: 16px;
}

.profile-avatar-large {
  position: relative;
  width: 90px; height: 90px;
}
.profile-avatar-large span {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--neon), var(--pink));
  border-radius: 50%;
  font-family: 'Clash Display', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--dark);
  z-index: 1;
}
.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--neon);
  opacity: 0.5;
  animation: avatarRing 3s ease-in-out infinite;
}
@keyframes avatarRing {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.profile-name {
  font-family: 'Clash Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.profile-phone {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text2);
}

.profile-stats {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 100%;
}
.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  border-right: 1px solid var(--border2);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Clash Display', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--neon);
}
.stat-label {
  font-size: 10px;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  margin-top: 2px;
  text-align: center;
}

.profile-settings {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.profile-setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border2);
  transition: var(--transition);
}
.profile-setting-item:last-child { border-bottom: none; }
.profile-setting-item:hover { background: var(--surface2); }
.psi-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.psi-value {
  font-size: 13px;
  color: var(--text2);
  font-family: 'Space Mono', monospace;
}
.psi-value.green { color: var(--success); }

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: rgba(255,68,68,0.1);
  border: 1px solid rgba(255,68,68,0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  margin-top: 8px;
}
.btn-logout:hover {
  background: rgba(255,68,68,0.2);
  border-color: var(--danger);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: rgba(0,255,136,0.3); color: var(--success); }
.toast.error { border-color: rgba(255,68,68,0.3); color: var(--danger); }
.toast.info { border-color: rgba(204,255,0,0.3); color: var(--neon); }

/* ══════════════════════════════════════════
   INCOMING CALL OVERLAY
══════════════════════════════════════════ */
.incoming-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.incoming-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.incoming-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 300px;
  box-shadow: var(--shadow), var(--shadow-neon);
  animation: cardPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes cardPop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.incoming-pulse {
  position: relative;
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.inc-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(204,255,0,0.3);
  animation: incRing 2s ease-out infinite;
}
.inc-ring-1 { width: 90px; height: 90px; animation-delay: 0s; }
.inc-ring-2 { width: 120px; height: 120px; animation-delay: 0.5s; }
.inc-ring-3 { width: 150px; height: 150px; animation-delay: 1s; }
@keyframes incRing {
  0% { opacity: 0.8; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.2); }
}
.inc-avatar {
  width: 70px; height: 70px;
  background: rgba(204,255,0,0.1);
  border: 2px solid rgba(204,255,0,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}

.incoming-label {
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.incoming-number {
  font-family: 'Clash Display', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.incoming-ai {
  font-size: 12px;
  color: var(--neon);
  font-family: 'Space Mono', monospace;
  background: rgba(204,255,0,0.08);
  border: 1px solid rgba(204,255,0,0.2);
  border-radius: 20px;
  padding: 4px 12px;
}

.incoming-actions {
  display: flex;
  gap: 40px;
  margin-top: 12px;
}
.inc-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.inc-btn.decline {
  background: var(--danger);
  box-shadow: 0 4px 20px rgba(255,68,68,0.4);
}
.inc-btn.decline:hover {
  background: #ff2222;
  transform: scale(1.08);
}
.inc-btn.accept {
  background: var(--success);
  box-shadow: 0 4px 20px rgba(0,255,136,0.4);
}
.inc-btn.accept:hover {
  background: #00dd77;
  transform: scale(1.08);
}

/* ══════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 380px) {
  .login-card { padding: 24px 20px; }
  .otp-box { width: 38px; height: 46px; font-size: 18px; }
  .dialpad-grid { gap: 6px; }
  .settings-row { grid-template-columns: 1fr; }
}
@media (min-width: 480px) {
  .screen { max-width: 430px; margin: 0 auto; }
  body { background: #050510; }
}