/* TextTidy by SWC styles */
:root{
  --bg1: #0f0221;
  --bg2: #1b0643;
  --fg: #eae6ff;
  --muted: #b9b2e8;
  --accent1: #7c3aed;
  --accent2: #06b6d4;
  --accent3: #f59e0b;
  --glass: rgba(255,255,255,0.08);
  --glow: 0 0 20px rgba(124,58,237,0.6), 0 0 40px rgba(6,182,212,0.45);
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
  margin: 0;
  color: var(--fg);
  background: radial-gradient(1200px 800px at 20% 10%, #1b0643 0%, #0f0221 40%, #0b0318 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Noto Sans, Apple Color Emoji, Segoe UI Emoji;
}

.bg-animated{
  position: fixed;
  inset: 0;
  background: conic-gradient(from 0deg at 50% 50%, #1b0643, #0f0221, #1b0643);
  mix-blend-mode: screen;
  filter: blur(120px) saturate(140%);
  opacity: 0.35;
  animation: spin 24s linear infinite alternate;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg) scale(1.1); } }

.app-header{
  text-align: center;
  padding: 32px 16px 8px;
}
.app-header h1{
  margin: 0 0 8px 0;
  font-size: 40px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(124,58,237,0.6), 0 0 30px rgba(6,182,212,0.35);
}
.glow{ color: transparent; background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3)); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 24px rgba(124,58,237,0.5)); }
.tagline{ color: var(--muted); margin: 0; }

.container{
  width: min(1100px, 94vw);
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 16px;
}

.panel{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 16px;
  position: relative;
}
.glass{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  backdrop-filter: blur(8px);
  box-shadow: var(--glow);
}

.panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel h2{ margin: 0; font-size: 20px; }
.panel h3{ margin: 12px 0 8px; color: var(--muted); font-weight: 600; }

.input-panel textarea,
.transform-panel textarea,
#utmResult{
  width: 100%;
  min-height: 140px;
  background: rgba(12,5,37,0.6);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  resize: vertical;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 0 24px rgba(124,58,237,0.25);
}

.controls{
  display: grid;
  gap: 8px;
}
.controls label{
  display: flex; align-items: center; gap: 8px;
  font-size: 14px;
}

.grid.two{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px){ .grid.two{ grid-template-columns: 1fr; } }

.actions{ display: flex; gap: 8px; }

.btn{
  background: radial-gradient(120px 60px at 30% 20%, rgba(124,58,237,0.35), rgba(6,182,212,0.2));
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 0 25px rgba(124,58,237,0.6), 0 0 40px rgba(6,182,212,0.45); }
.btn:active{ transform: translateY(0); }
.btn-ghost{ background: rgba(255,255,255,0.05); }
.primary{ background: linear-gradient(90deg, var(--accent1), var(--accent2)); }

.tiny-row{ display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--muted); }
.hint{ opacity: 0.7; font-size: 12px; }

.stats{
  display: grid;
  grid-auto-flow: column;
  gap: 16px;
  margin-top: 10px;
}
.stats div{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  min-width: 90px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.stats span{ font-size: 18px; display: block; }
.stats small{ color: var(--muted); }

.extractors{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

input[type="text"], input[type="url"], input:not([type]){
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(12,5,37,0.6);
  color: var(--fg);
  padding: 10px 12px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.switch{ position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input{ opacity:0; width:0; height:0;}
.slider{ position:absolute; cursor:pointer; inset:0; background:rgba(255,255,255,0.2); border-radius: 24px; transition: .2s; }
.slider:before{ content:""; position:absolute; height:18px; width:18px; left:3px; top:3px; background:white; border-radius:50%; transition:.2s; }
input:checked + .slider{ background: linear-gradient(90deg, var(--accent1), var(--accent2)); box-shadow: var(--glow); }
input:checked + .slider:before{ transform: translateX(20px); }

.foot{ text-align: center; color: var(--muted); padding: 10px; }

a{ color: #c4b5fd; text-decoration: none; }
a:hover{ text-decoration: underline; }
