*{box-sizing:border-box}
body{
    margin:0;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    background:linear-gradient(135deg,#020617,#111827);
    color:#f8fafc;
}
.container{max-width:1150px;margin:0 auto;padding:36px 20px}
.header{margin-bottom:28px;display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.header h1{margin:0;font-size:34px}
.header p{color:#94a3b8;margin-top:8px}
.status-pill{
    font-size:13px;
    padding:8px 12px;
    border-radius:999px;
    border:1px solid #334155;
    background:#020617;
    color:#94a3b8;
    white-space:nowrap;
}
.status-pill.ok{border-color:rgba(34,197,94,.45);color:#86efac}
.status-pill.bad{border-color:rgba(239,68,68,.45);color:#fca5a5}
.grid{display:grid;grid-template-columns:1fr 430px;gap:24px}
.card{
    background:rgba(15,23,42,.88);
    border:1px solid rgba(148,163,184,.18);
    border-radius:24px;
    padding:24px;
    box-shadow:0 20px 60px rgba(0,0,0,.35);
}
label{display:block;margin-bottom:8px;color:#cbd5e1;font-weight:700}
.hint{font-size:13px;color:#64748b;font-weight:400;margin-top:4px}
textarea{
    width:100%;
    height:250px;
    resize:vertical;
    border:1px solid #334155;
    background:#020617;
    color:#f8fafc;
    border-radius:18px;
    padding:16px;
    font-size:16px;
    line-height:1.6;
    outline:none;
}
.char-counter{text-align:right;font-size:13px;color:#94a3b8;margin-top:6px}
.char-counter.warn{color:#fbbf24}
.char-counter.over{color:#f87171}
.row{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:18px}
.presets{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.preset-btn{
    border:1px solid #334155;
    background:#0f172a;
    color:#e2e8f0;
    border-radius:10px;
    padding:8px 12px;
    font-size:13px;
    cursor:pointer;
}
.preset-btn:hover{border-color:#38bdf8}
select,input{
    width:100%;
    border:1px solid #334155;
    background:#020617;
    color:#f8fafc;
    border-radius:14px;
    padding:12px;
    font-size:15px;
}
button.primary{
    margin-top:22px;
    width:100%;
    border:0;
    background:linear-gradient(135deg,#06b6d4,#3b82f6);
    color:white;
    border-radius:16px;
    padding:15px;
    font-size:17px;
    font-weight:800;
    cursor:pointer;
}
button.primary:disabled{opacity:.65;cursor:not-allowed}
.spinner{
    display:none;
    width:18px;
    height:18px;
    border:3px solid rgba(255,255,255,.35);
    border-top-color:white;
    border-radius:50%;
    animation:spin .8s linear infinite;
    margin-right:8px;
    vertical-align:-4px;
}
@keyframes spin{to{transform:rotate(360deg)}}
.result,.detect-box{
    display:none;
    margin-top:22px;
    padding:18px;
    border-radius:18px;
}
.result{background:rgba(34,197,94,.10);border:1px solid rgba(34,197,94,.35)}
.detect-box{background:rgba(59,130,246,.10);border:1px solid rgba(59,130,246,.35)}
.detect-row{padding:12px;border-radius:12px;background:#020617;margin-top:10px}
.detect-row b{display:block;margin-bottom:6px}
.detect-row span{color:#cbd5e1;line-height:1.5}
audio{width:100%;margin-top:10px}
.main-download,.download{
    display:inline-block;
    text-decoration:none;
    color:#fff;
    background:#2563eb;
    padding:10px 14px;
    border-radius:12px;
    margin-top:12px;
    font-weight:700;
}
.history-column{
    display:flex;
    flex-direction:column;
    gap:20px;
    min-width:0;
}
.history h2{margin-top:0}
.history-private{margin-top:0;margin-bottom:14px}
.history-empty{color:#94a3b8;font-size:14px}
.file-card{
    background:#020617;
    border:1px solid #1e293b;
    border-radius:16px;
    padding:14px;
    margin-bottom:14px;
}
.file-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.btn-danger{
    border:0;
    background:#7f1d1d;
    color:#fecaca;
    padding:8px 12px;
    border-radius:10px;
    cursor:pointer;
    font-weight:700;
}
.file-info{display:flex;flex-direction:column;gap:5px}
.file-info span{color:#94a3b8;font-size:13px}
.message{
    display:none;
    background:rgba(239,68,68,.12);
    border:1px solid rgba(239,68,68,.35);
    padding:14px;
    border-radius:14px;
    margin-bottom:16px;
}
.loading-box{
    display:none;
    margin-top:18px;
    padding:14px;
    border-radius:14px;
    background:rgba(14,165,233,.12);
    border:1px solid rgba(14,165,233,.35);
    color:#bae6fd;
}
.loading-box p{margin:0 0 10px;font-size:14px}
.gen-progress-track{
    height:8px;
    background:#0f172a;
    border-radius:999px;
    overflow:hidden;
}
.gen-progress-fill{
    height:100%;
    width:0;
    background:linear-gradient(90deg,#0ea5e9,#38bdf8);
    border-radius:999px;
    transition:width .25s ease;
}
.site-footer{
    max-width:1200px;
    margin:32px auto 24px;
    padding:0 16px;
    text-align:center;
    color:#94a3b8;
    font-size:13px;
}
.footer-stats{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
    gap:6px 10px;
    margin-bottom:12px;
    line-height:1.5;
}
.footer-stat strong{
    color:#e2e8f0;
    font-weight:700;
}
.footer-stat-sep{
    color:#475569;
    user-select:none;
}
.footer-brand{margin:0}
.footer-brand a{color:#60a5fa;text-decoration:none}
.footer-brand a:hover{text-decoration:underline}
@media(max-width:900px){
    .grid{grid-template-columns:1fr}
    .row{grid-template-columns:1fr}
    .footer-stat-sep{display:none}
    .footer-stats{flex-direction:column;gap:4px}
}
