/* ===== AvaTransfer Design System - Stile available.srl ===== */

:root {
    --primary: #d4a823;
    --primary-light: #f0c850;
    --secondary: #e04444;
    --cyan: #00e5ff;
    --purple: #a855f7;
    --pink: #ec4899;
    --orange: #e8823a;
    --green: #22c55e;
    --bg: #000000;
    --bg-surface: #0a0a14;
    --bg-card: rgba(15, 15, 25, 0.85);
    --bg-glass: rgba(10, 10, 20, 0.8);
    --text: #ffffff;
    --text-secondary: #f8f7f4;
    --text-muted: #aaaabb;
    --text-dim: #666;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(212, 168, 35, 0.4);
    --glass-blur: 20px;
    --container: 1400px;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-full: 50px;
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #d4a823, #f0c850);
    --gradient-rainbow: linear-gradient(90deg, #d4a823, #e04444, #e8823a, #e8c34a, #248641, #1a9e8f, #1bb8d0, #2b5ece, #5b36c9, #c2298f, #e04444);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family, 'DM Sans'), 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

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

/* ===== Container ===== */
.avt-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .avt-container { padding: 0 40px; } }

/* ===== Header ===== */
.avt-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid rgba(212, 168, 35, 0.15); height: 70px;
}
.avt-header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.avt-logo { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.avt-logo img { width: 40px; height: 40px; border-radius: 10px; }
.avt-nav { display: flex; align-items: center; gap: 24px; }
.avt-nav-link { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.avt-nav-link:hover { color: var(--primary); }
.avt-nav-admin { color: var(--primary); }
.avt-nav-logout { display: inline; }
.avt-mobile-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
    .avt-nav { display: none; }
    .avt-mobile-toggle { display: block; }
}

/* Mobile panel */
/* ===== 404 Not Found page ===== */
.avt-404 {
    min-height: calc(100vh - 200px);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.avt-404-container {
    text-align: center; max-width: 640px; width: 100%;
    animation: avt404FadeIn 0.6s ease;
}
@keyframes avt404FadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.avt-404-number {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin-bottom: 24px;
    font-size: clamp(5rem, 18vw, 10rem); font-weight: 800;
    line-height: 1;
}
.avt-404-digit {
    background: linear-gradient(135deg, var(--primary, #d4a823), var(--primary-light, #f2c94c) 70%, #ff7a59);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 24px rgba(212,168,35,0.3));
}
.avt-404-icon {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: clamp(4rem, 14vw, 8rem); height: clamp(4rem, 14vw, 8rem);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(212,168,35,0.25), rgba(212,168,35,0.05) 70%);
    border: 2px solid rgba(212,168,35,0.4);
    animation: avt404Bob 3s ease-in-out infinite;
}
.avt-404-icon i {
    font-size: clamp(2rem, 7vw, 4rem);
    color: var(--primary, #d4a823);
    animation: avt404Glow 2s ease-in-out infinite alternate;
}
@keyframes avt404Bob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}
@keyframes avt404Glow {
    0% { filter: drop-shadow(0 0 8px rgba(212,168,35,0.4)); }
    100% { filter: drop-shadow(0 0 20px rgba(212,168,35,0.8)); }
}
.avt-404-orbit {
    position: absolute; inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(212,168,35,0.35);
    animation: avt404Spin 8s linear infinite;
}
.avt-404-orbit-2 {
    inset: -18px;
    border-color: rgba(255,122,89,0.25);
    animation-duration: 14s; animation-direction: reverse;
}
@keyframes avt404Spin {
    to { transform: rotate(360deg); }
}
.avt-404-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700;
    margin-bottom: 12px; color: var(--text, #fff);
}
.avt-404-message {
    color: var(--text-muted, #a0a0a0); font-size: 1.05rem; line-height: 1.6;
    max-width: 520px; margin: 0 auto 32px;
}
.avt-404-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 40px;
}
.avt-404-links {
    color: var(--text-dim, #6b6b6b); font-size: 0.88rem;
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center;
}
.avt-404-links-label { margin-right: 4px; }
.avt-404-links a {
    color: var(--text-muted, #a0a0a0); text-decoration: none;
    transition: color 0.2s;
}
.avt-404-links a:hover { color: var(--primary, #d4a823); }
.avt-404-sep { color: var(--text-dim, #6b6b6b); }

/* ===== Admin — Bulk actions bar ===== */
.avt-admin-bulkbar {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    margin: 16px 0; padding: 14px 16px;
    background: var(--bg-card, #151515); border: 1px solid var(--border);
    border-radius: var(--radius, 12px); flex-wrap: wrap;
}
.avt-admin-bulkbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.avt-admin-bulkbar-right { display: flex; align-items: center; gap: 12px; }
.avt-admin-checkbox {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-muted); font-size: 0.9rem; cursor: pointer;
    padding: 8px 12px; border-radius: var(--radius, 12px);
    background: rgba(255,255,255,0.03);
}
.avt-admin-checkbox input { accent-color: var(--primary); cursor: pointer; }
.avt-admin-table tr.is-selected { background: rgba(212,168,35,0.06); }
.avt-admin-table tr.is-selected td { border-left: 2px solid var(--primary); }
.avt-admin-status {
    margin: 12px 0; padding: 10px 14px; border-radius: var(--radius, 12px);
    display: flex; align-items: center; gap: 10px; font-size: 0.9rem;
}
.avt-admin-status.is-success { background: rgba(34,197,94,0.1); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.avt-admin-status.is-error { background: rgba(239,68,68,0.1); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.avt-btn-danger {
    background: rgba(224,68,68,0.15); color: #ff8888; border: 1px solid rgba(224,68,68,0.4);
    padding: 10px 18px; border-radius: var(--radius-full, 999px);
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s;
}
.avt-btn-danger:hover:not(:disabled) { background: rgba(224,68,68,0.25); color: #fff; transform: translateY(-1px); }
.avt-btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Mobile menu — Side drawer with icons (variante 2) ===== */
.avt-mobile-overlay {
    position: fixed; inset: 0; z-index: 1001;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.avt-mobile-overlay.is-open { opacity: 1; pointer-events: auto; }

.avt-mobile-drawer {
    position: fixed; top: 0; right: -360px; bottom: 0; width: 320px; z-index: 1002;
    background: var(--bg-card, #151515);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
    display: flex; flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.avt-mobile-drawer.is-open { right: 0; }

/* Header: logo + nome + close btn */
.avt-mobile-header {
    padding: 16px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.avt-mobile-brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none;
    min-width: 0;
}
.avt-mobile-brand img {
    width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.avt-mobile-brand strong {
    font-size: 1.2rem; font-weight: 700; letter-spacing: 0.2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.avt-mobile-close {
    background: transparent; border: 1px solid var(--border); color: var(--text);
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.avt-mobile-close:hover {
    background: var(--primary); color: #000;
    transform: rotate(90deg); border-color: var(--primary);
}

/* Body scorrevole */
.avt-mobile-body {
    flex: 1; overflow-y: auto;
    padding: 12px;
}

/* Link list: wrapper span fisso intorno all'icona + margin-right esplicito.
   Non uso piu' flex gap perche' inaffidabile con FontAwesome defaults. */
.avt-mobile-links {
    display: flex; flex-direction: column; gap: 4px;
}
.avt-mobile-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 14px 22px;
    min-height: 52px;
    color: var(--text); text-decoration: none;
    font-size: 1rem; font-weight: 500;
    line-height: 1.2;
    border-radius: var(--radius, 12px);
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
/* Wrapper rigido intorno all'icona: dimensioni garantite, margin-right fisso */
.avt-mobile-link .avt-mobile-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    margin: 0 18px 0 0;             /* 18px gap dopo l'icona */
    flex-shrink: 0;
    color: var(--primary);
    font-size: 1.15rem;
    line-height: 1;
}
.avt-mobile-link .avt-mobile-link-icon i {
    display: inline-block;
    line-height: 1;
    color: inherit;
}
.avt-mobile-link .avt-mobile-link-text {
    flex: 1;
    overflow: hidden; text-overflow: ellipsis;
    line-height: 1.2;
}
.avt-mobile-link:hover {
    background: rgba(212, 168, 35, 0.08);
    color: var(--primary);
}
.avt-mobile-link.is-active {
    background: rgba(212, 168, 35, 0.12);
    color: var(--primary); font-weight: 600;
}
.avt-mobile-link.is-admin { color: var(--primary); font-weight: 600; }

/* Campo richiesto: asterisco gold accanto alla label */
.avt-required { color: var(--primary, #d4a823); margin-left: 4px; font-weight: 700; }
.avt-input[readonly] { opacity: 0.75; cursor: not-allowed; background: rgba(255,255,255,0.02); }
.avt-hint { color: var(--text-dim, #6b6b6b); font-size: 0.78rem; font-weight: 400; margin-left: 6px; }

/* Dropzone v2: solo drag-drop, no click-to-pick. Bottoni espliciti per mobile. */
.avt-dropzone-v2 { cursor: default; }
.avt-dropzone-v2 .avt-dropzone-content > * { pointer-events: auto; }
.avt-dropzone-or {
    color: var(--text-muted, #a0a0a0); font-size: 0.88rem;
    margin: 10px 0 14px;
    display: flex; align-items: center; gap: 10px; justify-content: center;
}
.avt-dropzone-or::before, .avt-dropzone-or::after {
    content: ''; height: 1px; flex: 0 0 40px; background: var(--border);
}

/* Input file nascosti (sostituiti dai <label> che fanno da bottoni) */
.avt-file-hidden {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
    opacity: 0 !important;
}

/* Pulsanti azione dentro la dropzone (file / cartella) */
.avt-dropzone-buttons {
    display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap;
}
.avt-dropzone-buttons label, .avt-dropzone-buttons button {
    font-size: 0.9rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
}

/* "Scegli cartella": nascosto di default (mobile), mostrato solo su desktop con mouse.
   Usare CSS media query evita il flash che si vedeva con toggle via JS. */
.avt-btn-pick-folder { display: none; }
@media (hover: hover) and (pointer: fine) {
    .avt-btn-pick-folder { display: inline-flex; }
}

/* Toggle gruppo (checkbox con label ricca) */
.avt-toggle-group {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; margin-top: 8px;
    background: rgba(212,168,35,0.04); border: 1px solid rgba(212,168,35,0.15);
    border-radius: var(--radius, 12px); cursor: pointer;
    transition: all 0.2s;
}
.avt-toggle-group:hover { background: rgba(212,168,35,0.08); border-color: rgba(212,168,35,0.3); }
.avt-toggle-group .avt-checkbox {
    margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary, #d4a823);
    flex-shrink: 0; cursor: pointer;
}
.avt-toggle-group .avt-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.avt-toggle-group strong { color: var(--text, #fff); font-size: 0.95rem; font-weight: 600; }
.avt-toggle-group small { color: var(--text-muted, #a0a0a0); font-size: 0.82rem; line-height: 1.4; }

.avt-mobile-divider {
    border: 0; border-top: 1px solid var(--border);
    margin: 10px 14px;
}

/* Blocchi generici (Google, lang) con padding laterale */
.avt-mobile-block { padding: 6px 14px; }

/* Google login button */
.avt-mobile-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px 16px;
    background: #fff; color: #1f1f1f;
    border-radius: var(--radius-full, 999px);
    font-weight: 600; font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.avt-mobile-google:hover {
    background: #f5f5f5; transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Google login button */
.avt-mobile-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 13px 16px;
    background: #fff; color: #1f1f1f;
    border-radius: var(--radius-full, 999px);
    font-weight: 600; font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.avt-mobile-google:hover {
    background: #f5f5f5; transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Language dropdown (inline, matches desktop dark style) */
.avt-mobile-lang {
    width: 100%;
}
.avt-mobile-lang summary {
    list-style: none; cursor: pointer; user-select: none;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    color: var(--text); font-size: 0.95rem; font-weight: 500;
    transition: all 0.2s ease;
}
.avt-mobile-lang summary::-webkit-details-marker { display: none; }
.avt-mobile-lang-icon { color: var(--primary); font-size: 1rem; flex-shrink: 0; }
.avt-mobile-lang-current { flex: 1; display: flex; align-items: center; gap: 8px; }
.avt-mobile-lang-flag { font-size: 1.1rem; line-height: 1; }
.avt-mobile-lang-caret { color: var(--text-muted); font-size: 0.7rem; transition: transform 0.2s ease; }
.avt-mobile-lang[open] summary { border-color: var(--primary); background: rgba(212,168,35,0.05); }
.avt-mobile-lang[open] summary .avt-mobile-lang-caret { transform: rotate(180deg); }
.avt-mobile-lang-menu {
    margin-top: 6px; padding: 6px;
    background: var(--bg-card, #151515);
    border: 1px solid var(--border); border-radius: var(--radius, 12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: flex; flex-direction: column; gap: 2px;
    animation: avtLangFadeIn 0.2s ease;
}
@keyframes avtLangFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.avt-mobile-lang-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 6px;
    color: var(--text); text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.avt-mobile-lang-item:hover {
    background: rgba(212,168,35,0.08); color: var(--primary);
}
.avt-mobile-lang-item.is-active {
    background: rgba(212,168,35,0.12); color: var(--primary); font-weight: 600;
}

/* Footer con "Sviluppato da Available Srl" */
.avt-mobile-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    display: flex; justify-content: center;
}
.avt-mobile-dev {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--radius-full, 999px);
    color: var(--text-muted); font-size: 0.85rem; text-decoration: none;
    transition: all 0.2s ease;
}
.avt-mobile-dev:hover { background: rgba(212,168,35,0.08); color: var(--text); }
.avt-mobile-dev-label { opacity: 0.75; }
.avt-mobile-dev-logo {
    width: 24px; height: 24px; object-fit: contain; flex-shrink: 0;
}
.avt-mobile-dev-brand {
    color: var(--text); font-weight: 700; letter-spacing: 0.2px;
}
.avt-mobile-dev-brand em {
    font-style: normal; color: var(--primary); font-weight: 700;
    margin-left: 2px;
}

/* Legacy mobile-panel (deprecated, keep for backward compat) */
.avt-mobile-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 300px; z-index: 1002;
    background: var(--bg-surface); padding: 80px 24px 24px; display: flex; flex-direction: column; gap: 8px;
}
.avt-mobile-link { display: block; padding: 12px 16px; color: var(--text-muted); font-size: 1rem; border-radius: var(--radius-sm); }
.avt-mobile-link:hover { background: var(--bg-card); color: var(--primary); }

/* ===== Buttons ===== */
.avt-btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gradient-primary); color: #000; padding: 12px 28px;
    border-radius: var(--radius-full); font-weight: 600; font-size: 0.95rem;
    border: none; cursor: pointer; transition: var(--transition);
}
.avt-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,168,35,0.3); color: #000; }
.avt-btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--text); padding: 12px 28px;
    border-radius: var(--radius-full); font-weight: 500; font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.2); cursor: pointer; transition: var(--transition);
}
.avt-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.avt-btn-ghost { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 8px 16px; font-size: 0.9rem; transition: var(--transition); }
.avt-btn-ghost:hover { color: var(--primary); }
.avt-btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.avt-btn-lg { padding: 14px 36px; font-size: 1rem; }
.avt-btn-full { width: 100%; justify-content: center; }

/* ===== Sections ===== */
.avt-section { padding: 80px 0; position: relative; }
.avt-section-dark { background: var(--bg-surface); }
.avt-section-header { text-align: center; margin-bottom: 48px; }
.avt-section-badge {
    display: inline-block; background: rgba(212,168,35,0.15); color: var(--primary);
    padding: 6px 16px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600;
    letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px;
}
.avt-section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.15; margin-bottom: 12px; }
.avt-section-subtitle { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.avt-gradient-text {
    background: var(--gradient-rainbow); background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; animation: gradientShift 6s linear infinite;
}
@keyframes gradientShift { to { background-position: 200% center; } }

/* ===== Hero ===== */
.avt-hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; padding: 120px 24px 80px;
}
.avt-hero-canvas { position: absolute; inset: 0; z-index: 0; }
.avt-hero-gradient-bg {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
    background:
        radial-gradient(at 20% 30%, rgba(212,168,35,0.25) 0%, transparent 50%),
        radial-gradient(at 80% 70%, rgba(224,68,68,0.18) 0%, transparent 50%),
        radial-gradient(at 50% 90%, rgba(0,229,255,0.15) 0%, transparent 50%);
    animation: avtGradientShift 15s ease-in-out infinite;
}
@keyframes avtGradientShift {
    0%, 100% { transform: scale(1) translate(0, 0); }
    33% { transform: scale(1.1) translate(-3%, 2%); }
    66% { transform: scale(0.95) translate(3%, -2%); }
}
.avt-hero-none { background: var(--bg); }
.avt-hero-content { position: relative; z-index: 1; text-align: center; max-width: 800px; }
.avt-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(212,168,35,0.15); color: var(--primary);
    padding: 8px 20px; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600;
    margin-bottom: 24px; animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.avt-hero-title { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 700; line-height: 1.1; margin-bottom: 20px; }

/* Hide focus outline on headings: Blazor FocusOnNavigate focuses h1 for screen-reader a11y
   after every page load, but visually the outline is not needed (keyboard users Tab through
   interactive elements, not headings). Screen-reader focus still works without the outline. */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
.avt-hero-subtitle { color: var(--text-muted); font-size: 1.15rem; line-height: 1.8; margin-bottom: 32px; }
.avt-hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* "Powered by Available" link under hero CTAs */
.avt-hero-poweredby {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 40px;
    padding: 8px 18px; border-radius: var(--radius-full);
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted); font-size: 0.85rem;
    text-decoration: none; transition: var(--transition);
    backdrop-filter: blur(6px);
}
.avt-hero-poweredby:hover {
    background: rgba(212,168,35,0.1); border-color: rgba(212,168,35,0.3);
    color: var(--text); transform: translateY(-2px);
}
.avt-hero-poweredby span { opacity: 0.7; }
.avt-hero-poweredby strong { color: var(--text); font-weight: 700; letter-spacing: 0.2px; }
.avt-hero-poweredby strong em { font-style: normal; color: var(--primary); margin-left: 2px; }
.avt-hero-poweredby-logo { width: 22px; height: 22px; object-fit: contain; }

/* ===== Features ===== */
.avt-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1024px) { .avt-features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .avt-features-grid { grid-template-columns: 1fr; } }

.avt-feature-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
    padding: 36px 28px; transition: var(--transition); text-align: center;
}
.avt-feature-card:hover { transform: translateY(-8px); border-color: var(--border-hover); box-shadow: 0 16px 48px rgba(212,168,35,0.1); }
.avt-feature-icon {
    width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 20px; background: rgba(212,168,35,0.15); color: var(--primary);
}
.avt-feature-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.avt-feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== Stats ===== */
.avt-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
@media (max-width: 600px) { .avt-stats-grid { grid-template-columns: 1fr; } }
.avt-stat-card { padding: 32px; }
.avt-stat-value { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.avt-stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

/* ===== CTA ===== */
.avt-cta-section {
    text-align: center; padding: 60px 40px; border-radius: 24px;
    background: linear-gradient(135deg, rgba(212,168,35,0.08), rgba(224,68,68,0.06));
    border: 1px solid var(--border);
}
.avt-cta-section .avt-section-title { margin-bottom: 16px; }
.avt-cta-section .avt-section-subtitle { margin-bottom: 32px; }

/* ===== Upload ===== */
.avt-upload-section { padding-top: 120px; }
.avt-upload-container { max-width: 700px; }
.avt-upload-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 32px; }

.avt-dropzone {
    position: relative; border: 2px dashed rgba(255,255,255,0.15); border-radius: var(--radius);
    padding: 48px 24px; text-align: center; transition: var(--transition); cursor: pointer; margin-bottom: 24px;
}
.avt-dropzone:hover, .avt-dropzone-active { border-color: var(--primary); background: rgba(212,168,35,0.05); }
.avt-dropzone-icon { font-size: 3rem; color: var(--primary); margin-bottom: 16px; }
.avt-dropzone h3 { margin-bottom: 4px; }
.avt-dropzone p { color: var(--text-muted); font-size: 0.9rem; }
.avt-dropzone-info { font-size: 0.8rem; color: var(--text-dim); margin-top: 8px; }
.avt-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* File list */
.avt-file-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.avt-file-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: var(--bg-glass); border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.avt-file-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avt-file-info i { color: var(--primary); font-size: 1.1rem; flex-shrink: 0; }
.avt-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.avt-file-size { color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0; }
.avt-file-remove { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; }
.avt-file-remove:hover { color: var(--secondary); }
.avt-file-total { text-align: right; color: var(--text-muted); font-size: 0.85rem; padding: 8px 0; }

/* Progress */
.avt-progress-bar { width: 80px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.avt-progress-fill { height: 100%; background: var(--gradient-primary); border-radius: 2px; transition: width 0.3s; }

/* Upload options */
.avt-upload-options { margin-bottom: 24px; }
.avt-form-group { margin-bottom: 16px; }
.avt-form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.avt-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .avt-form-row { grid-template-columns: 1fr; } }

.avt-input, .avt-textarea, .avt-select {
    width: 100%; padding: 12px 16px; background: var(--bg-glass); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.95rem; font-family: inherit;
    transition: var(--transition); outline: none;
}
.avt-input:focus, .avt-textarea:focus, .avt-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(212,168,35,0.15); }
.avt-textarea { resize: vertical; }
.avt-select { appearance: none; cursor: pointer; }

/* Upload success */
.avt-upload-success { text-align: center; padding: 48px 24px; }
.avt-success-icon { font-size: 4rem; color: var(--green); margin-bottom: 16px; }
.avt-share-link { display: flex; gap: 8px; margin: 24px 0; }
.avt-share-link input { flex: 1; }

/* ===== Download Page ===== */
.avt-download-section { padding-top: 120px; }
.avt-download-container { max-width: 700px; }
.avt-download-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 32px; }
.avt-download-header { margin-bottom: 24px; }
.avt-download-header h2 { margin-bottom: 8px; }
.avt-download-message { color: var(--text-muted); font-size: 0.95rem; padding: 16px; background: var(--bg-glass); border-radius: var(--radius-sm); margin: 16px 0; }
.avt-download-meta { display: flex; gap: 24px; color: var(--text-muted); font-size: 0.85rem; flex-wrap: wrap; }
.avt-download-meta i { color: var(--primary); margin-right: 4px; }
.avt-file-download:hover { background: rgba(212,168,35,0.05); }

/* Scan warnings */
.avt-scan-warning {
    display: flex; align-items: flex-start; gap: 12px;
    background: rgba(232, 130, 58, 0.12); border: 1px solid rgba(232, 130, 58, 0.35);
    color: #e8823a; padding: 14px 16px; border-radius: var(--radius-sm);
    margin-bottom: 16px; font-size: 0.9rem;
}
.avt-scan-warning i { font-size: 1.3rem; margin-top: 2px; flex-shrink: 0; }
.avt-scan-ok {
    display: flex; align-items: center; gap: 10px;
    background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--green); padding: 10px 14px; border-radius: var(--radius-sm);
    margin-bottom: 16px; font-size: 0.85rem;
}
.avt-scan-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; font-size: 0.7rem; margin-right: 4px;
}
.avt-scan-badge-clean { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.avt-scan-badge-skipped { background: rgba(232, 130, 58, 0.15); color: #e8823a; }
.avt-scan-badge-consumed { background: rgba(100,100,140,0.18); color: #9e9eb2; padding: 2px 8px; font-size: 0.72rem; }
.avt-file-consumed { opacity: 0.5; }
.avt-file-consumed .avt-file-name { text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.3); }

/* Not found / expired */
.avt-not-found { text-align: center; padding: 48px; }
.avt-not-found i { font-size: 4rem; color: var(--text-dim); margin-bottom: 16px; }
.avt-not-found h2 { margin-bottom: 8px; }
.avt-not-found p { color: var(--text-muted); margin-bottom: 24px; }

/* Password */
.avt-password-card { text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 48px 32px; max-width: 400px; margin: 0 auto; }
.avt-password-icon { font-size: 3rem; color: var(--primary); margin-bottom: 16px; }

/* ===== Auth ===== */
.avt-auth-section { padding-top: 120px; min-height: 100vh; display: flex; align-items: center; }
.avt-auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 40px; max-width: 460px; margin: 0 auto; }
.avt-auth-title { font-size: 1.8rem; margin-bottom: 4px; }
.avt-auth-subtitle { color: var(--text-muted); margin-bottom: 32px; }
.avt-auth-footer { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.9rem; }

/* Auth divider */
.avt-auth-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; }
.avt-auth-divider::before, .avt-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.avt-auth-divider span { color: var(--text-dim); font-size: 0.85rem; white-space: nowrap; }

/* Google button */
.avt-btn-google {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #ffffff; color: #333; padding: 12px 28px;
    border-radius: var(--radius-full); font-weight: 600; font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.2); cursor: pointer; transition: var(--transition);
    text-decoration: none;
}
.avt-btn-google:hover { background: #f1f1f1; color: #333; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(255,255,255,0.1); }

/* Error */
.avt-error { background: rgba(224,68,68,0.15); border: 1px solid rgba(224,68,68,0.3); color: var(--secondary); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 16px; }

/* Loading */
.avt-loading { text-align: center; padding: 48px; color: var(--text-muted); font-size: 1.2rem; }

/* ===== Legal Pages ===== */
.avt-legal-section { padding-top: 120px; padding-bottom: 80px; }
.avt-legal-container { max-width: 900px; }
.avt-legal-container h1 { font-size: 2.2rem; margin-bottom: 24px; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.avt-legal-container h2 { font-size: 1.5rem; margin: 32px 0 12px; color: var(--primary); }
.avt-legal-container h3 { font-size: 1.15rem; margin: 20px 0 8px; color: var(--text); }
.avt-legal-container p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.8; }
.avt-legal-container ul { color: var(--text-muted); margin-bottom: 16px; padding-left: 24px; line-height: 1.8; }
.avt-legal-container ul li { margin-bottom: 6px; }
.avt-legal-container strong { color: var(--text); }
.avt-legal-container a { color: var(--primary); }
.avt-legal-table {
    width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.9rem;
}
.avt-legal-table th {
    text-align: left; padding: 10px 14px; background: var(--bg-card); color: var(--text);
    border: 1px solid var(--border); font-weight: 600;
}
.avt-legal-table td {
    padding: 10px 14px; border: 1px solid var(--border); color: var(--text-muted);
}
.avt-legal-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* ===== Footer ===== */
.avt-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 40px; }
.avt-footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }

.avt-footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.avt-footer-links a { color: var(--text-muted); font-size: 0.9rem; text-decoration: none; transition: color 0.2s; }
.avt-footer-links a:hover { color: var(--primary); }

.avt-footer-dev-link {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 20px; border-radius: var(--radius-full);
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted); font-size: 0.9rem; text-decoration: none;
    transition: var(--transition);
}
.avt-footer-dev-link:hover {
    background: rgba(212,168,35,0.1); border-color: rgba(212,168,35,0.35);
    color: var(--text); transform: translateY(-1px);
}
.avt-footer-dev-label { opacity: 0.75; font-size: 0.82rem; }
.avt-footer-dev-logo { width: 22px; height: 22px; object-fit: contain; }
.avt-footer-dev-brand { font-weight: 700; font-size: 0.95rem; color: var(--text); letter-spacing: 0.2px; }
.avt-footer-dev-brand em { font-style: normal; color: var(--primary); margin-left: 2px; }

.avt-footer-copy { color: var(--text-dim); font-size: 0.85rem; margin: 0; }
.avt-footer-company { color: var(--text-dim); font-size: 0.75rem; margin: 0; opacity: 0.65; letter-spacing: 0.3px; }
@media (max-width: 600px) {
    .avt-footer-links { gap: 16px; font-size: 0.85rem; }
    .avt-footer-company { max-width: 320px; line-height: 1.6; }
}

/* ===== Main ===== */
.avt-app { min-height: 100vh; display: flex; flex-direction: column; }
.avt-main { flex: 1; }

/* ===== Cookie Banner v2 - GDPR compliant ===== */
.avt-cookie-banner-v2 {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: rgba(10, 10, 20, 0.97); border-top: 1px solid var(--border);
    backdrop-filter: blur(20px); padding: 20px 24px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
    animation: slideUpCookie 0.4s ease-out;
}
.avt-cookie-banner-inner {
    max-width: var(--container); margin: 0 auto;
    display: flex; gap: 24px; align-items: center;
}
.avt-cookie-banner-text {
    display: flex; gap: 14px; align-items: flex-start; flex: 1;
}
.avt-cookie-banner-text > i {
    color: var(--primary); font-size: 1.8rem; flex-shrink: 0; margin-top: 2px;
}
.avt-cookie-banner-text strong {
    display: block; color: var(--text); font-size: 1rem; margin-bottom: 4px;
}
.avt-cookie-banner-text p {
    color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; margin: 0;
}
.avt-cookie-banner-text a { color: var(--primary); text-decoration: underline; }
.avt-cookie-banner-actions {
    display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end;
}
@keyframes slideUpCookie { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 900px) {
    .avt-cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 16px; }
    .avt-cookie-banner-actions { justify-content: stretch; }
    .avt-cookie-banner-actions button { flex: 1; }
}

/* Cookie Modal */
.avt-cookie-modal {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.avt-cookie-modal-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
}
.avt-cookie-modal-content {
    position: relative; background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 90vh;
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.avt-cookie-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.avt-cookie-modal-header h2 { font-size: 1.3rem; margin: 0; color: var(--text); }
.avt-cookie-modal-header h2 i { color: var(--primary); margin-right: 8px; }
.avt-cookie-modal-close {
    background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer;
    width: 36px; height: 36px; border-radius: 8px; transition: var(--transition);
}
.avt-cookie-modal-close:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.avt-cookie-modal-body {
    padding: 20px 24px; overflow-y: auto; flex: 1;
}
.avt-cookie-modal-intro {
    color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px;
}

.avt-cookie-category {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px;
}
.avt-cookie-category-header {
    display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
}
.avt-cookie-category-info { flex: 1; }
.avt-cookie-category-info strong {
    display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 4px;
}
.avt-cookie-category-info p {
    color: var(--text-muted); font-size: 0.8rem; margin: 0; line-height: 1.5;
}
.avt-toggle-slider-disabled { cursor: not-allowed; opacity: 0.7; background: var(--primary) !important; }

.avt-cookie-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
    padding: 16px 24px; border-top: 1px solid var(--border);
}
@media (max-width: 600px) {
    .avt-cookie-modal-footer button { flex: 1; }
}

/* Site tagline in navbar */
.avt-logo-text { display: flex; flex-direction: column; line-height: 1.2; gap: 2px; }
.avt-logo-text strong { font-size: 1.05rem; color: var(--text); font-weight: 700; }
.avt-logo-text small { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; display: block; }

/* Su mobile: nascondi la tagline, logo piu' piccolo, nome piu' grande per riempire bene lo spazio */
@media (max-width: 768px) {
    .avt-logo { gap: 10px; }
    .avt-logo img { width: 32px; height: 32px; border-radius: 8px; }
    .avt-logo-text strong { font-size: 1.25rem; letter-spacing: 0.2px; }
    .avt-logo-text small { display: none; }
}

/* Language switcher - CSS-only dropdown (hover/focus) */
.avt-lang-switcher { position: relative; display: inline-block; outline: none; }
.avt-lang-button {
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); cursor: pointer; padding: 6px 10px;
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem;
    transition: var(--transition); user-select: none;
}
.avt-lang-switcher:hover .avt-lang-button,
.avt-lang-switcher:focus-within .avt-lang-button { border-color: var(--primary); }
.avt-lang-button i { font-size: 0.65rem; color: var(--text-muted); transition: transform 0.2s; }
.avt-lang-switcher:hover .avt-lang-button i,
.avt-lang-switcher:focus-within .avt-lang-button i { transform: rotate(180deg); }
.avt-lang-flag { font-size: 1rem; line-height: 1; }
.avt-lang-code { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.avt-lang-menu {
    position: absolute; top: 100%; right: 0; min-width: 180px;
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5); padding: 6px; z-index: 1050;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
    margin-top: 6px;
}
/* area invisibile tra button e menu per non perdere hover */
.avt-lang-menu::before {
    content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px;
}
.avt-lang-switcher:hover .avt-lang-menu,
.avt-lang-switcher:focus-within .avt-lang-menu {
    opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.avt-lang-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px;
    color: var(--text); text-decoration: none; font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.avt-lang-item:hover { background: var(--bg-card); color: var(--primary); }
.avt-lang-item-active { background: rgba(212,168,35,0.12); color: var(--primary); }

/* ===== Animated Separator ===== */
.avt-separator {
    height: 2px; background: var(--gradient-rainbow); background-size: 200% 100%;
    animation: separatorFlow 4s linear infinite; border: none; margin: 0;
}
@keyframes separatorFlow { to { background-position: 200% 0; } }

/* ===== Verification modal (WeTransfer-style OTP) ===== */
.avt-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
    padding: 16px; animation: avtFadeIn 180ms ease-out;
}
.avt-modal {
    position: relative; background: var(--bg-card, #0e0e1a); border: 1px solid var(--border, #232338);
    border-radius: 20px; padding: 40px 32px 32px; width: 100%; max-width: 440px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6); animation: avtSlideUp 220ms ease-out;
}
.avt-modal-close {
    position: absolute; top: 12px; right: 12px; background: transparent; border: 0;
    color: var(--text-dim, #8a8aa0); width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    font-size: 1.1rem; transition: background 120ms, color 120ms;
}
.avt-modal-close:hover { background: rgba(255,255,255,0.06); color: #fff; }
.avt-verify-modal { text-align: center; }
.avt-verify-icon {
    width: 72px; height: 72px; margin: 0 auto 20px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(212,168,35,0.18), rgba(240,200,80,0.08));
    border: 1px solid rgba(212,168,35,0.35); border-radius: 50%;
    font-size: 1.8rem; color: var(--primary, #d4a823);
}
.avt-verify-modal h2 { margin: 0 0 8px; font-size: 1.4rem; }
.avt-verify-desc { color: var(--text-dim, #aaaabb); margin: 0 0 24px; font-size: 0.95rem; line-height: 1.5; }
.avt-verify-input {
    text-align: center; font-family: 'JetBrains Mono', monospace;
    font-size: 1.75rem; letter-spacing: 0.6rem; font-weight: 600;
    padding-left: 0.6rem;
}
.avt-verify-resend { margin-top: 12px; color: var(--text-dim); }
.avt-verify-resend:hover { color: var(--primary); }
.avt-info {
    background: rgba(80,160,255,0.08); border: 1px solid rgba(80,160,255,0.25);
    color: #a8d0ff; padding: 10px 14px; border-radius: 10px; font-size: 0.9rem; margin: 0 0 12px;
}
@keyframes avtFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes avtSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Share card "Hero completa" (post-upload) =====
   Bordo gradient animato giallo->rosso->giallo, QR laterale con messaggio,
   3 meta box (scadenza / n. file / dimensione), 3 azioni tondeggianti sotto. */
.avt-share-ring {
    position: relative; padding: 2px; border-radius: 24px;
    background: linear-gradient(135deg, var(--primary, #d4a823), var(--secondary, #e04444), var(--primary, #d4a823));
    background-size: 200% 200%;
    animation: avtShareRingShine 6s ease infinite;
    margin: 0 auto 20px; max-width: 640px;
}
@keyframes avtShareRingShine { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.avt-share-inner {
    /* Sfondo OPACO: --bg-card e' semi-trasparente e lascerebbe passare il gradient del bordo
       (effetto bordeaux). Usiamo un nero solido che richiama la pagina. */
    background: #0a0a14;
    border-radius: 22px;
    padding: 28px;
}

/* Riga QR + testo laterale */
.avt-share-qr-row {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    margin-bottom: 20px; flex-wrap: wrap;
}
.avt-share-qr-card { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avt-share-qr {
    width: 156px; height: 156px; padding: 8px;
    background: #fff; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
}
.avt-share-qr img, .avt-share-qr canvas { width: 100% !important; height: 100% !important; display: block; }
.avt-share-qr-label {
    font-size: 0.82rem; color: var(--text-dim, #aaaabb);
    display: inline-flex; align-items: center; gap: 6px;
}
.avt-share-qr-label i { color: var(--primary, #d4a823); }
.avt-share-qr-side {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    max-width: 240px;
}
.avt-share-qr-side h3 { font-size: 1.05rem; margin: 0; }
.avt-share-qr-side p { color: var(--text-dim, #aaaabb); font-size: 0.88rem; line-height: 1.45; margin: 0; }

/* Link pill con bordo gradient (richiama il bordo esterno) */
.avt-share-pill-ring {
    padding: 2px; border-radius: 999px;
    background: linear-gradient(135deg, var(--primary, #d4a823), var(--secondary, #e04444), var(--primary, #d4a823));
    background-size: 200% 200%;
    animation: avtShareRingShine 6s ease infinite;
    margin-bottom: 20px;
}
.avt-share-pill-inner {
    /* Anche qui sfondo opaco per non far trapelare il gradient */
    background: #14141f; border-radius: 999px;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px;
}
.avt-share-pill-inner > i { color: var(--primary, #d4a823); font-size: 0.9rem; }
.avt-share-pill-inner input {
    flex: 1; min-width: 0;
    background: transparent; border: 0; outline: 0; padding: 0;
    color: var(--text, #fff);
    font-family: 'JetBrains Mono', monospace; font-size: 0.88rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Meta in 3 riquadri iconati */
.avt-share-meta {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin-bottom: 22px;
}
.avt-share-meta-box {
    background: var(--bg, #000); border: 1px solid var(--border, #232338);
    border-radius: 14px; padding: 14px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.avt-share-meta-box i { color: var(--primary, #d4a823); font-size: 1rem; margin-bottom: 2px; }
.avt-share-meta-box strong { font-size: 0.95rem; font-weight: 600; }
.avt-share-meta-box small {
    font-size: 0.7rem; color: var(--text-dim, #aaaabb);
    text-transform: uppercase; letter-spacing: 0.05em;
}

/* Azioni sotto (tondeggianti, in linea con il resto del sito) */
.avt-share-actions {
    display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}

/* Mobile: QR+side si impila */
@media (max-width: 540px) {
    .avt-share-inner { padding: 20px 16px; }
    .avt-share-qr-side { align-items: center; text-align: center; }
    .avt-share-qr-side p { text-align: center; }
}

/* Nota: la stampa del QR NON usa @media print della pagina principale: il pulsante "Stampa"
   apre una finestra dedicata (AvaShare.print) con solo l'SVG del QR, sempre vettoriale. */

/* ============================================================================
   ANIMAZIONE AUTODISTRUZIONE (Variante 3 · Detonatore)
   Visibile solo quando l'elemento #avtDestructOverlay ha la classe .playing.
   Triggerata da download-guard.js dopo il click su un download con
   data-autodestruct="true" (transfer con MaxDownloads=1).
   Durata totale: ~4.5s, poi resta il messaggio "Trasferimento scaricato".
   ============================================================================ */
.avt-destruct-overlay {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(6px);
    align-items: center; justify-content: center;
    animation: avtDestructFade 300ms ease-out;
}
.avt-destruct-overlay.playing { display: flex; }
@keyframes avtDestructFade { from { opacity: 0; } to { opacity: 1; } }

.avt-destruct-stage {
    position: relative; width: min(720px, 94vw); height: 420px;
    background: #161624; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 32px; overflow: hidden;
}

/* File list visibile nei primi secondi (esplodera' al BOOM) */
.avt-destruct-files {
    position: absolute; top: 32px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 64px); max-width: 420px;
    display: flex; flex-direction: column; gap: 8px; z-index: 5;
}
.avt-destruct-file-item {
    display: flex; align-items: center; gap: 12px;
    background: #0a0a14; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 10px 14px; color: #fff;
}
.avt-destruct-file-item > i:first-child { color: #d4a823; font-size: 1.05rem; }
.avt-destruct-file-name {
    flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.avt-destruct-file-size { color: #aaaabb; font-size: 0.78rem; }

/* Linea del suolo (tratteggiata) */
.avt-destruct-ground {
    position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.03));
    border-top: 1px dashed rgba(255,255,255,0.08);
}

/* === Omino demolitore (SVG dentro .avt-destruct-omino) === */
.avt-destruct-omino {
    position: absolute; bottom: 20px; left: 18%; width: 60px; height: 110px; z-index: 10;
}
.avt-destruct-omino svg { width: 100%; height: 100%; display: block; overflow: visible; }
.avt-destruct-omino .arm-r, .avt-destruct-omino .arm-l {
    transform-origin: top center; transform-box: fill-box;
}

/* === Detonatore a stantuffo === */
.avt-destruct-plunger {
    position: absolute; bottom: 50px; left: calc(18% + 48px); width: 36px; height: 60px; z-index: 8;
}
.avt-destruct-plunger-box {
    position: absolute; bottom: 0; width: 36px; height: 30px;
    background: #5a3a1a; border-radius: 4px; border: 1px solid #3a2410;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,0.2);
}
.avt-destruct-plunger-stick {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 30px; background: #888; transform-origin: bottom;
}
.avt-destruct-plunger-knob {
    position: absolute; bottom: 56px; left: 50%; transform: translateX(-50%);
    width: 18px; height: 10px; background: #ef4444; border-radius: 3px;
    box-shadow: 0 2px 6px rgba(239,68,68,0.5);
}

/* === Filo elettrico + scintilla che lo percorre === */
.avt-destruct-wire {
    position: absolute; bottom: 60px; left: calc(18% + 84px);
    right: calc(15% + 68px); height: 2px; background: #c00; opacity: 0.7; z-index: 6;
}
.avt-destruct-spark-dot {
    position: absolute; bottom: 60px; left: calc(18% + 84px);
    width: 8px; height: 8px; border-radius: 50%; margin-top: -3px;
    background: #f0c850; box-shadow: 0 0 12px #d4a823, 0 0 24px #d4a823;
    opacity: 0; z-index: 7;
}

/* === TNT === */
.avt-destruct-tnt {
    position: absolute; bottom: 24px; right: 15%;
    width: 70px; height: 70px;
    background: linear-gradient(180deg, #ef4444 0%, #991b1b 100%);
    border-radius: 10px; border: 2px solid #991b1b;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; letter-spacing: 0.15em; font-size: 0.85rem;
    box-shadow: 0 6px 18px rgba(239,68,68,0.35);
    z-index: 8;
}

/* === BOOM text + shockwave === */
.avt-destruct-boom {
    position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%) scale(0);
    font-family: 'Impact', 'DM Sans', sans-serif; font-weight: 900;
    font-size: 4rem; color: #d4a823; letter-spacing: 0.05em;
    -webkit-text-stroke: 4px #000; text-shadow: 6px 6px 0 #991b1b;
    opacity: 0; pointer-events: none; z-index: 15;
}
.avt-destruct-shockwave {
    position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%);
    width: 0; height: 0; border-radius: 50%;
    border: 4px solid #d4a823; opacity: 0; pointer-events: none; z-index: 14;
}

/* === Messaggio finale (appare dopo il BOOM) ===
   Background solido che richiama il colore dello stage: al fade-in copre completamente
   omino, TNT e resti dell'animazione — altrimenti su mobile (stage piu' piccolo) il
   pulsante "Torna alla home" si sovrapporrebbe all'omino. */
.avt-destruct-final {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 24px; color: #fff;
    background: #161624;
    border-radius: inherit;
    opacity: 0; pointer-events: none; z-index: 20;
}
.avt-destruct-final.visible { opacity: 1; pointer-events: auto; }
.avt-destruct-final-icon {
    width: 64px; height: 64px; margin-bottom: 16px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
    box-shadow: 0 8px 28px rgba(239,68,68,0.4);
}
.avt-destruct-final h2 { font-size: 1.5rem; margin-bottom: 8px; color: #fff; }
.avt-destruct-final p { color: #aaaabb; font-size: 0.95rem; max-width: 360px; margin-bottom: 20px; }

/* === Timeline animazioni (partono quando .playing viene aggiunta) === */
.avt-destruct-overlay.playing .avt-destruct-omino .arm-r {
    animation: avtDestructArmPush 300ms 1s forwards;
}
.avt-destruct-overlay.playing .avt-destruct-plunger-stick {
    animation: avtDestructPlungerPush 300ms 1s forwards;
}
.avt-destruct-overlay.playing .avt-destruct-plunger-knob {
    animation: avtDestructKnobPush 300ms 1s forwards;
}
.avt-destruct-overlay.playing .avt-destruct-spark-dot {
    animation: avtDestructWireSpark 900ms 1.3s forwards linear;
}
.avt-destruct-overlay.playing .avt-destruct-files {
    animation: avtDestructFilesOut 600ms 2.2s forwards;
}
.avt-destruct-overlay.playing .avt-destruct-tnt {
    animation: avtDestructTntShake 80ms 2.15s 4;
}
.avt-destruct-overlay.playing .avt-destruct-boom {
    animation: avtDestructBoomPop 700ms 2.4s forwards;
}
.avt-destruct-overlay.playing .avt-destruct-shockwave {
    animation: avtDestructShockOut 700ms 2.4s forwards;
}
.avt-destruct-overlay.playing .avt-destruct-final {
    animation: avtDestructFinalIn 500ms 3s forwards;
}

@keyframes avtDestructArmPush { 0% { transform: rotate(0); } 100% { transform: rotate(-30deg); } }
@keyframes avtDestructPlungerPush { 0% { height: 30px; } 100% { height: 10px; } }
@keyframes avtDestructKnobPush { 0% { bottom: 56px; } 100% { bottom: 36px; } }
@keyframes avtDestructWireSpark {
    0%   { left: calc(18% + 84px); opacity: 1; }
    100% { left: calc(85% - 68px); opacity: 1; }
}
@keyframes avtDestructFilesOut {
    to { opacity: 0; transform: translateX(-50%) scale(0.3) rotate(15deg); filter: blur(8px); }
}
@keyframes avtDestructTntShake {
    0%,100% { transform: translateX(0) translateY(0); }
    50%     { transform: translateX(2px) translateY(-2px); }
}
@keyframes avtDestructBoomPop {
    0%   { transform: translate(-50%, -50%) scale(0) rotate(-15deg); opacity: 0; }
    40%  { transform: translate(-50%, -50%) scale(1.3) rotate(5deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5) rotate(0); opacity: 0; }
}
@keyframes avtDestructShockOut {
    0%   { width: 0; height: 0; opacity: 1; border-width: 4px; }
    100% { width: 700px; height: 700px; opacity: 0; border-width: 1px; }
}
@keyframes avtDestructFinalIn { to { opacity: 1; pointer-events: auto; } }

/* Mobile: stage piu' piccolo e con proporzioni migliori */
@media (max-width: 540px) {
    .avt-destruct-stage { height: 360px; padding: 20px; }
    .avt-destruct-omino { left: 10%; width: 50px; height: 90px; }
    .avt-destruct-plunger { left: calc(10% + 40px); }
    .avt-destruct-wire { left: calc(10% + 72px); right: calc(10% + 60px); }
    .avt-destruct-spark-dot { left: calc(10% + 72px); }
    @keyframes avtDestructWireSpark {
        0% { left: calc(10% + 72px); opacity: 1; }
        100% { left: calc(90% - 60px); opacity: 1; }
    }
    .avt-destruct-tnt { right: 10%; width: 54px; height: 54px; font-size: 0.75rem; }
    .avt-destruct-boom { font-size: 3rem; }
}
