:root {
  --bg: #081019;
  --bg-2: #0d1724;
  --panel: rgba(10, 18, 30, 0.78);
  --panel-strong: rgba(12, 23, 38, 0.92);
  --ink: #ecf3ff;
  --muted: #8a9ab4;
  --line: rgba(149, 188, 255, 0.12);
  --accent: #6ee7d2;
  --accent-2: #ff8c69;
  --accent-3: #7ca8ff;
  --accent-4: #ffd977;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
  --shadow-strong: 0 32px 120px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(110, 231, 210, 0.14), transparent 22%),
    radial-gradient(circle at 86% 14%, rgba(124, 168, 255, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 140, 105, 0.16), transparent 24%),
    linear-gradient(180deg, #050a12 0%, var(--bg) 48%, #060d15 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(24px);
  opacity: 0.55;
}

body::before {
  width: 22rem;
  height: 22rem;
  top: -4rem;
  right: -6rem;
  background: rgba(124, 168, 255, 0.12);
}

body::after {
  width: 18rem;
  height: 18rem;
  left: -5rem;
  bottom: 10%;
  background: rgba(110, 231, 210, 0.12);
}

.backdrop-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 100%);
}

.cursor-glow {
  position: fixed;
  width: 18rem;
  height: 18rem;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(110, 231, 210, 0.16) 0%, rgba(124, 168, 255, 0.12) 38%, transparent 72%);
  filter: blur(10px);
  opacity: 0;
  z-index: 0;
  transition: opacity 220ms ease;
}

.page-shell {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2.5rem;
  position: relative;
  z-index: 1;
}

.topbar,
.panel,
.panel-inner {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 24, 39, 0.92), rgba(8, 14, 24, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 26px;
  margin-bottom: 1rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: block;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.brand-text {
  display: grid;
  gap: 0.22rem;
  align-content: center;
  justify-items: start;
}

.brand-tag,
.topbar-chip,
.helper-note,
.lede,
.step-item p,
.visual-scene,
.meme-caption,
.status-pill,
input,
select,
button,
.hero-pills span,
.pill-row span,
.tone-pill,
.format-pill {
  font-size: 0.96rem;
  line-height: 1.6;
}

.topbar-chip,
.status-chip,
.status-pill,
.hero-pills span,
.pill-row span,
.tone-pill,
.format-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.topbar-chip,
.status-chip,
.status-pill,
.hero-pills span,
.pill-row span,
.tone-pill,
.format-pill {
  padding: 0.48rem 0.84rem;
}

.menu-toggle {
  display: none;
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  margin-bottom: 1rem;
}

.mobile-menu a {
  display: block;
  padding: 0.9rem 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(149, 188, 255, 0.08);
  font-weight: 600;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel {
  border-radius: 30px;
  padding: 1.3rem;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.panel-inner {
  border-radius: 24px;
  padding: 1rem;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.hero-copy {
  position: relative;
  overflow: hidden;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: auto -8% -30% auto;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 168, 255, 0.2), transparent 65%);
  pointer-events: none;
}

.hero-eyebrow-row,
.section-head,
.summary-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.section-head.compact {
  margin-bottom: 0.85rem;
}

.eyebrow,
.mini-label,
label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.status-chip.live {
  color: var(--accent);
}

h1,
h2,
h3,
strong,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  line-height: 1.02;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  margin: 1rem 0 0;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 60ch;
  color: var(--muted);
  margin: 1rem 0 0;
}

.hero-pills,
.pill-row,
.meme-meta,
.hero-metrics,
.step-list {
  display: grid;
  gap: 0.75rem;
}

.hero-pills,
.pill-row,
.meme-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-pills {
  margin-top: 1.35rem;
}

.hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.4rem;
}

.hero-metrics article,
.hero-side-card,
.empty-state {
  border: 1px solid rgba(149, 188, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 22px;
}

.hero-metrics article {
  padding: 0.95rem;
}

.hero-metrics strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.hero-metrics span,
.brand-tag,
.helper-note,
.step-item p,
.visual-scene,
.meme-caption,
.status-pill,
.empty-state p {
  color: var(--muted);
}

.brand-tag {
  margin-bottom: 0;
  text-align: left;
  line-height: 1.35;
}

.hero-side {
  display: grid;
}

.hero-side-card {
  padding: 1.05rem;
  height: 100%;
}

.step-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(149, 188, 255, 0.07);
}

.step-item span {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(110, 231, 210, 0.18), rgba(124, 168, 255, 0.16));
  color: var(--ink);
  font-weight: 700;
}

