.taltufix-tool-app {
  font-family: sans-serif;
  background: #1e1e1e;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

/* Todo lo de aquí abajo queda confinado a .taltufix-tool-app y sus
   descendientes: nunca puede afectar el header/footer/menú del sitio, y
   tampoco puede heredar colores/estilos que el tema del sitio le imponga
   a etiquetas genéricas (h1-h6, button, label, etc.) fuera de esta app. */
@scope (.taltufix-tool-app) {
  :scope * {
    color: inherit;
  }

  .container {
    max-width: 800px;
    text-align: center;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
  }

  .control-group {
    text-align: left;
  }

  .control-group.full-width {
    grid-column: span 2;
  }

  .control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
  }

  .preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
  }

  .preview-box {
    background: #2a2a2a;
    padding: 10px;
    border-radius: 8px;
    min-height: 200px;
  }

  .preview-box h3 {
    margin-top: 0;
    font-size: 1.1em;
  }

  .navigation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    background: #2a2a2a;
    padding: 10px;
    border-radius: 8px;
  }

  .nav-btn {
    width: auto !important;
    padding: 8px 15px !important;
    font-size: 0.9em !important;
  }

  .page-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
  }

  .page-info input {
    width: 50px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #1e1e1e;
    color: white;
    text-align: center;
  }

  canvas {
    max-width: 100%;
    height: auto;
    background: white;
    border-radius: 4px;
  }

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

  input[type="file"],
  button,
  input[type="range"] {
    width: 100%;
  }

  button {
    padding: 12px;
    background: #007acc;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
  }

  button.secondary {
    background: #444;
    margin-top: 5px;
  }

  button.secondary:hover {
    background: #555;
  }

  button:disabled {
    background: #444;
    cursor: not-allowed;
  }

  #status {
    margin-top: 15px;
    font-size: 0.9em;
    color: #aaa;
  }
}
