/* Generatore di frontespizio tesi di laurea — stile locale (la shell del sito è in /frontend/style.css) */
:root {
  --ft-bg: #0d1220;
  --ft-panel: rgba(22, 34, 58, 0.95);
  --ft-panel-2: #101a30;
  --ft-text: #f0f4f8;
  --ft-muted: #8899aa;
  --ft-accent: #CCFF00;
  --ft-accent-2: #00E5FF;
  --ft-border: rgba(0, 229, 255, 0.22);
  --ft-danger: #f87171;
  --uni-color: #95a5a6;
}

body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--ft-bg); color: var(--ft-text); margin: 0; }
.ft-wrap { max-width: 1320px; margin: 0 auto; padding: 1.2rem 1.2rem 3rem; }

/* Hero */
.ft-hero { text-align: center; padding: 1.6rem 0 1.8rem; }
.ft-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
.ft-hero h1 em { font-style: normal; color: var(--ft-accent); }
.ft-hero p { color: var(--ft-muted); max-width: 720px; margin: 0 auto; line-height: 1.6; font-size: 1.02rem; }
.ft-hero .ft-kicker { display: inline-block; font-family: 'Fira Mono', Consolas, monospace; font-size: 0.78rem; letter-spacing: 0.12em; color: var(--ft-accent-2); margin-bottom: 0.6rem; }

/* Layout */
.ft-grid { display: grid; grid-template-columns: minmax(320px, 500px) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
@media (max-width: 960px) { .ft-grid { grid-template-columns: 1fr; } }

.ft-card { background: var(--ft-panel); border: 1px solid var(--ft-border); border-radius: 1.2rem; padding: 1.3rem 1.3rem 1.1rem; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25); }
.ft-card h2 { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ft-accent-2); margin: 0 0 1rem; font-family: 'Fira Mono', Consolas, monospace; font-weight: 700; }
.ft-card h2 .ft-step { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--ft-accent); color: #0b1020; font-weight: 900; margin-right: 0.5rem; font-size: 0.8rem; }

/* Form */
.ft-field { margin-bottom: 0.9rem; }
.ft-field[hidden] { display: none; }
.ft-field label { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ft-muted); margin-bottom: 0.32rem; }
.ft-req { color: var(--ft-accent); margin-left: 0.2rem; }
.ft-field input[type="text"], .ft-field select, .ft-field textarea {
  width: 100%; box-sizing: border-box; background: #0b1020; border: 1px solid rgba(255, 255, 255, 0.13); color: #fff;
  border-radius: 0.65rem; padding: 0.68rem 0.8rem; font: inherit; font-size: 0.97rem; transition: border-color 0.15s, box-shadow 0.15s;
}
.ft-field textarea { resize: vertical; min-height: 3.2rem; }
.ft-field input:focus, .ft-field select:focus, .ft-field textarea:focus { outline: none; border-color: var(--ft-accent-2); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15); }
.ft-field input:invalid:not(:placeholder-shown) { border-color: rgba(248, 113, 113, 0.6); }
.ft-field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8899aa 50%), linear-gradient(135deg, #8899aa 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.ft-field select optgroup { color: var(--ft-accent); background: #0b1020; }
.ft-field select option { color: #fff; background: #0b1020; }
.ft-field input[type="file"] { color: var(--ft-muted); font-size: 0.9rem; }
.ft-help { display: block; font-size: 0.76rem; color: var(--ft-muted); margin-top: 0.3rem; line-height: 1.45; }
.ft-check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; color: var(--ft-text); cursor: pointer; }
.ft-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--ft-accent); }
.ft-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 480px) { .ft-row { grid-template-columns: 1fr; } }

.ft-sep { border: 0; border-top: 1px dashed rgba(255, 255, 255, 0.12); margin: 1.1rem 0 0.9rem; }
.ft-subhead { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ft-muted); margin: 0 0 0.7rem; }

