:root {
  --blue-950: #0c2d4a;
  --blue-900: #0f4c81;
  --blue-700: #0369a1;
  --blue-500: #0ea5e9;
  --blue-400: #38bdf8;
  --blue-200: #bae6fd;
  --blue-100: #e0f2fe;
  --blue-50: #f0f9ff;
  --white: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --shadow: 0 10px 30px rgba(15, 76, 129, 0.12);
  --radius: 16px;
  --sticky-top: 0.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 35%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.2), transparent 30%),
    linear-gradient(180deg, var(--blue-100) 0%, var(--blue-50) 45%, var(--white) 100%);
  min-height: 100vh;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue-700);
}

a:hover {
  color: var(--blue-900);
}

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

.site-header {
  padding: 2rem 0 1rem;
}

.brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.85rem);
  color: var(--blue-900);
  line-height: 1.25;
}

.hero-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.social-proof {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  color: var(--blue-700);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.main-nav__btn {
  border: 1px solid rgba(14, 165, 233, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-900);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.main-nav__btn:hover {
  border-color: var(--blue-500);
  transform: translateY(-1px);
}

.main-nav__btn--primary {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  color: var(--white);
  border-color: transparent;
}

.main-nav__btn--primary:hover {
  border-color: transparent;
}

body.modal-open {
  overflow: hidden;
}

.custom-wallpaper {
  padding: 0;
}

.custom-wallpaper__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .custom-wallpaper__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.option-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.option-group legend {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-700);
  margin-bottom: 0.45rem;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.option-btn {
  border: 1px solid rgba(14, 165, 233, 0.28);
  background: var(--blue-50);
  color: var(--blue-900);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.option-btn:hover {
  border-color: var(--blue-500);
}

.option-btn.active {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  color: var(--white);
  border-color: transparent;
}

.custom-wallpaper__label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--blue-900);
}

.custom-wallpaper__textarea {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 110px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-wallpaper__textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.22);
}

.custom-wallpaper__hint {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.modal-dialog--create {
  width: min(640px, 100%);
}

.modal-footer--split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.modal-footer--split .btn-ai {
  flex: 1 1 auto;
  min-width: min(100%, 280px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  color: var(--white);
}

.btn-image {
  background: var(--white);
  color: var(--blue-900);
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.integrations {
  margin: 2rem 0 1rem;
}

.integrations-details {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.integrations-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue-900);
}

.integrations-details[open] .info-grid {
  margin-top: 1rem;
}

.info-grid {
  display: grid;
  gap: 1rem;
}

.info-card {
  background: var(--white);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.info-card--wide {
  grid-column: 1 / -1;
}

.info-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--blue-900);
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.toolbar {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.toolbar--sticky {
  position: sticky;
  top: var(--sticky-top);
  z-index: 100;
  padding: 0.75rem 0;
  background: rgba(240, 249, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
}

.search-wrap {
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 2.75rem;
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  pointer-events: none;
  opacity: 0.7;
  background: currentColor;
  color: var(--blue-700);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1px solid rgba(14, 165, 233, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-900);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.chip:hover {
  border-color: var(--blue-500);
}

.chip.active {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  color: var(--white);
  border-color: transparent;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.tabs {
  display: inline-flex;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 999px;
}

.tab-btn {
  border: 0;
  background: transparent;
  color: var(--blue-900);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  color: var(--white);
}

.stats {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
}

.prompbase-banner {
  display: none;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.08), rgba(14, 165, 233, 0.12));
  border: 1px solid rgba(14, 165, 233, 0.3);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
}

.prompbase-banner.show {
  display: flex;
}

.prompbase-banner__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--text);
}

.prompbase-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.prompt-list {
  display: grid;
  gap: 1rem;
  padding-bottom: 1rem;
}

.prompt-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.prompt-card--highlight {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.prompt-card--pulse {
  animation: card-pulse 0.6s ease 2;
}

@keyframes card-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
}

.prompt-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.prompt-number {
  font-weight: 700;
  color: var(--blue-900);
}

.format-badge,
.category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.format-badge {
  background: var(--blue-100);
  color: var(--blue-700);
}

.category-badge {
  background: rgba(15, 76, 129, 0.08);
  color: var(--blue-900);
  margin-left: auto;
}

.prompt-text {
  margin: 0 0 0.9rem;
  color: var(--text);
  font-size: 0.95rem;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.load-more-wrap {
  text-align: center;
  padding-bottom: 1.5rem;
}

.load-more-btn {
  min-width: 220px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 0.65rem 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

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

.btn:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.45);
  outline-offset: 2px;
}

.btn-copy {
  background: var(--blue-100);
  color: var(--blue-900);
}

.btn-ai {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  color: var(--white);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  border: 1px dashed rgba(14, 165, 233, 0.35);
}

.empty-state--error {
  border-style: solid;
  border-color: rgba(220, 38, 38, 0.25);
  text-align: left;
}

.empty-state-actions {
  margin-top: 1rem;
}

.empty-state-hint {
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  max-width: min(90vw, 420px);
  text-align: center;
  background: var(--blue-900);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(14, 165, 233, 0.15);
  margin-top: 1rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

.site-footer__brand {
  margin: 0;
  font-weight: 700;
  color: var(--blue-900);
}

.site-footer__proof {
  margin: 0;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.install-banner {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(15, 76, 129, 0.08);
  border: 1px solid rgba(15, 76, 129, 0.15);
}

.install-banner.show {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.onboarding-steps {
  padding-left: 1.2rem;
}

.onboarding-steps li + li {
  margin-top: 0.75rem;
}

.modal-advanced {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.modal-advanced ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.ai-skip-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.ai-model-option--saved {
  border-color: var(--blue-500);
  background: var(--blue-100);
}

@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .prompt-list {
    grid-template-columns: 1fr 1fr;
  }

  .stats {
    font-size: 0.95rem;
  }
}

@media (max-width: 599px) {
  .category-badge {
    margin-left: 0;
  }

  .prompt-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    text-align: center;
  }

  .prompt-actions .btn-image {
    flex: 1 1 100%;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 76, 129, 0.45);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 76, 129, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.modal-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.25rem 0.5rem;
}

.modal-header h2 {
  margin: 0;
  color: var(--blue-900);
  font-size: 1.25rem;
}

.modal-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.modal-body {
  padding: 0.5rem 1.25rem 1rem;
  color: var(--text);
}

.modal-body ol {
  margin: 0;
  padding-left: 1.2rem;
}

.modal-body li + li {
  margin-top: 0.65rem;
}

.modal-body code {
  background: var(--blue-100);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.88em;
}

.modal-note {
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.modal-footer {
  padding: 0 1.25rem 1.25rem;
}

.modal-dialog--models {
  width: min(480px, 100%);
}

.ai-model-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.ai-model-option {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: var(--blue-50);
  color: var(--blue-900);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ai-model-option:hover {
  background: var(--blue-100);
  border-color: var(--blue-500);
  transform: translateY(-1px);
}

.ai-model-option:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.45);
  outline-offset: 2px;
}

.ai-model-option small {
  display: block;
  margin-top: 0.2rem;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}
