
 :root {
  --bg: #070a13;
  --panel: rgba(17, 24, 39, 0.92);
  --input: #070b14;
  --primary: #8b5cf6;
  --primary-dark: #6d43d8;
  --cyan: #22d3ee;
  --text: #ffffff;
  --muted: #a1a1aa;
  --line: rgba(255,255,255,0.09);
  --success: #34d399;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0,0,0,0.38);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139,92,246,.32), transparent 36%),
    radial-gradient(circle at top right, rgba(34,211,238,.16), transparent 30%),
    var(--bg);
}

.app {
  width: min(1500px, 100%);
  margin: auto;
  padding: 32px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: end;
  padding: 36px 0 28px;
}

.badge {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(139,92,246,.16);
  border: 1px solid rgba(139,92,246,.35);
  color: #ddd6fe;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: .95;
  margin: 0 0 18px;
  max-width: 950px;
}

.hero p {
  color: var(--muted);
  max-width: 820px;
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
}

.hero-card {
  background: linear-gradient(145deg, rgba(139,92,246,.25), rgba(34,211,238,.10));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

.hero-card span { color: var(--muted); line-height: 1.5; }

.layout {
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.panel-title h2,
.result-head h2 {
  margin: 0 0 8px;
  font-size: 27px;
}

.panel-title p,
.result-head p {
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.quick-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.quick-modes button {
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.28);
  color: #ddd6fe;
  padding: 10px 13px;
  border-radius: 999px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.field { display: grid; gap: 8px; }

.field.full { grid-column: 1 / -1; }

label {
  font-size: 14px;
  font-weight: 800;
  color: #e5e7eb;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  border-radius: 16px;
  padding: 15px 16px;
  outline: none;
  font-size: 15px;
}

textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(139,92,246,.8);
  box-shadow: 0 0 0 4px rgba(139,92,246,.12);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

button {
  border: none;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  color: white;
  font-weight: 900;
  transition: .2s ease;
}

button:hover { transform: translateY(-2px); opacity: .95; }

.primary {
  flex: 1;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.result-panel {
  position: sticky;
  top: 22px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

#contador {
  white-space: nowrap;
  color: #c4b5fd;
  background: rgba(139,92,246,.14);
  border: 1px solid rgba(139,92,246,.28);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

#resultado {
  width: 100%;
  min-height: 700px;
  background: #050812;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #e5e7eb;
  padding: 18px;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.65;
}

.copy-msg {
  min-height: 22px;
  margin-top: 12px;
  color: var(--success);
  font-weight: 800;
}

@media(max-width: 1150px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: relative;
    top: auto;
  }

  #resultado {
    min-height: 520px;
  }
}

@media(max-width: 700px) {
  .app { padding: 20px; }
  .grid { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .actions { flex-direction: column; }
  button { width: 100%; }
  .result-head { flex-direction: column; }
}
