/* Base reset */
* {
    box-sizing: border-box;
  }
  
  /* Body styling */
  body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #333;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
  }
  
  /* Player container */
  #video-player {
    width: clamp(240px, 90vw, 360px);
    background-color: #222;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border-radius: 10px;
  
    /* position relative so we can absolutely-position overlays inside */
    position: relative;
  }
  
  /* Video display area (9:16 ratio) */
  #video-display {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background-color: black;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
  }
  
  /* Composition container for the main image */
  .composition {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    aspect-ratio: 9 / 16;
  }
  
  /* The main image (we transform it for pan/zoom) */
  #animatedImage {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    will-change: transform;
    transition: none;
    top: 0;
    left: 0;
  }
  
  /* Controls (play/pause + timeline) */
  #controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  #play-pause-btn {
    padding: 8px 16px;
    background-color: #555;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
  }
  
  #play-pause-btn:hover {
    background-color: #666;
  }
  
  #timeline {
    flex-grow: 1;
    margin-left: 15px;
    cursor: pointer;
  }
  
  #timeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    margin-top: -4px;
  }
  
  #timeline::-webkit-slider-runnable-track {
    height: 4px;
    background: #555;
    border-radius: 2px;
  }
  
  #timeline::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
  }
  
  #timeline::-moz-range-track {
    height: 4px;
    background: #555;
    border-radius: 2px;
  }
  
  /* Responsive tweak */
  @media (max-width: 400px) {
    #video-player {
      width: 90%;
      padding: 15px;
    }
  
    #play-pause-btn {
      padding: 6px 12px;
      font-size: 12px;
    }
  }
  