:root {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --subcard-bg: #0f172a;
  --accent: #38bdf8;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --terminal-text: #4ade80;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: system-ui, -apple-system, sans-serif; 
}

body { 
  background-color: var(--bg); 
  color: var(--text); 
  padding: 2rem 1rem; 
  display: flex; 
  justify-content: center; 
}

.container { 
  max-width: 800px; 
  width: 100%; 
  display: flex; 
  flex-direction: column; 
  gap: 1.5rem; 
}

/* Encabezado y Botón Volver */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-back:hover {
  background-color: var(--border);
  color: var(--accent);
}

.desktop-spacer {
  width: 80px;
}

h2 { 
  color: var(--accent); 
  font-size: 1.5rem; 
  text-align: center; 
  flex-grow: 1; 
}

h3 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Componentes Tarjeta */
.card { 
  background-color: var(--card-bg); 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  padding: 1.25rem; 
  display: flex; 
  flex-direction: column; 
  gap: 1rem; 
}

.form-group { 
  display: flex; 
  flex-direction: column; 
  gap: 0.4rem; 
}

label { 
  font-size: 0.9rem; 
  color: var(--text-muted); 
  font-weight: 600; 
}

input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 0.6rem;
  background: var(--subcard-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.checkbox-group { 
  display: flex; 
  align-items: center; 
  gap: 0.6rem; 
  cursor: pointer;
  color: var(--text);
  font-weight: normal;
}

.checkbox-group input[type="checkbox"] { 
  width: 1.1rem; 
  height: 1.1rem; 
  accent-color: var(--accent);
}

.grid-2 { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 1rem; 
}

/* Botón Generar */
.btn-submit {
  background-color: var(--accent);
  color: #0f172a;
  font-weight: bold;
  border: none;
  padding: 0.83rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-submit:hover { 
  opacity: 0.9; 
}

/* Archivos Generados / Output estilo Terminal */
.archivos-container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.archivo {
  background: var(--subcard-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
}

.archivo h3 {
  color: var(--accent);
  font-size: 0.95rem;
  font-family: monospace;
  border-bottom: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}

textarea { 
  width: 100%;
  font-family: monospace; 
  height: 180px; 
  resize: vertical; 
  line-height: 1.4; 
  background: #050914;
  color: var(--terminal-text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.8rem;
}

@media (max-width: 600px) { 
  .header { 
    flex-direction: column; 
    align-items: flex-start; 
  }
  .desktop-spacer {
    display: none;
  }
  .grid-2 { 
    grid-template-columns: 1fr; 
  } 
}