:root {
  color-scheme: dark;
  --bg: #080806;
  --panel: #12110d;
  --panel-soft: #19160f;
  --gold: #ffd84d;
  --gold-deep: #b78a16;
  --text: #fff8d7;
  --muted: #c5b990;
  --line: rgba(255, 216, 77, 0.24);
  --white: #ffffff;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 6, 0.88);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand span {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--gold);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--gold);
  font-weight: 700;
}

.button.primary {
  background: linear-gradient(180deg, #ffe47a, #d49a16);
  border-color: transparent;
  color: #171100;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 8, 6, 0.98), rgba(8, 8, 6, 0.78) 48%, rgba(8, 8, 6, 0.30)),
    url("images/splash.png") center right / min(56vw, 720px) auto no-repeat;
  opacity: 0.96;
}

.hero-inner {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 104px;
}

.eyebrow {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 14px;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-stats {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  max-width: 620px;
  border: 1px solid var(--line);
  background: rgba(18, 17, 13, 0.72);
}

.stat {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  color: var(--gold);
  font-size: 24px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.app-status-notice {
  border-bottom: 1px solid rgba(255, 216, 77, 0.22);
  background: linear-gradient(90deg, rgba(255, 216, 77, 0.13), rgba(18, 17, 13, 0.88));
}

.app-status-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.app-status-inner strong {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 15px;
}

.app-status-inner span {
  color: rgba(255, 248, 215, 0.88);
  font-size: 14px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

.feature .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 216, 77, 0.12);
  color: var(--gold);
  font-size: 24px;
}

.feature h3 {
  margin: 18px 0 8px;
  font-size: 22px;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: center;
}

.live-feed-section {
  background: #0b0a07;
}

.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.feed-toolbar strong,
.feed-toolbar span {
  display: block;
}

.feed-toolbar span {
  color: var(--muted);
  font-size: 14px;
}

.highlight-block {
  margin-bottom: 28px;
}

.feed-subheading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.feed-subheading h3 {
  margin: 0;
  color: var(--gold);
  font-size: 24px;
}

.feed-subheading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.video-highlights {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.highlight-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.highlight-card:hover,
.highlight-card:focus-visible {
  border-color: rgba(255, 216, 77, 0.8);
  outline: none;
}

.highlight-media {
  position: relative;
  aspect-ratio: 9 / 13;
  background: #000;
}

.highlight-media img,
.highlight-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.highlight-play {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--gold);
  font-weight: 900;
}

.highlight-info {
  padding: 10px;
}

.highlight-info strong,
.highlight-info span {
  display: block;
}

.highlight-info strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-info span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.video-feed {
  display: grid;
  gap: 18px;
}

.tiktok-layout {
  position: relative;
  width: min(640px, 100%);
  margin: 0 auto;
}

.tiktok-feed {
  display: block;
  max-width: 520px;
  height: min(760px, 78vh);
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.feed-nav {
  position: absolute;
  right: 0;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 17, 13, 0.92);
  color: var(--gold);
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
}

.feed-nav:hover,
.feed-nav:focus-visible {
  border-color: rgba(255, 216, 77, 0.8);
  outline: none;
}

.feed-nav-prev {
  top: calc(50% - 58px);
}

.feed-nav-next {
  top: calc(50% + 10px);
}

.tiktok-feed::-webkit-scrollbar {
  width: 8px;
}

.tiktok-feed::-webkit-scrollbar-track {
  background: #0b0a07;
}

.tiktok-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 216, 77, 0.45);
  border-radius: 99px;
}

.video-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tiktok-feed .video-card {
  min-height: min(760px, 78vh);
  border: 0;
  border-bottom: 1px solid rgba(255, 216, 77, 0.22);
  border-radius: 0;
  background: #000;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.tiktok-feed .video-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 170px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.36) 45%,
    rgba(0, 0, 0, 0.72)
  );
  pointer-events: none;
}

