:root{
  --bg:#07090f;
  --bg-2:#0d1220;
  --surface:#121829;
  --surface-2:#1a2138;
  --border:#262e47;
  --text:#e7ecff;
  --muted:#8a93b2;
  --primary:#22d3ee;
  --primary-2:#7c3aed;
  --accent:#10b981;
  --danger:#ef4444;
  --radius:14px;
  --shadow:0 10px 40px -10px rgba(34,211,238,.25);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124,58,237,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(34,211,238,.18), transparent 60%),
    var(--bg);
  color:var(--text);
  min-height:100vh;
  line-height:1.55;
}

/* Header */
.site-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 28px; border-bottom:1px solid var(--border);
  backdrop-filter: blur(8px);
  position:sticky; top:0; z-index:10;
  background: rgba(7,9,15,.7);
}
.brand{display:flex; align-items:center; gap:14px}
.brand-mark{
  width:48px; height:48px; border-radius:12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display:grid; place-items:center;
  font-weight:800; letter-spacing:1px;
  box-shadow: var(--shadow);
  color:#0a0d18;
}
.brand-text h1{font-size:18px; margin:0; letter-spacing:.3px}
.brand-text p{margin:0; color:var(--muted); font-size:12px}

.wa-btn{
  display:inline-flex; align-items:center; gap:8px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color:#fff; text-decoration:none;
  padding:10px 16px; border-radius:10px; font-weight:600; font-size:14px;
  box-shadow: 0 8px 24px -8px rgba(37,211,102,.5);
  transition:transform .15s ease, box-shadow .15s ease;
}
.wa-btn:hover{transform:translateY(-1px); box-shadow: 0 12px 28px -8px rgba(37,211,102,.6)}

/* Layout */
.container{max-width:1080px; margin:0 auto; padding:32px 20px 80px}

.hero{text-align:center; padding:36px 10px 28px}
.hero h2{font-size:clamp(26px, 4vw, 42px); margin:0 0 12px; line-height:1.15}
.grad{background:linear-gradient(135deg, var(--primary), var(--primary-2)); -webkit-background-clip:text; background-clip:text; color:transparent}
.lede{color:var(--muted); max-width:680px; margin:0 auto; font-size:16px}

/* Card */
.card{
  background:linear-gradient(180deg, var(--surface), var(--bg-2));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  margin-top:24px;
  box-shadow: 0 20px 50px -30px rgba(0,0,0,.6);
}

/* Tabs */
.tabs{display:flex; gap:6px; background:var(--surface-2); border:1px solid var(--border); padding:6px; border-radius:12px; width:fit-content; margin-bottom:18px}
.tab{
  background:transparent; color:var(--muted); border:0; padding:8px 16px; cursor:pointer;
  border-radius:8px; font-weight:600; font-size:14px; transition:.15s;
}
.tab:hover{color:var(--text)}
.tab.active{background:linear-gradient(135deg, var(--primary), var(--primary-2)); color:#0a0d18}

.lbl{display:block; color:var(--muted); font-size:13px; font-weight:600; margin-bottom:8px; letter-spacing:.3px; text-transform:uppercase}

textarea, input[type=text]{
  width:100%; background:var(--bg); color:var(--text);
  border:1px solid var(--border); border-radius:10px;
  padding:14px; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size:13px; line-height:1.5; resize:vertical;
  transition: border-color .15s, box-shadow .15s;
}
textarea{min-height:240px}
textarea:focus, input[type=text]:focus{
  outline:none; border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(34,211,238,.18);
}

/* Dropzone */
.dropzone{
  display:block; cursor:pointer;
  border:2px dashed var(--border); border-radius:12px;
  padding:40px 20px; text-align:center;
  transition: border-color .15s, background .15s;
  background: var(--bg);
}
.dropzone:hover, .dropzone.drag{border-color:var(--primary); background:rgba(34,211,238,.05)}
.dz-icon{font-size:36px; margin-bottom:8px}
.dz-title{font-weight:600}
.dz-sub{color:var(--muted); font-size:13px; margin-top:4px}

/* Options */
.options{margin-top:18px; display:grid; gap:16px}
.seg{display:flex; gap:8px; flex-wrap:wrap}
.seg label{
  flex:1; min-width:200px;
  display:flex; align-items:center; gap:8px;
  background:var(--bg); border:1px solid var(--border);
  padding:12px 14px; border-radius:10px; cursor:pointer;
  transition:.15s;
}
.seg label:hover{border-color:var(--primary)}
.seg input{accent-color:var(--primary)}
.hint{color:var(--muted); font-size:12px; margin:6px 0 0}

/* Actions */
.actions{display:flex; gap:10px; margin-top:18px; flex-wrap:wrap}
.btn{
  background:var(--surface-2); color:var(--text);
  border:1px solid var(--border); border-radius:10px;
  padding:11px 18px; font-weight:600; font-size:14px; cursor:pointer;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover{transform:translateY(-1px); border-color:var(--primary)}
.btn.primary{
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color:#0a0d18; border-color:transparent;
  box-shadow: 0 8px 24px -10px rgba(124,58,237,.6);
}
.btn.ghost{background:transparent}

/* Output */
.output-card .out-head{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap}
.output-card h3{margin:0; font-size:18px}
.out-actions{display:flex; gap:8px}
#output{min-height:280px}

/* Features */
.features{display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:16px; margin-top:32px}
.feat{
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  padding:20px;
}
.feat h4{margin:6px 0 4px; font-size:16px}
.feat p{margin:0; color:var(--muted); font-size:14px}
.f-icon{font-size:24px}

/* Footer */
.site-footer{
  border-top:1px solid var(--border);
  padding:24px 28px;
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  color:var(--muted); font-size:14px;
}
.brand-inline{
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
  font-weight:800;
}
.wa-link{color:var(--primary); text-decoration:none; font-weight:600}
.wa-link:hover{text-decoration:underline}

.hidden{display:none !important}

/* Toast */
.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--surface-2); color:var(--text);
  border:1px solid var(--border); border-radius:10px;
  padding:12px 18px; font-size:14px; font-weight:500;
  box-shadow: var(--shadow);
  opacity:0; pointer-events:none; transition: opacity .2s, transform .2s;
  z-index:50;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0)}
.toast.error{border-color:var(--danger); color:#ffd9d9}
.toast.success{border-color:var(--accent)}

@media (max-width:640px){
  .site-header{flex-direction:column; gap:12px; padding:14px 16px}
  .container{padding:20px 14px 60px}
}
