@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Space+Mono:wght@400;700&display=swap");
:root {
  --font-mono: 'IBM Plex Mono', monospace;
  --font-display: 'Space Mono', monospace;
  --text: #d4d4d0;
  --text-bright: #f0f0ec;
  --text-muted: #b8b8b0;
  --text-dim: #9a9a92;
  --text-faint: #7a7a72;
  --text-dark: #a0a098;
  --bg: #0e0e0e;
  --bg-alt: #0a0a0a;
  --bg-surface: #141414;
  --bg-elevated: #1e1e1e;
  --border: #2a2a2a;
  --border-subtle: #1e1e1e;
  --accent: #cc3333;
  --max-width: 1024px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-mono);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.nav__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav__logo {
  height: 16px;
  width: auto;
  display: block;
}
.nav__menu {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
}
.nav__link {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav__link:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  line-height: 1.4;
  transition: opacity 0.15s;
}
.btn--lg {
  padding: 12px 20px;
  font-size: 12px;
}
.btn--primary {
  background: var(--text-bright);
  color: var(--bg);
}
.btn--primary:hover {
  opacity: 0.85;
}
.btn--danger {
  background: var(--accent);
  color: var(--text-bright);
}
.btn--danger:hover {
  opacity: 0.85;
}
.btn--outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--text-faint);
  color: var(--text);
}
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding-left: 0;
  padding-right: 0;
}
.btn--ghost:hover {
  color: var(--text);
}

.recorder {
  padding: 48px 0 3rem;
  text-align: center;
}
.recorder__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
  color: var(--text-bright);
}
.recorder__subtitle {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}
.recorder__stage {
  position: relative;
  width: 100%;
  aspect-ratio: auto 16/9;
  min-height: 160px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1rem;
}
.recorder__preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.recorder__preview--mirrored {
  transform: scaleX(-1);
}
.recorder__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
}
.recorder__overlay-text {
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.recorder__timer {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-bright);
  padding: 0.2rem 0.5rem;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  letter-spacing: 0.1em;
}
.recorder__timer--warning {
  color: var(--accent);
}
.recorder__controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.recorder__review {
  margin-top: 1rem;
}
.recorder__review-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text-bright);
}
.recorder__review-video-wrap {
  width: 100%;
  aspect-ratio: auto 16/9;
  min-height: 160px;
  background: #000;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.recorder__review-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.recorder__review-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.recorder__uploading {
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.recorder__uploading p {
  margin-top: 0.75rem;
}
.recorder__spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.recorder__result {
  padding: 1.5rem 0;
}
.recorder__result-preview {
  width: 100%;
  aspect-ratio: auto 16/9;
  min-height: 160px;
  background: #000;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.recorder__result-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.recorder__result-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-bright);
}
.recorder__result-link-wrap {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.recorder__result-link {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-right: none;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-surface);
  outline: none;
  letter-spacing: 0.04em;
}
.recorder__result-link:focus {
  border-color: var(--text-faint);
  color: var(--text);
}
.recorder__auth-prompt {
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin-top: 1rem;
}
.recorder__auth-prompt-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}
.recorder__auth-prompt-text {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 1.25rem;
}
.recorder__error {
  padding: 1.5rem;
  background: rgba(204, 51, 51, 0.08);
  border: 1px solid rgba(204, 51, 51, 0.25);
  margin-top: 1rem;
}
.recorder__error-text {
  color: #f08080;
  margin-bottom: 0.75rem;
  font-size: 12px;
}

.landing {
  padding: 72px 0 48px;
}
.landing__tape {
  width: 48px;
  height: 2px;
  background: var(--border);
  margin-bottom: 28px;
}
.landing__headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-bright);
}
.landing__headline em {
  font-style: normal;
  color: var(--text-dark);
  text-decoration: line-through;
  text-decoration-color: var(--border);
}
.landing__subtext {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 2.25rem;
  letter-spacing: 0.01em;
}
.landing__cta-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.landing__details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 3rem;
  border: 1px solid var(--border);
}
.landing__detail {
  padding: 20px 18px;
  border-right: 1px solid var(--border);
}
.landing__detail:last-child {
  border-right: none;
}
.landing__detail strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}
.landing__detail span {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.my-casts {
  padding: 2rem 0 3rem;
}
.my-casts__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  margin-bottom: 1.75rem;
}
.my-casts__empty {
  text-align: center;
  padding: 4rem 0;
  border: 1px solid var(--border);
}
.my-casts__empty p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.my-casts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.cast-card {
  display: block;
  text-decoration: none;
  overflow: hidden;
  background: var(--bg-surface);
  transition: background 0.2s;
  position: relative;
}
.cast-card:hover {
  background: var(--bg-elevated);
}
.cast-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.cast-card__preview {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.cast-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cast-card__meta {
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--border-subtle);
}
.cast-card__date {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cast-card__actions {
  display: flex;
  gap: 2px;
  padding: 0.375rem 0.5rem;
  border-top: 1px solid var(--border-subtle);
  justify-content: flex-end;
}
.cast-card__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.15s;
}
.cast-card__action-btn:hover {
  color: var(--text-muted);
}
.cast-card__action-btn--danger:hover {
  color: var(--accent);
}

.toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(-0.5rem);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 200;
  white-space: nowrap;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.dialog {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.75rem;
  max-width: 360px;
  width: calc(100% - 2rem);
}
.dialog__message {
  color: var(--text);
  font-size: 13px;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.dialog__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.cast-player {
  padding: 2rem 0 3rem;
}
.cast-player__video-wrap {
  width: 100%;
  aspect-ratio: auto 16/9;
  min-height: 160px;
  background: #000;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.cast-player__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cast-player__meta {
  text-align: center;
  margin-bottom: 1rem;
}
.cast-player__date {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cast-player__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.cast-player__link-wrap {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 480px;
}
.cast-player__link {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-right: none;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-surface);
  outline: none;
  letter-spacing: 0.04em;
  min-width: 0;
}
.cast-player__link:focus {
  border-color: var(--text-faint);
  color: var(--text);
}

.cast-not-found {
  text-align: center;
  padding: 4rem 0;
}
.cast-not-found h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}
.cast-not-found p {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}

.footer {
  margin-top: auto;
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
  padding: 14px 24px;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer__text {
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer__text a {
  color: inherit;
  text-decoration: none;
}
.footer__text a:hover {
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .recorder__controls {
    flex-direction: column;
    align-items: center;
  }
  .recorder__result-link-wrap {
    flex-direction: column;
  }
  .recorder__result-link-wrap .recorder__result-link {
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  .cast-player__link-wrap {
    flex-direction: column;
  }
  .cast-player__link-wrap .cast-player__link {
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  .landing__details {
    grid-template-columns: 1fr;
  }
  .landing__details .landing__detail {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .landing__details .landing__detail:last-child {
    border-bottom: none;
  }
}
.lf-cta-dot {
  width: 7px;
  height: 7px;
  background: #cc3333;
  border-radius: 50%;
  animation: blink 1.4s step-end infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}