body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
}

.container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  flex-direction: column;
  position: relative; /* Añadir esta línea */
  align-items: center;
}

@media (min-width: 1200px) {
  .container {
    flex-direction: row;
    align-items: flex-start;
  }
}

.paper-simulation {
  position: relative;
  width: 800px;
  height: 1000px;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
  border: 1px solid #ccc;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.vertical-ruler {
  position: absolute;
  left: -30px;
  top: 0;
  width: 30px;
  height: 100%;
  background-color: #f0f0f0;
  border-right: 1px solid #ccc;
}

.horizontal-ruler {
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
}

.rectangle {
  position: absolute;
  border: 2px solid #3498db;
  background-color: rgba(52, 152, 219, 0.3);
  cursor: move;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #333;
  user-select: none;
}

.rotate-handle {
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 20px;
  height: 20px;
  background-color: #e74c3c;
  border-radius: 50%;
  cursor: pointer;
}

.rectangle-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #eee;
  border-radius: 5px;
}

.palette-rectangle {
  width: 80px;
  height: 50px;
  background-color: #3498db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  cursor: grab;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.controls {
  text-align: center;
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

button {
  padding: 10px 16px;
  margin: 0;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
}

.image-controls {
  margin-bottom: 15px;
  text-align: center;
}

.resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #2ecc71;
  cursor: se-resize;
}

.rectangle:focus {
  outline: 2px dashed #3498db;
  outline-offset: 2px;
}

.rectangle:focus-within {
  outline: 2px dashed #3498db;
  outline-offset: 2px;
}

.rectangle {
  transition: outline 0.2s ease;
}

/* Notificaciones */
.notificacion {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.notificacion.success {
  background-color: #2ecc71;
}

.notificacion.error {
  background-color: #e74c3c;
}

.notificacion.info {
  background-color: #3498db;
}

/* Indicador de carga */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Guías de alineación */
.alignment-guide {
  position: absolute;
  background-color: #e74c3c;
  z-index: 99;
  pointer-events: none;
}

.alignment-guide.vertical {
  width: 1px;
  top: 0;
}

.alignment-guide.horizontal {
  height: 1px;
  left: 0;
}

/* Panel de información */
.info-panel {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 300px;
  background-color: white;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 900;
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.info-header h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.toggle-info {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: #666;
  padding: 0;
  margin: 0;
}

.info-content {
  padding: 15px;
  max-height: 300px;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

.info-content.collapsed {
  max-height: 0;
  padding: 0 15px;
  overflow: hidden;
}

.shortcuts {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.shortcuts h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #333;
}

.shortcuts ul {
  margin: 0;
  padding: 0 0 0 20px;
  font-size: 13px;
}

.shortcuts li {
  margin-bottom: 5px;
}

kbd {
  display: inline-block;
  padding: 2px 5px;
  font-size: 11px;
  line-height: 1;
  color: #444;
  background-color: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  margin: 0 2px;
}
