:root {
  --bg: #070707;
  --card: #ffffff;
  --text: #eff1f6;
  --muted: #475569;
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --danger: #dc2626;
  --ring: #93c5fd;
  --border: #e2e8f0;
  --shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  --radius: 12px;
  --gap: 1rem;
  --maxw: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}
.logo-text {
  font-size: 24px;
  font-weight: bold;
  color: black;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Helvetica Neue, Arial, Noto Sans, Apple Color Emoji, Segoe UI Emoji;
  color: var(--text);
  background: linear-gradient(180deg, #f3f6fb 0, var(--bg) 100%);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1.25rem;
}

.nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: conic-gradient(
    from 45deg at 50% 50%,
    #60a5fa,
    #22d3ee,
    #a78bfa,
    #60a5fa
  );
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.menu {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.menu a {
  color: var(--muted);
  font-weight: 600;
}

.menu a.active {
  color: var(--brand);
}

.hero {
  text-align: center;
  margin: 2rem auto 1rem;
  color: black;
}

.hero h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.5rem, 2.2vw + 1rem, 2.25rem);
  letter-spacing: 0.2px;
}

.hero p {
  color: var(--muted);
  margin: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 1.5vw + 0.5rem, 1.5rem);
}

.form-row {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: black;
}

label {
  font-weight: 600;
}

.textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  line-height: 1.45;
  background: #fbfdff;
  outline: none;
  transition: border 0.12s, box-shadow 0.12s, background 0.12s;
}

.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
  background: #fff;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.75rem;
}

button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.btn-primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--brand-600);
}

.btn-secondary {
  background: #eef2ff;
  color: #3730a3;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-disabled,
.btn-primary-disabled {
  background: #cbd5e1 !important;
  color: white;
  cursor: not-allowed;
  box-shadow: none;
}

.status {
  margin-top: 0.25rem;
  min-height: 1.25rem;
  font-size: 0.95rem;
}

.status .ok {
  color: var(--muted);
  font-style: italic;
}

.status .err {
  color: var(--danger);
  font-weight: 700;
}

.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 1rem;
}

.slot {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* display: block; */
}

.slot .placeholder {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.95rem;
}

.slot .dl {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  display: flex;
  gap: 0.4rem;
}
.dl button {
  padding: 0.4rem 0.6rem;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}

.dl button:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* Footer */
footer {
  margin: 2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

footer .links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

footer .divider {
  opacity: 0.35;
}

/* Responsive */
@media (max-width: 980px) {
  .results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .menu {
    display: none;
  }
  .results {
    grid-template-columns: 1fr;
  }
  .hero {
    margin-top: 1.25rem;
  }
}
