/* ==================== BASE ==================== */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

/* ==================== CONTAINER ==================== */
.container {
  background-color: white;
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  box-sizing: border-box;
}

h2, h3 {
  text-align: center;
  margin-top: 0;
}

/* ==================== FORMULARIO ==================== */
input, button {
  width: 100%;
  padding: 0.75em;
  margin: 0.5em 0;
  font-size: 1em;
  border-radius: 8px;
  box-sizing: border-box;
}

input {
  border: 1px solid #ccc;
}

button {
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* ==================== TOKEN ==================== */
.token-container {
  display: flex;
  flex-direction: column;
}

.token-container pre {
  background-color: #f1f1f1;
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85em;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  margin: 0;
}

/* ==================== BOTÓN COPIAR TOKEN ==================== */
.copy-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0.5em;
}

.copy-wrapper button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3em;
  border-radius: 4px;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  color: inherit;
  width: auto;
  min-width: 40px;
  transition: transform 0.2s ease;
}

.copy-wrapper button:hover {
  transform: scale(1.1);
}

.copy-status {
  font-size: 0.85em;
  color: green;
  margin-left: 0.5em;
}

/* ==================== MODO CLARO ==================== */
body.light {
  background-color: #f8f9fa;
  color: #222;
}

body.light .container {
  background-color: white;
}

body.light input {
  background-color: white;
  color: #000;
}

body.light button {
  background-color: #007bff;
  color: white;
}

body.light pre {
  background-color: #f1f1f1;
}

/* ==================== MODO OSCURO ==================== */
body.dark {
  background-color: #121212;
  color: #f1f1f1;
}

body.dark .container {
  background-color: #1e1e1e;
}

body.dark input {
  background-color: #2c2c2c;
  color: #f1f1f1;
  border: 1px solid #555;
}

body.dark button {
  background-color: #333;
  color: white;
}

body.dark pre {
  background-color: #2c2c2c;
}

.volver-link {
  text-align: center;
  margin-top: 1.5em;
  font-size: 0.95em;
}

.volver-link a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s;
}

.volver-link a:hover {
  color: #0056b3;
}

body.dark .volver-link a {
  color: #66bfff;
}

body.dark .volver-link a:hover {
  color: #99ccff;
}