/* Nota ateneo */
.ft-note { border-left: 3px solid var(--uni-color); background: rgba(255, 255, 255, 0.04); padding: 0.6rem 0.8rem; border-radius: 0.5rem; font-size: 0.82rem; line-height: 1.5; color: #c7d2e0; margin: -0.2rem 0 1rem; }
.ft-note[hidden] { display: none; }
.ft-badge { display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 999px; background: rgba(0, 229, 255, 0.15); color: var(--ft-accent-2); margin-bottom: 0.3rem; }
.ft-badge--warn { background: rgba(248, 113, 113, 0.15); color: var(--ft-danger); }
.ft-note-text { display: block; }

/* Bottoni */
.ft-actions { display: flex; gap: 0.7rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.ft-btn { border: 0; border-radius: 0.8rem; padding: 0.95rem 1.4rem; font: inherit; font-weight: 900; cursor: pointer; transition: transform 0.12s, filter 0.12s; }
.ft-btn:active { transform: translateY(1px); }
.ft-btn--primary { flex: 1 1 auto; background: var(--ft-accent); color: #0b1020; font-size: 1.02rem; box-shadow: 0 6px 22px rgba(204, 255, 0, 0.25); }
.ft-btn--primary:hover { filter: brightness(1.06); }
.ft-btn--primary:disabled { opacity: 0.6; cursor: wait; }
.ft-btn--ghost { background: transparent; color: var(--ft-muted); border: 1px solid rgba(255, 255, 255, 0.14); font-weight: 600; }
.ft-btn--ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.ft-fine { font-size: 0.74rem; color: var(--ft-muted); margin: 0.7rem 0 0; line-height: 1.5; }
.ft-fine a { color: var(--ft-accent-2); }

.ft-statusmsg { margin-top: 0.8rem; font-size: 0.86rem; padding: 0.6rem 0.8rem; border-radius: 0.6rem; background: rgba(255, 255, 255, 0.05); color: #c7d2e0; }
.ft-statusmsg[hidden] { display: none; }
.ft-statusmsg.is-ok { background: rgba(204, 255, 0, 0.1); color: var(--ft-accent); }
.ft-statusmsg.is-warn { background: rgba(248, 113, 113, 0.12); color: var(--ft-danger); }
.ft-statusmsg.is-info { background: rgba(0, 229, 255, 0.1); color: var(--ft-accent-2); }

.ft-user { font-size: 0.82rem; color: var(--ft-muted); margin: -0.4rem 0 0.9rem; }
.ft-user[hidden] { display: none; }
.ft-user a { color: var(--ft-accent-2); }

/* Anteprima */
.ft-preview-col { position: sticky; top: 1rem; }
@media (max-width: 960px) { .ft-preview-col { position: static; } }
.ft-preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.8rem; }
.ft-preview-head small { color: var(--ft-muted); font-size: 0.78rem; }
.ft-preview-wrap { position: relative; width: 100%; overflow: hidden; background: #1a2238; border-radius: 0.8rem; min-height: 200px; }
.ft-preview { position: absolute; top: 0; left: 0; transform-origin: top left; box-shadow: 0 14px 50px rgba(0, 0, 0, 0.55); }
.ft-preview .ft-paper p { word-wrap: break-word; }

/* Modal login */
.ft-modal { position: fixed; inset: 0; background: rgba(4, 8, 18, 0.78); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; }
.ft-modal[hidden] { display: none; }
.ft-modal-card { background: #0d1528; border: 1.5px solid rgba(204, 255, 0, 0.25); border-radius: 1.4rem; padding: 2rem 1.8rem; max-width: 440px; width: 100%; text-align: center; position: relative; }
.ft-modal-card h3 { margin: 0.4rem 0 0.5rem; font-size: 1.35rem; }
.ft-modal-card p { color: #8a97ab; font-size: 0.92rem; line-height: 1.6; margin: 0 0 1.2rem; }
.ft-modal-close { position: absolute; top: 0.7rem; right: 0.9rem; background: none; border: 0; color: #64748b; font-size: 1.4rem; cursor: pointer; }
.ft-gbtn { display: flex; align-items: center; justify-content: center; gap: 0.7rem; width: 100%; padding: 0.9rem 1.4rem; background: #fff; color: #1a1a2e; border-radius: 0.7rem; font-weight: 700; text-decoration: none; box-sizing: border-box; }
.ft-gbtn svg { width: 20px; height: 20px; }
.ft-modal-fine { font-size: 0.72rem; color: #4b5a70; margin-top: 1rem; line-height: 1.5; }
.ft-modal-fine a { color: var(--ft-accent); text-decoration: none; }
body.ft-modal-open { overflow: hidden; }

/* Contenuto SEO */
.ft-seo { max-width: 900px; margin: 3rem auto 0; color: #c7d2e0; line-height: 1.65; }
.ft-seo h2 { font-size: 1.35rem; color: #fff; margin: 2rem 0 0.7rem; }
.ft-seo h3 { font-size: 1.02rem; color: var(--ft-accent); margin: 1.2rem 0 0.3rem; }
.ft-seo p, .ft-seo li { font-size: 0.97rem; }
.ft-seo a { color: var(--ft-accent-2); }
.ft-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0; padding: 0; list-style: none; }
@media (max-width: 700px) { .ft-steps { grid-template-columns: 1fr; } }
.ft-steps li { background: var(--ft-panel-2); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0.9rem; padding: 1rem; }
.ft-steps b { display: block; color: #fff; margin-bottom: 0.3rem; }
.ft-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; list-style: none; margin: 0.6rem 0 0; }
.ft-chips li { font-size: 0.8rem; padding: 0.3rem 0.65rem; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.ft-faq details { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 0.55rem 0; }
.ft-faq summary { cursor: pointer; font-weight: 700; color: #fff; }
.ft-faq details p { margin: 0.5rem 0 0.2rem; }
.ft-cta-box { margin-top: 2rem; background: linear-gradient(120deg, rgba(204, 255, 0, 0.1), rgba(0, 229, 255, 0.08)); border: 1px solid var(--ft-border); border-radius: 1rem; padding: 1.2rem 1.4rem; }
.ft-cta-box a { font-weight: 800; }

/* Header condiviso: su schermi stretti la scritta centrale si sovrappone al logo */
@media (max-width: 900px) {
  .ft-livefeed { display: none !important; }
}
