:root {
  --bg: #07182d;
  --bg-deep: #0d2a49;
  --primary: #58b7e8;
  --accent: #d7b46a;
  --ink: #f5fbff;
  --muted: #a9bfd0;
  --panel: rgba(10, 31, 54, 0.78);
  --panel-strong: rgba(7, 24, 45, 0.92);
  --line: rgba(164, 203, 232, 0.18);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(88, 183, 232, 0.2), transparent 26rem),
    radial-gradient(circle at 92% 28%, rgba(215, 180, 106, 0.14), transparent 24rem),
    linear-gradient(135deg, var(--bg), var(--bg-deep) 54%, #06111f);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

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

.ambient {
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

.ambient-one {
  width: 34rem;
  height: 34rem;
  right: -15rem;
  top: 2rem;
  background: radial-gradient(circle, rgba(88, 183, 232, 0.16), transparent 64%);
}

.ambient-two {
  width: 42rem;
  height: 42rem;
  left: -20rem;
  bottom: -20rem;
  background: radial-gradient(circle, rgba(215, 180, 106, 0.12), transparent 66%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 17, 31, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  font-weight: 800;
}

.brand span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(215, 180, 106, 0.5);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #143d63);
  color: white;
  box-shadow: 0 12px 30px rgba(88, 183, 232, 0.2);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.nav a {
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.nav a:hover {
  color: var(--ink);
  border-color: rgba(215, 180, 106, 0.5);
  background: rgba(215, 180, 106, 0.08);
}

.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(1.2rem, 3vw, 2rem);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 10.8em;
  font-size: clamp(2.25rem, 4.8vw, 4.4rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.75rem);
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.hero-subtitle {
  max-width: 36rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.85;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1.55rem;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border-radius: 999px;
  padding: 0.82rem 1.25rem;
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-action {
  border: 1px solid rgba(215, 180, 106, 0.56);
  background: linear-gradient(135deg, #f0cf88, var(--accent));
  color: #07182d;
  box-shadow: 0 18px 42px rgba(215, 180, 106, 0.22);
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.secondary-action:hover {
  border-color: rgba(88, 183, 232, 0.5);
  background: rgba(88, 183, 232, 0.09);
}

.soft-note,
.copy-meta,
.admin-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(215, 180, 106, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(6, 17, 31, 0.58), transparent 42%, rgba(6, 17, 31, 0.2));
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 1rem;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: slowDrift 12s ease-in-out infinite alternate;
}

.review-flow,
.admin-dashboard {
  padding: 1rem 0 4rem;
}

.section-heading {
  margin-bottom: 1.5rem;
}

.flow-layout {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr 0.82fr;
  gap: 1rem;
  align-items: stretch;
}

.copy-panel,
.platform-panel,
.publish-panel,
.login-box,
.admin-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.copy-panel,
.platform-panel,
.publish-panel,
.admin-section {
  padding: 1.1rem;
}

.step-label {
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.language-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.language-option {
  min-height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.language-option.active {
  background: linear-gradient(135deg, rgba(88, 183, 232, 0.22), rgba(215, 180, 106, 0.18));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(215, 180, 106, 0.24);
}

.review-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.option-chip {
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.option-chip:hover,
.option-chip.active {
  border-color: rgba(215, 180, 106, 0.62);
  background: rgba(215, 180, 106, 0.13);
  color: var(--ink);
  transform: translateY(-1px);
}

.platform-grid {
  display: grid;
  gap: 0.75rem;
}

.platform-card {
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.platform-card > span:last-child {
  min-width: 0;
}

.platform-card:hover,
.platform-card.active {
  border-color: rgba(215, 180, 106, 0.52);
  background: rgba(215, 180, 106, 0.08);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.platform-logo {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  overflow: hidden;
  border: 1px solid rgba(88, 183, 232, 0.22);
  border-radius: 8px;
  background: rgba(88, 183, 232, 0.1);
  color: var(--primary);
  font-weight: 900;
}

.platform-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.platform-name {
  display: block;
  font-weight: 900;
}

.platform-url {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

textarea,
input[type="text"],
input[type="url"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 11, 22, 0.46);
  color: var(--ink);
  outline: 0;
  padding: 0.85rem;
}

textarea::placeholder,
input::placeholder {
  color: rgba(169, 191, 208, 0.76);
}

textarea:focus,
input:focus {
  border-color: rgba(88, 183, 232, 0.54);
  box-shadow: 0 0 0 4px rgba(88, 183, 232, 0.1);
}

#reviewText {
  min-height: 13.75rem;
  resize: vertical;
  line-height: 1.75;
}

.copy-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.publish-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.publish-card {
  flex: 1;
  padding: 1rem;
  border: 1px solid rgba(215, 180, 106, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 180, 106, 0.08), transparent),
    rgba(255, 255, 255, 0.045);
}

.publish-kicker {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.publish-card p:last-child {
  margin: 0.9rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.publish-action {
  width: 100%;
}

.login-panel {
  display: grid;
  min-height: calc(100vh - 5rem);
  place-items: center;
  padding: 2rem 0;
}

.login-box {
  width: min(440px, 100%);
  padding: clamp(1.2rem, 4vw, 2rem);
}

.login-box h1,
.admin-dashboard h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.login-box p {
  color: var(--muted);
  line-height: 1.7;
}

.login-form,
.stack-form {
  display: grid;
  gap: 0.85rem;
}

.error-text {
  display: inline-block;
  margin-top: 0.8rem;
  color: #ff9a9a;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-section.wide {
  grid-column: 1 / -1;
}

.admin-section h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.file-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.9rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.image-preview {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(215, 180, 106, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.color-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.color-row label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

input[type="color"] {
  width: 100%;
  height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #07182d;
  cursor: pointer;
}

.admin-platform-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.admin-platform-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.remove-btn {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 125, 125, 0.12);
  color: #ffb4b4;
  cursor: pointer;
  padding: 0.48rem 0.75rem;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  max-width: min(26rem, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  border: 1px solid rgba(215, 180, 106, 0.32);
  border-radius: 8px;
  background: rgba(7, 24, 45, 0.94);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.reveal {
  animation: riseIn 640ms ease both;
}

.delay-one {
  animation-delay: 120ms;
}

.delay-two {
  animation-delay: 220ms;
}

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

@keyframes slowDrift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.09) translate3d(-1.2%, 1%, 0);
  }
}

@media (max-width: 940px) {
  .hero,
  .flow-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 18rem;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.85rem 1rem;
  }

  .brand {
    width: 100%;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  .color-row {
    grid-template-columns: 1fr;
  }

  .review-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
