body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #f0f2f5, #ffffff);
  padding: 30px;
  margin: 0;
}

.container {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  transition: 0.3s ease;
}

h1 {
  text-align: center;
  color: #333;
  font-size: 28px;
  margin-bottom: 10px;
}

p {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

textarea {
  width: 100%;
  height: 120px;
  margin-bottom: 20px;
  padding: 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border 0.2s;
}

textarea:focus {
  border-color: #007BFF;
  outline: none;
}

button {
  display: block;
  margin: 0 auto 20px auto;
  background-color: #007BFF;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background-color: #0056b3;
}

#resultado {
  font-family: monospace;
  white-space: pre-wrap;
  background: #f1f1f1;
  padding: 20px;
  border-radius: 8px;
  line-height: 1.6;
  color: #333;
  border: 1px solid #ddd;
}

ins {
  background-color: #c8f7c5;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
}

del {
  background-color: #f9c0c0;
  text-decoration: line-through;
  padding: 2px 4px;
  border-radius: 4px;
}

.diff-part {
  margin-right: 4px;
  display: inline-block;
}

.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  color: #555;
  padding: 20px;
  border-top: 1px solid #ddd;
  background: #fafafa;
  border-radius: 0 0 12px 12px;
}

.footer a {
  color: #007BFF;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}


/* ======== Modo Oscuro ======== */
body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

body.dark-mode .container {
  background: #1e1e1e;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

body.dark-mode textarea {
  background: #2a2a2a;
  color: #f5f5f5;
  border-color: #444;
}

body.dark-mode textarea:focus {
  border-color: #90caf9;
}

body.dark-mode button {
  background-color: #90caf9;
  color: #000;
}

body.dark-mode #resultado {
  background: #2a2a2a;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .footer {
  background: #1a1a1a;
  color: #aaa;
  border-top: 1px solid #333;
}

body.dark-mode a {
  color: #90caf9;
}

/* Ajustes visuales de diferencias */
body.dark-mode ins {
  background-color: #388e3c33;
}

body.dark-mode del {
  background-color: #e5393533;
}