/* Editado */
/* styles.css */
:root { 
  --bg: #ffffff; 
  --fg: #1f2937; 
  --muted: #6b7280; 
  --card: #f9fafb; 
  --accent: #3b82f6;
  --border: #e5e7eb;
  --textarea-bg: #ffffff;
  --textarea-border: #d1d5db;
  --button-bg: #f3f4f6;
  --button-border: #d1d5db;
  --shadow: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; 
    --fg: #e5e7eb; 
    --muted: #9ca3af; 
    --card: #111827; 
    --accent: #22d3ee;
    --border: #374151;
    --textarea-bg: #0f172a;
    --textarea-border: #243042;
    --button-bg: #1f2937;
    --button-border: #334155;
    --shadow: rgba(0, 0, 0, 0.35);
  }
}

.dark {
  --bg: #0b1220; 
  --fg: #e5e7eb; 
  --muted: #9ca3af; 
  --card: #111827; 
  --accent: #22d3ee;
  --border: #374151;
  --textarea-bg: #0f172a;
  --textarea-border: #243042;
  --button-bg: #1f2937;
  --button-border: #334155;
  --shadow: rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body { 
  margin: 0; 
  padding: 0; 
  background: var(--bg); 
  color: var(--fg); 
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  transition: background-color 0.3s ease, color 0.3s ease;
}

header, footer { 
  padding: 16px; 
  text-align: center; 
}

footer a { 
  color: var(--accent); 
}

h1 { 
  margin: 0 0 8px; 
  font-size: 24px; 
}

main {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.panel { 
  width: min(840px, 100%); 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 16px; 
  padding: 16px; 
  box-shadow: 0 10px 30px var(--shadow);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

label { 
  display: block; 
  font-weight: 600; 
  margin: 12px 0 6px; 
}

textarea { 
  width: 100%; 
  min-height: 120px; 
  background: var(--textarea-bg); 
  color: var(--fg); 
  border: 1px solid var(--textarea-border); 
  border-radius: 12px; 
  padding: 12px; 
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark textarea:focus {
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.style-toolbar {
  margin: 16px 0;
  padding: 16px;
  background: var(--button-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.style-toolbar label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

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

.style-btn {
  background: var(--textarea-bg);
  color: var(--fg);
  border: 1px solid var(--textarea-border);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.style-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow);
}

.style-btn:active {
  transform: translateY(0);
}

.plain-btn {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
  font-weight: 600;
}

.plain-btn:hover {
  background: #d97706;
  border-color: #d97706;
}

/* Responsive para móvil */
@media (max-width: 640px) {
  .style-buttons {
    gap: 6px;
  }
  
  .style-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 32px;
  }
  
  .style-toolbar {
    padding: 12px;
  }
}

.toolbar, .actions { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin: 12px 0; 
}

button, .link { 
  background: var(--button-bg); 
  color: var(--fg); 
  border: 1px solid var(--button-border); 
  padding: 10px 14px; 
  border-radius: 12px; 
  cursor: pointer; 
  text-decoration: none;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
}

button:hover, .link:hover { 
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px var(--shadow);
}

button:active, .link:active {
  transform: translateY(0);
}

.actions {
  justify-content: center;
  align-items: center;
}

.actions button {
  width: 48px;
  height: 48px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  background: var(--button-bg);
  color: var(--fg);
  border-color: var(--button-border);
}

.actions button svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.actions button:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
}

#undo {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

#undo:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.hint { 
  color: var(--muted); 
  font-size: 12px; 
  margin: 16px 0 0 0;
}

.hint code {
  background: var(--button-bg);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Toast notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--fg);
  color: var(--bg);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px var(--shadow);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

/* Update notification */
.update-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--accent);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1001;
  max-width: 90vw;
}

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

.update-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.update-notification button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  margin: 0;
}

.update-notification button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: none;
  box-shadow: none;
}

#update-app {
  background: white;
  color: var(--accent);
  border-color: white;
}

#update-app:hover {
  background: rgba(255, 255, 255, 0.9);
}

#dismiss-update {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}

/* Responsive para móvil */
@media (max-width: 640px) {
  .update-notification {
    left: 16px;
    right: 16px;
    transform: translateY(-100%);
    max-width: none;
  }

  .update-notification.show {
    transform: translateY(0);
  }
}

/* SEO Content Section */
.seo-content {
  width: min(840px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px var(--shadow);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.seo-content h2 {
  font-size: 22px;
  margin: 0 0 16px;
  color: var(--fg);
  font-weight: 700;
}

.seo-content h3 {
  font-size: 18px;
  margin: 24px 0 12px;
  color: var(--fg);
  font-weight: 600;
}

.seo-content p {
  line-height: 1.7;
  margin: 12px 0;
  color: var(--fg);
}

.seo-content ul,
.seo-content ol {
  line-height: 1.8;
  margin: 12px 0;
  padding-left: 24px;
}

.seo-content li {
  margin: 8px 0;
  color: var(--fg);
}

.seo-content strong {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 640px) {
  .seo-content {
    padding: 16px;
  }

  .seo-content h2 {
    font-size: 20px;
  }

  .seo-content h3 {
    font-size: 16px;
  }
}
