:root {
  color: #f8fafc;
  background: #050507;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #050507;
}

body {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: max(12px, env(safe-area-inset-top)) 18px 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.topbar button {
  pointer-events: auto;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.accent-button {
  border-color: rgba(38, 208, 206, .7) !important;
  color: #b8fffd !important;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.server-status {
  max-width: 65vw;
  margin-top: 2px;
  overflow: hidden;
  color: #bec7d4;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiet-button,
.sound-button {
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.center-panel {
  display: grid;
  width: 100%;
  min-height: 100dvh;
  place-items: center;
  padding: 88px 20px 24px;
  overflow: auto;
  background:
    radial-gradient(circle at 80% 15%, rgba(38, 208, 206, .19), transparent 34%),
    radial-gradient(circle at 15% 80%, rgba(255, 45, 85, .16), transparent 30%),
    #050507;
}

.login-card {
  width: min(100%, 440px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  background: rgba(19, 21, 27, .88);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .44);
}

.login-card h1 {
  margin: 6px 0 10px;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.login-card p {
  color: #bec7d4;
  line-height: 1.5;
}

.login-card label {
  display: block;
  margin: 24px 0 8px;
  color: #e8edf4;
  font-size: 13px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  color: #fff;
  background: #0d1016;
}

.login-card input:focus {
  border-color: #26d0ce;
  box-shadow: 0 0 0 3px rgba(38, 208, 206, .16);
}

.primary-button {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  color: #001413;
  background: #26d0ce;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:disabled {
  cursor: wait;
  opacity: .58;
}

.eyebrow {
  margin: 0;
  color: #26d0ce !important;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}

.error {
  min-height: 1.5em;
  margin-bottom: 0 !important;
  color: #ff839f !important;
}

.feed {
  width: 100%;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #000;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
}

.clip {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.clip-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.clip-image {
  display: block;
}

.shade {
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .88));
  pointer-events: none;
}

.clip-info {
  position: absolute;
  z-index: 2;
  left: max(18px, env(safe-area-inset-left));
  right: 90px;
  bottom: max(26px, env(safe-area-inset-bottom));
  text-shadow: 0 2px 12px rgba(0, 0, 0, .85);
}

.clip-title {
  margin: 0;
  font-size: clamp(19px, 5vw, 28px);
  line-height: 1.15;
}

.clip-meta {
  margin: 7px 0 0;
  color: #dbe3ec;
  font-size: 13px;
}

.sound-button {
  position: absolute;
  z-index: 3;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(28px, env(safe-area-inset-bottom));
}

.feed-error {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 24px;
  width: min(calc(100% - 32px), 480px);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 131, 159, .5);
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  background: rgba(72, 17, 31, .94);
  text-align: center;
}

.upload-panel {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  overflow: auto;
  background: rgba(2, 4, 8, .86);
  place-items: center;
  backdrop-filter: blur(18px);
}

.upload-card {
  width: min(100%, 620px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 26px;
  padding: 26px;
  background: #12151c;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .65);
}

.upload-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.upload-heading h1 {
  margin: 6px 0 22px;
  font-size: clamp(25px, 5vw, 34px);
  letter-spacing: -.04em;
}

.file-drop {
  display: grid;
  min-height: 180px;
  border: 1px dashed #5b6879;
  border-radius: 18px;
  padding: 26px;
  color: #aeb9c7;
  background: #0a0d12;
  text-align: center;
  cursor: pointer;
  place-content: center;
  gap: 7px;
}

.file-drop:hover,
.file-drop:focus-within {
  border-color: #26d0ce;
  background: rgba(38, 208, 206, .06);
}

.file-drop-title {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.file-drop input {
  margin: 14px auto 0;
  max-width: 100%;
}

.selection-summary,
.progress-label {
  color: #bec7d4;
  font-size: 13px;
}

.upload-progress {
  margin-top: 18px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #252b36;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #26d0ce, #ff2d55);
  transition: width .15s ease;
}

[hidden] {
  display: none !important;
}

@media (min-width: 900px) {
  .feed {
    max-width: 620px;
    margin: 0 auto;
    border-right: 1px solid #1e2530;
    border-left: 1px solid #1e2530;
  }

  .clip-media {
    object-fit: cover;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feed {
    scroll-behavior: auto;
  }
}
