/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ===== Screens ===== */
.screen {
  display: none;
  width: 100%;
  height: 100vh;
}
.screen.active { display: flex; align-items: center; justify-content: center; }

/* ===== Home ===== */
.home-container {
  text-align: center;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
}

.logo-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.home-container h1 {
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(90deg, #00d2ff, #3a7bd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.3rem;
}
.subtitle {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn:active { transform: scale(0.97); }

.btn-start {
  width: 100%;
  padding: 1.4rem 2rem;
  font-size: 1.3rem;
  border-radius: 20px;
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(0, 210, 255, 0.5);
  transform: translateY(-1px);
}

/* ===== Share Section ===== */
.share-section {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 1.2rem;
  margin-top: 1.5rem;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.share-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.7rem;
}
.share-box {
  display: flex;
  gap: 0.5rem;
}
.share-box input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.3);
  color: #00d2ff;
  font-size: 0.85rem;
  outline: none;
}

/* ===== Call Screen ===== */
.call-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem;
}

.call-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}
.call-status {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
}

/* ===== Participants ===== */
.participants {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
}

.participant {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: fadeIn 0.4s ease;
}
.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,210,255,0.2), rgba(58,123,213,0.2));
  border: 2px solid rgba(0,210,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  transition: all 0.3s;
}
.participant.speaking .avatar {
  border-color: #00ff88;
  box-shadow: 0 0 30px rgba(0,255,136,0.3);
  transform: scale(1.05);
}
.participant .name {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}
.participant .mic-icon {
  font-size: 0.9rem;
}

/* ===== Controls ===== */
.controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 0 2rem;
}

.ctrl-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.22); }
.ctrl-btn:active { transform: scale(0.92); }
.ctrl-btn.muted {
  background: #ff4757;
  box-shadow: 0 0 20px rgba(255,71,87,0.4);
}

.ctrl-btn.hangup {
  background: #ff4757;
  transform: rotate(135deg);
  box-shadow: 0 4px 20px rgba(255,71,87,0.4);
}
.ctrl-btn.hangup:hover { background: #ff6b81; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  font-size: 0.9rem;
  z-index: 999;
  animation: fadeIn 0.2s ease;
  pointer-events: none;
}
.toast.hidden { display: none; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .home-container h1 { font-size: 1.8rem; }
  .logo-icon { font-size: 3rem; }
  .btn-start { font-size: 1.1rem; padding: 1.2rem 1.5rem; }
  .avatar { width: 80px; height: 80px; font-size: 2.2rem; }
  .ctrl-btn { width: 56px; height: 56px; font-size: 1.4rem; }
}
