/* Gradient and glow aesthetic */
:root{
  --bg1: #0f1021;
  --bg2: #1a1b3a;
  --accent1: #7c3aed;
  --accent2: #22d3ee;
  --text: #eef2ff;
  --muted: #a5b4fc;
  --panel: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.20);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --glow-strong: 0 0 20px rgba(124,58,237,0.65), 0 0 40px rgba(34,211,238,0.55);
  --glow-soft: 0 0 10px rgba(124,58,237,0.45), 0 0 20px rgba(34,211,238,0.35);
}

*{box-sizing:border-box}

html, body{
  height:100%;
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Helvetica, Arial, Apple Color Emoji, Noto Color Emoji;
  background: radial-gradient(1200px 800px at 10% 10%, #171846 0%, transparent 60%),
              radial-gradient(900px 700px at 90% 20%, #102a43 0%, transparent 55%),
              linear-gradient(135deg, var(--bg1), var(--bg2));
  color: var(--text);
  line-height:1.5;
  padding: 24px;
}

.site-header{
  text-align:center;
  margin-bottom: 18px;
}
.site-header h1{
  margin:0 0 8px 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.5px;
  text-shadow: var(--glow-soft);
}
.site-header p{
  margin:0;
  color: var(--muted);
}

.container{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.panel{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  position:relative;
}

.panel::before{
  content: "";
  position:absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.6), rgba(34,211,238,0.6));
  filter: blur(18px);
  z-index:-1;
  opacity: 0.35;
}

.label{
  display:block;
  margin-bottom: 8px;
  font-weight:600;
  color: var(--text);
  text-shadow: var(--glow-soft);
}

textarea{
  width:100%;
  min-height: 180px;
  background: rgba(12, 14, 36, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  resize: vertical;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), var(--shadow);
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

textarea:focus{
  border-color: rgba(124,58,237,0.9);
  box-shadow: var(--glow-strong);
}

.output-panel textarea{
  min-height: 240px;
  white-space: pre;
}

.controls{
  display:flex;
  gap:16px;
  align-items:center;
  margin: 10px 0 6px 0;
  color: var(--muted);
}
.toggle{
  display:flex;
  gap:8px;
  align-items:center;
  user-select:none;
}
.toggle input{ accent-color: #7c3aed; }

.buttons{
  display:flex;
  gap:12px;
  margin: 10px 0 8px 0;
}

.btn{
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(34,211,238,0.18));
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor:pointer;
  backdrop-filter: blur(6px);
  box-shadow: var(--glow-soft);
  transition: transform 120ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--glow-strong);
  border-color: rgba(124,58,237,0.8);
}
.btn:active{
  transform: translateY(0);
}
.btn.primary{
  font-weight:700;
}
.btn.subtle{
  background: rgba(255,255,255,0.06);
}

.hint{
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 13px;
}

.header-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.header-row h2{
  margin:0;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34,211,238,0.28), rgba(124,58,237,0.28));
  border: 1px solid var(--border);
  box-shadow: var(--glow-soft);
}

.status{
  margin-top: 8px;
  min-height: 20px;
  color: var(--muted);
}

.site-footer{
  text-align:center;
  margin-top: 18px;
  color: var(--muted);
}

@media (max-width: 900px){
  .container{ grid-template-columns: 1fr; }
}
