:root {
  color-scheme: light;
  --bg: #eef5fd;
  --panel: #ffffff;
  --ink: #0e1a2b;
  --muted: #5a6f86;
  --accent: #2aabee;
  --accent-deep: #1f86d1;
  --accent-soft: #dff2ff;
  --border: #d6e3f1;
  --shadow: 0 22px 60px rgba(18, 48, 74, 0.14);
  --glow: 0 14px 30px rgba(42, 171, 238, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #ffffff 0%, #e1f1ff 45%, var(--bg) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  opacity: 0.6;
}

body::before {
  width: 520px;
  height: 520px;
  top: -220px;
  right: -120px;
  background: radial-gradient(circle, #cfe9ff 0%, rgba(207, 233, 255, 0) 70%);
}

body::after {
  width: 420px;
  height: 420px;
  bottom: -220px;
  left: -120px;
  background: radial-gradient(circle, #e8f7ff 0%, rgba(232, 247, 255, 0) 70%);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  position: relative;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
  animation: rise 0.6s ease both;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 12px;
}

.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 480px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: rise 0.7s ease both;
  animation-delay: 0.1s;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

input[type="file"],
textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f7fbff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="file"]::file-selector-button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  margin-right: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 600;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: #c7eaff;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

input[type="file"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.2);
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--glow);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(42, 171, 238, 0.35);
}

.status {
  font-size: 13px;
  color: var(--muted);
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.preview-frame {
  position: relative;
  background: linear-gradient(160deg, #13293d, #0b1724);
  border-radius: 24px;
  overflow: hidden;
  min-height: 340px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  animation: rise 0.8s ease both;
  animation-delay: 0.2s;
}

.seo-section {
  margin-top: 32px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.seo-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.seo-card h2 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 20px;
}

.seo-card h3 {
  margin: 16px 0 6px;
  font-size: 15px;
}

.seo-card p,
.seo-card li {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.seo-card ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.seo-card.faq h3:first-of-type {
  margin-top: 0;
}

.placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #c3d7ea;
  font-size: 15px;
  letter-spacing: 0.05em;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.12),
      transparent 45%
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.08) 12px,
      rgba(255, 255, 255, 0.02) 12px,
      rgba(255, 255, 255, 0.02) 24px
    );
}

.placeholder.hidden {
  display: none;
}

#preview {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.25s ease;
  box-shadow: 0 18px 30px rgba(11, 23, 36, 0.4);
}

#preview.visible {
  opacity: 1;
}

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

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

  .preview-frame {
    min-height: 280px;
  }
}