.video-shell {
  position: relative;
  background: #000;
  aspect-ratio: 9 / 16;
}

.tiktok-feed .video-shell {
  height: min(760px, 78vh);
  aspect-ratio: auto;
}

.video-shell video,
.video-shell img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tiktok-feed .video-shell video {
  position: relative;
  z-index: 0;
  background: #000;
  object-fit: contain;
}

.video-shell video:fullscreen,
.video-shell video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: #000;
  object-fit: contain;
}

.video-card:fullscreen,
.video-card:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #000;
}

.video-card:fullscreen .video-shell,
.video-card:-webkit-full-screen .video-shell {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

.video-card:fullscreen video,
.video-card:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-card:fullscreen .video-control-bar,
.video-card:-webkit-full-screen .video-control-bar {
  left: 24px;
  right: 24px;
  bottom: 18px;
  z-index: 20;
}

.video-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.video-sound-toggle {
  display: none;
}

.video-control-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  min-height: 42px;
  display: grid;
  grid-template-columns: 38px auto minmax(70px, 1fr) 38px 54px 48px 38px 38px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 216, 77, 0.32);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.88);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.45);
}

.video-control-button {
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 77, 0.28);
  border-radius: 8px;
  background: rgba(255, 216, 77, 0.08);
  color: var(--gold);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.video-control-button-wide {
  width: auto;
  min-width: 46px;
  padding: 0 7px;
  font-size: 10px;
  text-transform: uppercase;
}

.video-control-button:hover,
.video-control-button:focus-visible {
  border-color: rgba(255, 216, 77, 0.78);
  outline: none;
}

.video-control-button-delete {
  border-color: rgba(255, 107, 107, 0.5);
  background: rgba(255, 107, 107, 0.12);
  color: #ffb8b8;
  font-weight: 800;
}

.video-control-button-delete:hover,
.video-control-button-delete:focus-visible {
  border-color: rgba(255, 107, 107, 0.88);
  color: #ffffff;
}

.video-time {
  color: rgba(255, 248, 215, 0.9);
  font-size: 12px;
  white-space: nowrap;
}

.video-progress {
  width: 100%;
  min-width: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.video-meta {
  padding: 14px;
}

.tiktok-feed .video-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 62px;
  z-index: 2;
  max-width: calc(100% - 24px);
  margin: 0 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.82), 0 1px 2px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.video-meta h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
}

.tiktok-feed .video-meta h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tiktok-feed .video-meta p {
  overflow: hidden;
  max-width: 86%;
  color: rgba(255, 248, 215, 0.82);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--gold);
  font-size: 13px;
}

.video-hint {
  display: block;
  width: 100%;
  color: rgba(255, 248, 215, 0.78);
  font-size: 12px;
}

.tiktok-feed .video-hint {
  display: none;
}

.feed-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  text-align: center;
  padding: 24px;
}

