/* Video su Richiesta — stile Sora: scuro, cinematografico, video al centro. */
:root {
  --bg: #0a0a0f;
  --surface: #14141c;
  --surface-2: #1c1c26;
  --input: #0f0f16;
  --border: #262633;
  --border-strong: #343444;
  --text: #f4f4f6;
  --muted: #9a9aad;
  --accent: #6ea8fe;
  --accent-2: #a855f7;
  --grad: linear-gradient(135deg, #5b8cff, #a855f7);
  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.16);
  --blue: #60a5fa;
  --blue-bg: rgba(96, 165, 250, 0.16);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.16);
  --red: #f87171;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(600px 300px at 50% -80px, rgba(124, 108, 255, 0.22), transparent 70%),
    radial-gradient(400px 200px at 85% 0, rgba(91, 140, 255, 0.14), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Barra in alto, come l'app: logo + nome, sfondo sfocato. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 0.8rem;
  padding-left: 2px;
  box-shadow: 0 4px 16px rgba(124, 108, 255, 0.45);
}
.topbar-tag {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

main { max-width: 680px; margin: 0 auto; padding: 0 16px 48px; }

/* Hero: titolo grande, una parola in gradiente. */
.hero { text-align: center; padding: 36px 8px 8px; }
.hero h1 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle { margin: 12px 0 0; color: var(--muted); font-size: 1.02rem; }

/* Composer: la scheda scura con il prompt. */
.composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  margin-top: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.composer-label { font-size: 1.05rem; }
label, .label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
  font-size: 0.92rem;
}
label:first-child { margin-top: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
input[type="text"], textarea {
  width: 100%;
  padding: 13px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--input);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]::placeholder, textarea::placeholder { color: #5d5d70; }
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.22);
}
#title {
  font-size: 1.08rem;
  padding: 15px 16px;
  border-radius: 16px;
}
textarea { resize: vertical; }

.style-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--input);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.style-card.selected {
  border-color: var(--accent);
  background: rgba(110, 168, 254, 0.12);
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.18);
}
.style-emoji { font-size: 1.9rem; }
.style-name { font-weight: 700; font-size: 0.95rem; }
.style-desc { font-size: 0.78rem; color: var(--muted); }

/* Pulsante principale bianco, come la CTA di Sora. */
#submitBtn {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0a0a0f;
  background: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}
#submitBtn:hover { opacity: 0.92; }
#submitBtn:active { transform: scale(0.985); }
#submitBtn:disabled { opacity: 0.55; cursor: wait; }
.form-msg { margin: 12px 0 0; font-weight: 600; text-align: center; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: var(--red); }

.banner {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--amber-bg);
  color: var(--amber);
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.banner button {
  margin-left: 8px;
  padding: 6px 14px;
  border: none;
  border-radius: 999px;
  background: var(--amber);
  color: #0a0a0f;
  font-weight: 700;
  cursor: pointer;
}
.hidden { display: none !important; }

/* Bacheca video: griglia di schede, come l'Explore di Sora. */
.feed { margin-top: 36px; }
.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.feed-head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.feed-count { color: var(--muted); font-size: 0.88rem; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
.board-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 560px) {
  .board-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.7rem; }
}
.loading, .empty { color: var(--muted); text-align: center; padding: 20px 0; }
.req {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.req-media {
  position: relative;
  background: #000;
  aspect-ratio: 9 / 14;
  max-height: 520px;
  overflow: hidden;
}
.req-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.req-media .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.req-pending {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    radial-gradient(300px 200px at 50% 30%, rgba(124, 108, 255, 0.25), transparent 70%),
    var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 20px;
}
.req-pending .dots::after {
  content: "";
  animation: dots 1.4s steps(4) infinite;
}
@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}
.req-pending .pending-icon { font-size: 2.2rem; }
.req-body { padding: 14px 16px 16px; }
.req-title {
  font-weight: 700;
  font-size: 1.02rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.req-meta { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
.req-details { margin: 8px 0 0; font-size: 0.92rem; color: #c9c9d6; white-space: pre-wrap; }
.badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.badge.attesa { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.35); }
.badge.lavorazione { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(96, 165, 250, 0.35); }
.badge.pronto { background: var(--green-bg); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.35); }

footer { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 32px; }
