/* General */
body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
  }

  /* Controles */
  aside.controls {
    width: 200px;
    background-color: #333;
    padding: 20px;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    box-sizing: border-box;
  }

  /* Mantener controles visibles cuando se interactúa con ellos */
  aside.controls:hover,
  aside.controls:focus-within,
  aside.controls:active,
  aside.controls button:hover,
  aside.controls button:focus,
  aside.controls button:active {
    transform: translateX(0) !important;
  }

  aside.controls h1,
  aside.controls h2 {
    margin: 0;
    text-align: center;
    color: #fff;
    font-size: 18px;
  }

  aside.controls button {
    background-color: #444;
    color: #fff;
    border: 1px solid #555;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
  }

  aside.controls button:hover {
    background-color: #555;
  }

  /* Contador de imágenes - Ajustado a la esquina inferior izquierda */
  #imageCounter {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
  }

  /* Área Principal */
  main {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: margin-left 0.5s ease;
  }

  main img {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background-color: #000;
    transition: width 0.5s ease;
  }

  /* Ajustar imagen cuando aparecen los controles */
  aside.controls:hover ~ main img,
  aside.controls:focus-within ~ main img {
    max-width: calc(100vw - 200px);
  }

  @media (max-width: 768px) {
    main img {
      max-width: 100vw;
      max-height: 100vh;
    }
  }

  @media (max-width: 576px) {
    main img {
      max-width: 100vw;
      max-height: 100vh;
    }
  }