.phone-shot {
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  display: block;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

.steps {
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.step b {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: #141006;
}

.step h3 {
  margin: 0 0 4px;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.cta {
  background: linear-gradient(180deg, #17130b, #080806);
}

.cta-box {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.cta-box h2 {
  margin: 0 0 8px;
}

.cta-box p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.legal-page {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 92px;
}

.legal-page h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.legal-page h2 {
  margin-top: 34px;
  color: var(--gold);
}

.legal-page p,
.legal-page li {
  color: var(--muted);
}

.contact-list {
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.contact-list a {
  color: var(--gold);
  font-weight: 700;
}

.map-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  aspect-ratio: 16 / 9;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.admin-page {
  min-height: calc(100vh - 72px);
  padding: 64px 0 96px;
  background:
    linear-gradient(180deg, rgba(255, 216, 77, 0.08), rgba(8, 8, 6, 0) 260px),
    var(--bg);
}

.admin-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.admin-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.admin-heading h1 {
  font-size: clamp(40px, 6vw, 70px);
}

.admin-heading p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.admin-status {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 17, 13, 0.86);
  color: var(--muted);
}

.admin-status[data-tone="success"] {
  border-color: rgba(91, 255, 149, 0.35);
  color: #b8ffd1;
}

.admin-status[data-tone="error"] {
  border-color: rgba(255, 107, 107, 0.5);
  color: #ffb8b8;
}

.admin-panel,
.admin-metric,
.admin-message-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-panel {
  padding: 22px;
}

.admin-upload-panel {
  grid-column: 1 / -1;
}

.admin-help {
  margin: -4px 0 16px;
  color: var(--muted);
}

.admin-panel h2,
.admin-topbar h2 {
  margin: 0 0 14px;
  color: var(--gold);
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid rgba(255, 216, 77, 0.25);
  border-radius: 8px;
  background: #070706;
  color: var(--text);
  font: inherit;
  padding: 12px 13px;
}

.admin-form textarea {
  resize: vertical;
}

.upload-progress {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.upload-progress progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 216, 77, 0.25);
  border-radius: 999px;
  background: #070706;
  accent-color: var(--gold);
}

.admin-dashboard {
  display: grid;
  gap: 18px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 17, 13, 0.78);
}

.admin-topbar p {
  margin: 0;
  color: var(--muted);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.admin-metric {
  padding: 18px;
}

.admin-metric span {
  display: block;
  color: var(--muted);
}

.admin-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.admin-two {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 12px;
}

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

.admin-message-card {
  padding: 14px;
}

.admin-message-card strong,
.admin-message-card span {
  display: block;
}

.admin-message-card p {
  margin: 6px 0 8px;
  color: var(--muted);
}

.admin-message-card span {
  color: var(--gold);
  font-size: 12px;
}

@media (max-width: 820px) {
  main {
    display: flex;
    flex-direction: column;
  }

  .app-status-notice {
    order: 0;
  }

  #live-feed {
    order: 1;
  }

  #live-feed .container {
    display: flex;
    flex-direction: column;
  }

  #live-feed .section-heading {
    order: 0;
  }

  #live-feed .feed-toolbar {
    order: 1;
  }

  #live-feed .tiktok-layout {
    order: 2;
  }

  #live-feed .highlight-block {
    order: 3;
    margin-top: 24px;
  }

  .hero {
    order: 2;
  }

  #features {
    order: 3;
  }

  #creator {
    order: 4;
  }

  .cta {
    order: 5;
  }

  .nav {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: auto;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(8, 8, 6, 0.78), rgba(8, 8, 6, 0.98)),
      url("images/splash.png") top center / 430px auto no-repeat;
  }

  .hero-inner {
    padding-top: 280px;
  }

  .hero-stats,
  .feature-grid,
  .showcase,
  .admin-metrics,
  .admin-grid,
  .admin-two {
    grid-template-columns: 1fr;
  }

  .app-status-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 12px 0;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tiktok-feed,
  .tiktok-feed .video-card,
  .tiktok-feed .video-shell {
    height: 72vh;
    min-height: 560px;
  }

  .video-control-bar {
    grid-template-columns: 30px minmax(0, 1fr) 30px 42px 38px 30px 30px;
    gap: 6px;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .video-control-button {
    width: 30px;
    height: 30px;
  }

  .video-control-button-wide {
    width: auto;
    min-width: 36px;
    padding: 0 5px;
    font-size: 9px;
  }

  .video-time {
    display: none;
    font-size: 11px;
  }

  .tiktok-feed .video-meta {
    bottom: 58px;
    margin: 0 10px;
    padding: 0;
  }

  .video-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feed-subheading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tiktok-layout {
    padding-bottom: 64px;
  }

  .feed-nav {
    top: auto;
    bottom: 0;
    right: calc(50% - 54px);
  }

  .feed-nav-prev {
    right: calc(50% + 6px);
  }

  .feed-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .cta-box {
    align-items: flex-start;
    flex-direction: column;
  }
}
