/* The start page and the cards people see on their way into a room (join,
   waiting at the door). Loaded by home.html and video-room.html. */

.start-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(60vw 50vh at 18% 12%, rgba(138, 180, 255, 0.16), transparent 70%),
    radial-gradient(55vw 50vh at 85% 90%, rgba(52, 199, 89, 0.10), transparent 70%),
    #0a0a0c;
  color: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.start-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.start-card {
  box-sizing: border-box;
  width: min(372px, 100%);
  padding: 30px 28px 28px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: rgba(24, 24, 27, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  text-align: center;
  color: #f5f5f7;
}

.start-home {
  animation: start-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.start-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.start-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #f5f5f7;
  color: #0a0a0c;
}

.start-mark .material-icons {
  font-size: 24px;
}

.start-brand .start-dot {
  color: #8ab4ff;
}

.start-tagline {
  margin: 10px auto 22px;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(245, 245, 247, 0.62);
}

.start-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.start-input::placeholder {
  color: rgba(245, 245, 247, 0.42);
}

.start-input:focus {
  border-color: #8ab4ff;
  background: rgba(255, 255, 255, 0.09);
}

.start-label {
  margin: 16px 2px 0;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.5);
}

.start-toggles {
  display: flex;
  gap: 8px;
  margin: 8px 0 0;
}

/* each one is a switch: the knob on the right shows and changes it */
.start-toggle {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 10px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 247, 0.55);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.start-toggle .material-icons {
  font-size: 20px;
  color: #ff6961;
}

.start-toggle-name {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-switch {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease;
}

.start-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f5f5f7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.start-toggle.on {
  color: #f5f5f7;
}

.start-toggle.on .material-icons {
  color: #34c759;
}

.start-toggle.on .start-switch {
  background: #34c759;
}

.start-toggle.on .start-switch::after {
  transform: translateX(14px);
}

.start-toggle:hover {
  background: rgba(255, 255, 255, 0.11);
}

.start-toggle:active {
  transform: scale(0.97);
}

.start-hint {
  margin: 8px 2px 0;
  min-height: 2.9em;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(245, 245, 247, 0.5);
}

.start-primary,
.start-secondary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  padding: 0 20px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.start-primary {
  border: none;
  background: #f5f5f7;
  color: #0a0a0c;
}

.start-primary:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.start-secondary {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #f5f5f7;
}

.start-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
}

.start-primary:active,
.start-secondary:active {
  transform: scale(0.98);
}

.start-primary .material-icons {
  font-size: 22px;
}

.start-primary:focus-visible,
.start-secondary:focus-visible,
.start-toggle:focus-visible {
  outline: 2px solid #8ab4ff;
  outline-offset: 2px;
}

.start-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: rgba(245, 245, 247, 0.45);
  font-size: 12.5px;
}

.start-divider::before,
.start-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.start-join {
  display: flex;
  gap: 8px;
  margin: 0;
}

.start-join .start-input {
  flex: 1 1 auto;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.start-join .start-secondary {
  flex: 0 0 auto;
  width: auto;
  height: 46px;
  margin-top: 0;
  padding: 0 22px;
}

.start-note {
  margin-top: 10px;
  font-size: 13px;
  color: #ffb4ab;
}

.start-note[hidden] {
  display: none;
}

.start-foot {
  margin-top: 18px;
  font-size: 12px;
  color: rgba(245, 245, 247, 0.4);
}

@keyframes start-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .start-card {
    padding: 26px 20px 22px;
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .start-home { animation: none; }
  .start-primary, .start-secondary, .start-toggle, .start-switch, .start-switch::after { transition: none; }
}
