:root {
  --bg: #070816;
  --bg-soft: #0f1228;
  --card: rgba(18, 22, 44, 0.82);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f8;
  --muted: #b8bbcb;
  --primary: #8b5cf6;
  --primary-2: #ec4899;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.12), transparent 24%),
    var(--bg);
  overflow-x: hidden;
}

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

button,
textarea {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.bg-glow {
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
}

.bg-glow-1 {
  top: -120px;
  left: -120px;
  background: rgba(139, 92, 246, 0.35);
}

.bg-glow-2 {
  bottom: -120px;
  right: -90px;
  background: rgba(236, 72, 153, 0.28);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 22, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
}

.logo-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  color: var(--muted);
  font-weight: 500;
}

.nav a:hover {
  color: #fff;
}

.menu-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 1.6rem;
  cursor: pointer;
}

.hero {
  padding: 76px 0 24px;
}

.hero-single {
  max-width: 920px;
}

.badge,
.section-badge,
.mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.badge,
.section-badge {
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #ddceff;
}

.mini-badge {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.24);
  color: #ffc6e4;
}

.hero-single h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 900px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.08rem;
  max-width: 760px;
}

.prompt-box {
  background: linear-gradient(
    180deg,
    rgba(18, 22, 44, 0.94),
    rgba(10, 12, 28, 0.94)
  );
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  max-width: 920px;
}

.prompt-box textarea {
  width: 100%;
  resize: vertical;
  min-height: 130px;
  border: 0;
  outline: none;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  padding: 18px;
  line-height: 1.7;
}

.prompt-box textarea::placeholder {
  color: #8f94ab;
}

.prompt-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.prompt-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d8dcef;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.pill-btn:hover {
  border-color: rgba(139, 92, 246, 0.36);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(139, 92, 246, 0.24);
}

.btn.is-loading {
  position: relative;
}

.helper-text {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.results-section {
  padding: 12px 0 60px;
}

.results-head {
  margin-bottom: 24px;
}

.results-head h2 {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.results-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  color: #dde0ed;
}

.hidden {
  display: none !important;
}

.loader {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-box {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #fecaca;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.result-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.result-image {
  width: 100%;
  height: 260px;
  background: #11152d;
  overflow: hidden;
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-image {
  display: grid;
  place-items: center;
  color: #cfd4ea;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(236, 72, 153, 0.18));
  width: 100%;
  height: 100%;
}

.result-content {
  padding: 22px;
}

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  color: #dfd1ff;
  font-size: 0.86rem;
  font-weight: 700;
}

.result-score {
  color: #9cf0b3;
  font-weight: 800;
  font-size: 0.95rem;
}

.result-card h3 {
  margin: 0 0 10px;
  font-size: 1.24rem;
}

.result-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.75;
}

.meta-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #dce0ee;
  font-size: 0.95rem;
  line-height: 1.6;
}

.meta-label {
  color: #ffffff;
  font-weight: 700;
}

.video-embed {
  margin: 18px 0;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.action-link:hover {
  border-color: rgba(139, 92, 246, 0.36);
}

.disabled-link {
  opacity: 0.55;
  cursor: default;
}

.skeleton-card .result-content {
  padding: 22px;
}

.skeleton-block,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.skeleton-block::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  animation: shimmer 1.4s infinite;
}

.skeleton-line {
  height: 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.skeleton-line-lg {
  height: 20px;
  width: 70%;
}

.skeleton-line-sm {
  width: 35%;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.site-footer {
  padding: 28px 0 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

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

.footer-links a {
  color: var(--muted);
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-email {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-email a {
  color: #fff;
  font-weight: 600;
}

.contact-email a:hover {
  text-decoration: underline;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    background: rgba(7, 8, 22, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 540px) {
  .hero {
    padding-top: 56px;
  }

  .btn {
    width: 100%;
  }

  .prompt-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .result-image {
    height: 220px;
  }
}
