/* Glow themed UI with interactive flourishes */
* { box-sizing: border-box; }

:root {
  --bg-1: #06060f;
  --bg-2: #0c0c1a;
  --ink: #e8e8ff;
  --muted: #a8a8d8;
  --accent-1: #00d9ff;
  --accent-2: #ff00f5;
  --accent-3: #7cffb2;
  --card: rgba(20, 20, 38, 0.6);
  --ring: rgba(0, 217, 255, 0.5);
  --radius: 16px;
  --shadow: 0 8px 30px rgba(0,0,0,0.5);
}

html, body {
  height: 100%;
  margin: 0;
  background: radial-gradient(60% 60% at 20% 20%, #1a1535 0%, var(--bg-1) 50%) no-repeat,
              radial-gradient(40% 40% at 80% 0%, #101a3a 0%, var(--bg-2) 60%) no-repeat,
              linear-gradient(180deg, #0a0a15, #0b0b18) no-repeat;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  letter-spacing: 0.2px;
}

.page-bg::before {
  content: "";
  position: fixed;
  inset: -100px;
  background:
    radial-gradient(40% 25% at 20% 10%, rgba(0,217,255,0.25), transparent 60%),
    radial-gradient(30% 30% at 80% 0%, rgba(255,0,245,0.2), transparent 60%),
    radial-gradient(25% 40% at 50% 90%, rgba(124,255,178,0.12), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: float 16s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translateY(0px) translateX(0px); }
  100% { transform: translateY(-10px) translateX(10px); }
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 48px auto;
  padding: 24px;
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.title {
  margin: 0 0 8px;
  font-size: 40px;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 217, 255, 0.55), 0 0 24px rgba(255, 0, 245, 0.35);
}

.tagline {
  margin: 0;
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, rgba(26, 24, 54, 0.8), rgba(18, 16, 38, 0.7));
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow), 0 0 0 2px rgba(255,255,255,0.02) inset, 0 0 60px rgba(0, 217, 255, 0.06);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch input { display: none; }

.slider {
  width: 48px;
  height: 28px;
  background: #141431;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  position: relative;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.35);
}

.slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, white 0%, #c6fff7 35%, #12b4cf 70%);
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.8);
  transition: left 150ms ease;
}

.switch input:checked + .slider::after { left: 24px; }
.switch-label { color: var(--muted); font-size: 14px; }

.buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(34, 30, 70, 0.9), rgba(18, 16, 38, 0.9));
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  box-shadow: 0 0 12px rgba(0,0,0,0.35);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 217, 255, 0.15);
  border-color: rgba(0,217,255,0.4);
}

.io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.io-col { display: flex; flex-direction: column; gap: 8px; }

.label {
  font-size: 14px;
  color: var(--muted);
}

.textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0e0e22;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,0.08);
  outline: none;
  resize: vertical;
  box-shadow: inset 0 0 24px rgba(0, 217, 255, 0.06);
}

.textarea:focus {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.18);
}

.stats {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  opacity: 0.8;
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.2), rgba(255, 0, 245, 0.15));
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
