@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --bg: #fff4ed;
  --bg-alt: #f3fbf6;
  --text: #1b2430;
  --muted: #7c8aa5;
  --card: #ffffff;
  --green: #2ee96b;
  --green-dark: #12c458;
  --purple: #7b5cff;
  --pink: #f35aa4;
  --shadow: 0 20px 40px rgba(28, 33, 45, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  padding: 20px 20px 90px;
  min-height: 100vh;
}

.screen {
  display: none;
  animation: fadeIn 0.35s ease;
}

.screen.is-active {
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 18px;
}

.brand {
  font-weight: 600;
  font-size: 18px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffd9c7;
  display: grid;
  place-items: center;
  position: relative;
  font-weight: 600;
  border: none;
}

.avatar.small {
  width: 36px;
  height: 36px;
  background: #2f3548;
  color: #fff;
}

.status-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #37e478;
  border: 2px solid #fff4ed;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.hero-text h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 18px;
}

.hero-text span {
  color: var(--muted);
  font-weight: 500;
}

.cta-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  width: 100%;
  background: var(--green);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(47, 233, 107, 0.3);
  cursor: pointer;
}

.cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #1cd85d;
  display: grid;
  place-items: center;
  position: relative;
  color: #0a3d1f;
  font-size: 20px;
}

.cta-plus {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #0b2c1e;
  color: #fff;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.cta-copy {
  text-align: left;
  flex: 1;
  color: #0b2c1e;
}

.cta-copy strong {
  display: block;
  font-size: 16px;
}

.cta-copy span {
  font-size: 13px;
}

.cta-arrow {
  width: 42px;
  height: 42px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.section-header h2 {
  font-size: 20px;
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}

.upcoming-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.upcoming-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

.upcoming-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #f0ebff;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.upcoming-text strong {
  font-size: 20px;
}

.upcoming-text small {
  display: block;
  color: var(--muted);
}

.toggle {
  margin-left: auto;
  width: 52px;
  height: 28px;
  background: #e9edf4;
  border-radius: 999px;
  position: relative;
}

.toggle::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.08);
}

.toggle.on {
  background: #29e76b;
}

.toggle.on::after {
  left: 27px;
}

.promo-card {
  margin-top: 20px;
  background: linear-gradient(135deg, #7b5cff, #f35aa4);
  color: #fff;
  padding: 20px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.promo-button {
  background: #fff;
  color: #7b5cff;
  border: none;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 600;
}

.ad-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 2px dashed #d7deea;
  text-align: center;
  color: var(--muted);
}

.ad-dash span {
  font-weight: 600;
  font-size: 12px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #edf0f5;
  display: flex;
  justify-content: space-around;
  padding: 12px 0 14px;
  z-index: 5;
}

.nav-item {
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 500;
  display: grid;
  gap: 4px;
  justify-items: center;
  font-size: 12px;
}

.nav-item.is-active {
  color: var(--green-dark);
}

.icon-btn {
  border: none;
  background: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.text-btn {
  border: none;
  background: none;
  font-weight: 600;
  color: var(--text);
}

.alarm-time {
  text-align: center;
  margin: 24px 0;
  position: relative;
}

.alarm-time-display {
  font-size: 64px;
  font-weight: 600;
}

.alarm-ampm {
  font-size: 20px;
  font-weight: 600;
  margin-top: -50px;
  margin-left: 8px;
}

.alarm-time-input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.repeat-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-top: 10px;
}

.repeat-days {
  display: flex;
  gap: 10px;
  margin: 16px 0 20px;
}

.repeat-days button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #e9f1ff;
  color: var(--muted);
  font-weight: 600;
}

.repeat-days button.active {
  background: var(--green);
  color: #0d2d1c;
}

.reason-card {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.reason-card textarea {
  width: 100%;
  border: none;
  resize: none;
  min-height: 90px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  font-family: inherit;
}

.reason-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 10px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.switch {
  position: relative;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #e9edf4;
  border-radius: 999px;
  transition: 0.2s;
}

.slider::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: 0.2s;
}

.switch input:checked + .slider {
  background: var(--green);
}

.switch input:checked + .slider::after {
  left: 27px;
}

.primary-btn {
  width: 100%;
  margin-top: 24px;
  background: var(--green);
  border: none;
  border-radius: 18px;
  padding: 16px;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 16px 30px rgba(46, 233, 107, 0.3);
}

.primary-btn.small {
  width: auto;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.search-center {
  display: grid;
  place-items: center;
  margin: 40px 0 24px;
}

.pulse {
  position: relative;
  width: 220px;
  height: 220px;
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(46, 233, 107, 0.2);
  animation: pulse 2.4s infinite;
}

.pulse-ring:nth-child(2) { animation-delay: 0.4s; }
.pulse-ring:nth-child(3) { animation-delay: 0.8s; }
.pulse-ring:nth-child(4) { animation-delay: 1.2s; }

.pulse-core {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: #0f172a;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pulse-core img,
#search-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pulse-controls {
  position: absolute;
  bottom: 10px;
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
}

.center-title {
  text-align: center;
  font-size: 24px;
}

.center-sub {
  text-align: center;
  color: var(--muted);
}

.timer-card {
  margin: 24px auto 10px;
  background: #fff;
  border-radius: 20px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: fit-content;
  box-shadow: var(--shadow);
}

.timer-card span {
  font-size: 28px;
  font-weight: 600;
}

.timer-card small {
  display: block;
  text-align: center;
  color: var(--muted);
}

.timer-card .divider {
  width: 1px;
  height: 40px;
  background: #e5e7eb;
}

.center-hint {
  text-align: center;
  color: var(--muted);
  margin-bottom: 24px;
}

.secondary-btn {
  width: 100%;
  border: none;
  padding: 14px 16px;
  border-radius: 18px;
  background: #e4e9f1;
  font-weight: 600;
}

.status-pill {
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  background: #2ee96b;
  border-radius: 50%;
}

.screen-call {
  padding: 0;
}

.call-stage {
  position: relative;
  height: 100vh;
  background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.85)),
    url("https://images.unsplash.com/photo-1524504388940-b1c1722653e1?auto=format&fit=crop&w=900&q=80") center/cover;
}

#remote-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.call-user {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.2);
  padding: 12px 16px;
  border-radius: 18px;
  width: fit-content;
}

.call-user span {
  display: block;
  font-size: 12px;
  color: #4ade80;
  font-weight: 600;
}

.call-local {
  position: absolute;
  right: 20px;
  top: 90px;
  width: 120px;
  height: 160px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.call-local video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-muted {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 6px;
  border-radius: 8px;
  display: none;
}

.call-connection {
  align-self: center;
  margin-top: 160px;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 999px;
}

.call-time {
  text-align: center;
  margin-top: auto;
  font-size: 16px;
}

.call-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

.call-ad {
  margin: 10px auto 6px;
  width: min(320px, 90%);
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.call-ad .adsbygoogle {
  width: 100%;
  height: 100%;
  display: block;
}

.circle-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 18px;
}

.end-btn {
  background: #f24848;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 600;
}

.call-hint {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.settings-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

/* Shared utility styles for analytics page */
.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.grid {
  display: grid;
  gap: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
}

.age-gate.active {
  display: flex;
}

.age-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow);
}

.text-input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  font-family: inherit;
  margin: 12px 0 16px;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.error {
  color: #ef4444;
  font-size: 12px;
}

@keyframes pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 430px;
    margin: 0 auto;
  }
}
