/* Stile degli strumenti Nopop e della home (si carica dopo pages.css). */
.hidden { display: none !important; }
body.tool-page main, body.home main { max-width: 960px; }
body.tool-page .site-header .inner, body.home .site-header .inner,
body.tool-page .site-footer .inner, body.home .site-footer .inner { max-width: 960px; }

/* Intestazione */
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-link { font-size: 14px; color: var(--text); text-decoration: none; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); white-space: nowrap; }
.nav-link:hover { border-color: var(--accent-strong); }
.kofi-btn { font-size: 14px; color: #fcd34d; text-decoration: none; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .08); white-space: nowrap; }
.lang-select { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 7px 6px; font: inherit; font-size: 14px; }
@media (max-width: 560px) {
    .nav-link .long, .kofi-btn .long { display: none; }
}

/* Titolo della pagina */
.tool-hero { margin-bottom: 20px; }
.tool-hero h1 { font-size: 30px; }
.tool-hero p { margin: 0; color: #cbd5e1; }
.badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; color: #a5b4fc; background: rgba(99, 102, 241, .12); border: 1px solid rgba(99, 102, 241, .35); border-radius: 999px; padding: 3px 10px; }

/* Spazi annuncio (fissi, mai vicino ai pulsanti) */
.ad-slot { margin: 0 0 24px; }
.ad-slot.bottom { margin: 40px 0 0; }
.ad-slot .ad-label { display: block; text-align: center; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #64748b; margin-bottom: 4px; }
.ad-slot .ad-box { min-height: 100px; border-radius: 12px; overflow: hidden; background: rgba(15, 23, 42, .4); }

/* Pannello dello strumento */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.dropzone { border: 2px dashed #334155; border-radius: 14px; padding: 36px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragging { border-color: var(--accent-strong); background: rgba(99, 102, 241, .07); outline: none; }
.dropzone svg { width: 36px; height: 36px; color: var(--accent); }
.dropzone strong { display: block; margin-top: 8px; color: #fff; }
.dropzone small { display: block; color: var(--muted); margin-top: 4px; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 18px; }
.field label, .field .label { display: block; font-size: 13px; font-weight: 600; color: #cbd5e1; margin-bottom: 6px; }
.field select, .field input[type="number"], .field input[type="text"] { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 15px; }
.field input[type="range"] { width: 100%; accent-color: var(--accent-strong); }
.field label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin: 0; }
.field label.check input { width: 18px; height: 18px; accent-color: var(--accent-strong); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin: 0; cursor: pointer; }

.file-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.file-list .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #1e293b; flex: none; }
.file-list .thumb.placeholder { display: grid; place-items: center; color: var(--muted); }
.file-list .thumb.placeholder svg { width: 20px; height: 20px; }
.file-list .num { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(99, 102, 241, .18); color: #c7d2fe; font-size: 13px; font-weight: 700; }
.file-list .info { flex: 1; min-width: 0; }
.file-list .name { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-list .meta-line { display: block; font-size: 12px; color: var(--muted); }
.file-list .meta-line .good { color: #6ee7b7; }
.file-list .meta-line .warn { color: #fcd34d; }
.file-list .actions { display: flex; gap: 4px; flex: none; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--accent-strong); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.toolbar .summary { font-size: 14px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; color: #fff; background: var(--accent-strong); border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #4f46e5; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.secondary:hover { border-color: var(--accent-strong); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.progress { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, #6366f1, #7c3aed); transition: width .2s; }

/* Dati trovati nelle foto */
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { font-size: 11px; border-radius: 6px; padding: 1px 6px; background: #1e293b; color: #cbd5e1; }
.tag.danger { background: rgba(239, 68, 68, .15); color: #fca5a5; }
.tag.ok { background: rgba(16, 185, 129, .15); color: #6ee7b7; }

/* Elenchi di strumenti */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tool-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--accent-strong); transform: translateY(-1px); }
.tool-card strong { display: block; color: #fff; font-size: 16px; }
.tool-card small { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.tool-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, rgba(99, 102, 241, .25), rgba(124, 58, 237, .2)); color: #c7d2fe; }
.tool-icon svg { width: 20px; height: 20px; }

/* Home */
.home-hero { text-align: center; padding: 24px 0 8px; }
.home-hero h1 { font-size: 38px; }
.home-hero p { max-width: 620px; margin: 0 auto; font-size: 18px; color: #cbd5e1; }
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 24px; }
.promise { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(15, 23, 42, .5); }
.promise strong { display: block; color: #fff; }
.promise span { color: var(--muted); font-size: 14px; }

/* FAQ e testo informativo */
.info-section { margin-top: 40px; }
.info-section details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 8px 0; }
.info-section summary { cursor: pointer; font-weight: 600; color: #fff; }
.info-section details p { margin: 8px 0 0; }

.kofi-box { margin-top: 32px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(245, 158, 11, .3); background: rgba(245, 158, 11, .06); font-size: 14px; }
.kofi-box p { margin: 0 0 4px; }
.kofi-box a { color: #fcd34d; }

/* Avvisi */
#toasts { position: fixed; bottom: 16px; right: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 50; pointer-events: none; }
.toast { max-width: 380px; padding: 10px 14px; border-radius: 12px; background: #1e293b; border: 1px solid #334155; color: #fff; font-size: 14px; box-shadow: 0 10px 25px rgba(0, 0, 0, .5); }
.toast.error { border-color: rgba(239, 68, 68, .6); }
.toast.success { border-color: rgba(16, 185, 129, .6); }