.step-item strong {
  display: block;
  margin-bottom: 0.3rem;
}

.step-item p,
.helper-note,
.empty-state p,
.visual-scene,
.meme-caption {
  margin-bottom: 0;
}

.workspace {
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  gap: 1rem;
  align-items: start;
}

.meme-form {
  display: grid;
  gap: 1rem;
}

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

label {
  display: grid;
  gap: 0.45rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 54px;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(149, 188, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

select {
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: #0f1826;
  color: var(--ink);
}

input::placeholder {
  color: #7587a7;
}

input:focus,
select:focus {
  outline: 2px solid rgba(110, 231, 210, 0.16);
  border-color: rgba(110, 231, 210, 0.42);
  box-shadow: 0 0 0 6px rgba(110, 231, 210, 0.06);
}

button {
  border: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

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

.primary-button,
.ghost-button {
  min-height: 54px;
  padding: 0.92rem 1.15rem;
  border-radius: 999px;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  color: #07111f;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(110, 231, 210, 0.18);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border: 1px solid var(--line);
}

.helper-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.helper-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  flex-shrink: 0;
}

.status-pill {
  margin: 0;
  white-space: nowrap;
}

.results {
  display: grid;
  gap: 1rem;
}

.recent-activity {
  margin-top: 1rem;
}

.activity-list {
  display: grid;
  gap: 0.75rem;
}

.activity-item {
  width: 100%;
  display: grid;
  gap: 0.2rem;
  justify-items: start;
  text-align: left;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(149, 188, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.activity-item strong {
  font-size: 1rem;
  color: var(--ink);
}

.activity-item span,
.activity-empty {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.activity-item:hover {
  border-color: rgba(110, 231, 210, 0.28);
  background: rgba(110, 231, 210, 0.07);
}

.activity-empty {
  margin-bottom: 0;
}

.results.empty {
  min-height: 30rem;
  place-items: center;
}

.empty-state {
  max-width: 34rem;
  text-align: center;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.site-footer p,
.site-footer a {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--accent);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(149, 188, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(110, 231, 210, 0.3);
  background: rgba(110, 231, 210, 0.08);
}

.summary-bar {
  background:
    radial-gradient(circle at top right, rgba(110, 231, 210, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(16, 28, 45, 0.94), rgba(10, 18, 30, 0.94));
}

.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.meme-card {
  display: grid;
  gap: 0.95rem;
  overflow: hidden;
}

.visual-card {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(145deg, #162436 0%, #223a46 48%, #273456 100%);
  border: 1px solid rgba(149, 188, 255, 0.08);
}

.visual-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 168, 255, 0.2), transparent 70%);
  pointer-events: none;
}

.meme-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.03);
  background-size: 220% 100%;
  transition: transform 420ms ease, filter 420ms ease;
}

.meme-image[data-state="loading"] {
  animation: shimmer 1.3s linear infinite;
}

.meme-image[data-state="error"] {
  background: linear-gradient(145deg, rgba(255, 140, 105, 0.16), rgba(12, 23, 38, 0.4));
}

.meme-copy {
  display: grid;
  gap: 0.75rem;
}

.visual-heading {
  margin-bottom: 0;
  font-weight: 700;
  color: #d7e2f7;
}

.meme-line {
  margin-bottom: 0;
  font-size: 1.06rem;
  line-height: 1.55;
  font-weight: 700;
}

.panel:hover,
.panel-inner:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(149, 188, 255, 0.18);
}

.meme-card:hover .meme-image {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.04);
}

.primary-button:focus-visible,
.ghost-button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(124, 168, 255, 0.24);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero-side {
    order: 2;
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 0.75rem;
  }

  .topbar,
  .panel,
  .panel-inner {
    border-radius: 22px;
  }

  .topbar,
  .section-head,
  .summary-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
  }

  .topbar-chip {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-menu[data-open="true"] {
    display: block;
  }

  .hero-copy,
  .hero-side,
  .composer,
  .results-panel {
    padding: 1rem;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .hero-metrics,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .meme-grid {
    grid-template-columns: 1fr;
  }

  .visual-card,
  .meme-image {
    min-height: 240px;
  }

  h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  button,
  input,
  select,
  .primary-button,
  .ghost-button {
    min-height: 52px;
  }
}

@media (hover: none) {
  .cursor-glow {
    display: none;
  }

  .panel:hover,
  .panel-inner:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .meme-card:hover .meme-image {
    transform: none;
    filter: none;
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -20% 0;
  }
}
