/* ══════════════════════════════════════════════════════════
   VIRALIO — Text pe video · Design System Viralio 2026
   Space Grotesk (titluri/CTA) · Inter (UI) · JetBrains Mono (cifre)
   Fundal #0a0a0c — exact ca bara Viralio. Accent mint. Doar dark.
   ══════════════════════════════════════════════════════════ */

:root {
    --bg:            #0a0a0c;
    --panel:         rgba(255,255,255,0.025);
    --panel-hover:   rgba(255,255,255,0.045);
    --border:        rgba(255,255,255,0.07);
    --border-strong: rgba(255,255,255,0.14);
    --accent:        #65d69e;
    --accent-hover:  #7de0a8;
    --accent-ink:    #07120d;
    --accent-soft:   rgba(101,214,158,0.10);
    --accent-line:   rgba(101,214,158,0.32);
    --text:          #e6e6ea;
    --text-strong:   #ffffff;
    --muted:         #a1a1aa;
    --muted-soft:    #c8c9d0;
    --danger:        #ff7a5c;
    --gold:          #f5c842;
    --radius:        20px;
    --hi: inset 0 1px 0 rgba(255,255,255,0.06);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1, h2, h3, .btn-primary, .mode-title { font-family: 'Space Grotesk', system-ui, sans-serif; }
.num { font-family: 'JetBrains Mono', ui-monospace, monospace; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }

/* ── Layout ─────────────────────────────────────────────────── */
main { max-width: 1180px; margin: 0 auto; padding: 32px 20px 80px; }

.head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.head-icon {
    width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); border: 1px solid var(--accent-line);
    color: var(--accent); font-size: 1rem;
}
h1 { font-size: 1.35rem; font-weight: 600; color: var(--text-strong); letter-spacing: -0.02em; margin: 0; }
.head-sub { font-size: 0.84rem; color: var(--muted); margin-top: 3px; }

.grid { display: grid; grid-template-columns: 1fr 420px; gap: 22px; align-items: start; margin-top: 26px; }
@media (max-width: 940px) { .grid { grid-template-columns: 1fr; } }

.card {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px; box-shadow: var(--hi);
}
.card + .card { margin-top: 18px; }

/* ── Alegerea modului ───────────────────────────────────────── */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }
.mode {
    text-align: left; cursor: pointer; padding: 16px 18px;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 16px; color: var(--text); transition: border-color .15s, background .15s;
}
.mode:hover { background: var(--panel-hover); }
.mode[aria-selected="true"] { border-color: var(--accent-line); background: var(--accent-soft); }
.mode-title { font-size: 0.98rem; font-weight: 600; color: var(--text-strong); }
.mode-sub { font-size: 0.78rem; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.mode[disabled] { opacity: .45; cursor: not-allowed; }

/* ── Câmpuri ────────────────────────────────────────────────── */
label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 7px; letter-spacing: .01em; }
.field + .field { margin-top: 16px; }

input[type="text"], input[type="number"], textarea, select {
    width: 100%; padding: 11px 13px; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    color: var(--text); font-family: inherit; font-size: 0.9rem;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent-line); }
select { appearance: none; cursor: pointer; }
select option { background: #16161a; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row, .row-3 { grid-template-columns: 1fr; } }

.check { display: flex; align-items: center; gap: 9px; font-size: 0.85rem; color: var(--muted-soft); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Zona de urcat ──────────────────────────────────────────── */
.drop {
    border: 1px dashed var(--border-strong); border-radius: 16px;
    padding: 30px 20px; text-align: center; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent-line); background: var(--accent-soft); }
.drop-icon { font-size: 1.5rem; color: var(--muted); margin-bottom: 10px; }
.drop-main { font-size: 0.92rem; color: var(--text-strong); }
.drop-sub { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.drop.has-file { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); }

/* ── Cum va arăta textul ────────────────────────────────────── */
.lines {
    margin-top: 12px; padding: 14px; border-radius: 12px;
    background: rgba(0,0,0,0.35); border: 1px solid var(--border);
    text-align: center; min-height: 54px;
}
.lines .l { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #fff; line-height: 1.34; font-size: 1.02rem; }
.lines .l.last-accent { color: var(--accent); }
.lines .empty { color: var(--muted); font-size: 0.82rem; }
.lines-note { font-size: 0.75rem; color: var(--gold); margin-top: 9px; }

/* ── Variante de text propuse ───────────────────────────────── */
.variants { display: grid; gap: 10px; margin-top: 14px; }
.variant {
    text-align: left; cursor: pointer; padding: 13px 15px; border-radius: 13px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    color: var(--text); font: inherit; line-height: 1.45; font-size: 0.88rem;
}
.variant:hover { background: var(--panel-hover); border-color: var(--border-strong); }

/* ── Butoane ────────────────────────────────────────────────── */
.btn-primary {
    width: 100%; padding: 14px 20px; border: none; border-radius: 14px;
    background: var(--accent); color: var(--accent-ink);
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    transition: background .15s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
    padding: 9px 15px; border-radius: 11px; cursor: pointer; font-size: 0.83rem;
    background: transparent; border: 1px solid var(--border-strong); color: var(--muted-soft);
}
.btn-ghost:hover { color: var(--text-strong); border-color: var(--accent-line); }
.btn-ghost:disabled { opacity: .45; cursor: not-allowed; }

.price { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 10px; }
.price b { color: var(--text-strong); font-weight: 600; }

/* ── Rezultat ───────────────────────────────────────────────── */
.result video { width: 100%; border-radius: 14px; display: block; background: #000; max-height: 62vh; }
.result-actions { display: flex; gap: 10px; margin-top: 14px; }
.result-actions a, .result-actions button { flex: 1; text-align: center; text-decoration: none; }

.placeholder { text-align: center; padding: 46px 18px; color: var(--muted); }
.placeholder i { font-size: 1.8rem; opacity: .4; display: block; margin-bottom: 12px; }
.placeholder p { font-size: 0.85rem; margin: 0; line-height: 1.55; }

/* ── Stări ──────────────────────────────────────────────────── */
.msg { padding: 12px 15px; border-radius: 12px; font-size: 0.85rem; margin-top: 14px; line-height: 1.5; }
.msg.err { background: rgba(255,122,92,0.10); border: 1px solid rgba(255,122,92,0.32); color: #ffb4a2; }
.msg.ok  { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); }
.msg a { color: inherit; font-weight: 600; }

.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(7,18,13,0.28); border-top-color: var(--accent-ink); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

details.more { margin-top: 18px; }
details.more > summary { cursor: pointer; font-size: 0.84rem; color: var(--muted); list-style: none; padding: 9px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '▸ '; color: var(--accent); }
details.more[open] > summary::before { content: '▾ '; }
details.more > summary:hover { color: var(--text-strong); }
