:root {
  --bg-sky: #0f0f10;
  --bg-cloud: #1a1a1d;
  --ink: #f6f3e8;
  --ink-soft: #d9cfa6;
  --lilac: #d7262e;
  --sage: #f2b705;
  --peach: #8f0d12;
  --gold: #ffd84d;
  --danger: #ff6f61;
  --success: #f2b705;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Quicksand", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, #2a0d0f 0, var(--bg-sky) 45%, #050505 100%);
  min-height: 100vh;
}

body.faction-red {
  background: #1f080a;
}

body.faction-yellow {
  background: #2b2200;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 85% 15%, rgba(215, 38, 46, 0.4) 0%, transparent 35%),
    radial-gradient(circle at 15% 70%, rgba(242, 183, 5, 0.35) 0%, transparent 38%);
}

.glass {
  backdrop-filter: blur(8px);
  background: rgba(20, 20, 23, 0.82);
  border: 1px solid rgba(255, 216, 77, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.topbar {
  margin: 16px auto;
  width: min(1120px, calc(100% - 24px));
  border-radius: 22px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.brand h1 {
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-size: 1.2rem;
}

.brand p {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.brand-star {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--lilac), #82070c);
  color: white;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.demo-badge {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  background: linear-gradient(145deg, #ffe27a, var(--gold));
  color: #2b2200;
}

nav a {
  text-decoration: none;
  color: #ffe27a;
  font-weight: 700;
  margin-left: 10px;
}

main {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto 24px;
}

.route {
  display: none;
  animation: fadeIn 220ms ease;
}

.route.active {
  display: block;
}

.hero {
  border-radius: 28px;
  padding: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.hero h2 {
  margin: 6px 0;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-family: "Nunito", sans-serif;
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: var(--ink-soft);
}

.hero-sparkles {
  font-size: 1.4rem;
  color: #bf86f2;
  animation: float 2.3s ease-in-out infinite;
}

.grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 420px);
  gap: 18px;
}

.card {
  border-radius: 24px;
  padding: 20px;
}

form label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

input {
  border: 1px solid #6d5a1a;
  background: #111215;
  color: #fff4cf;
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
}

select {
  border: 1px solid #6d5a1a;
  background: #111215;
  color: #fff4cf;
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
}

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 2px solid #ffd84d;
  outline-offset: 2px;
}

.cta,
button,
.cta-link {
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button,
.cta-link.soft {
  background: linear-gradient(145deg, #2b2b31, #151519);
  color: #fff0b5;
  text-decoration: none;
}

.cta,
.cta-link {
  background: linear-gradient(145deg, var(--lilac), #8f1015);
  color: #fff7d8;
  box-shadow: 0 10px 18px rgba(128, 8, 13, 0.45);
}

button:hover,
.cta-link:hover {
  transform: translateY(-1px);
}

.status {
  min-height: 20px;
  margin: 4px 0 0;
  color: #f3d46f;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

.preview {
  display: grid;
  gap: 12px;
  align-content: start;
}

.preview img,
#success-image {
  width: 100%;
  border-radius: 18px;
  border: 1px solid #6d5a1a;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.preview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.success-card {
  border-radius: 26px;
  padding: 22px;
  max-width: 760px;
  margin: 8px auto;
}

.tx {
  background: #18191d;
  border: 1px solid #6d5a1a;
  border-radius: 12px;
  padding: 10px;
  font-size: 0.9rem;
  word-break: break-all;
}

.gallery-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.gallery-item {
  border-radius: 18px;
  background: #151519;
  border: 1px solid #6d5a1a;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.gallery-meta {
  padding: 10px;
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }
}
