   
    :root {
      --bg-overlay: rgba(0, 0, 0, 0.92);
      --btn-bg: rgba(255, 255, 255, 0.15);
      --btn-hover: rgba(255, 255, 255, 0.35);
      --transition: 0.25s ease;
    }
   .modal {
      display: none;
      position: fixed;
      inset: 0;
      background: var(--bg-overlay);
      z-index: 1000;
      justify-content: center;
      align-items: center;
      flex-direction: column;
    }

    .btn {
      position: absolute;
      background: var(--btn-bg);
      color: #fff;
      border: none;
      cursor: pointer;
      font-size: 1.4rem;
      padding: 10px;
      border-radius: 50%;
      transition: background var(--transition);
      z-index: 10;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
    }

    .btn:hover {
      background: var(--btn-hover);
    }

    .close {
      top: 16px;
      right: 16px;
    }
     .modal {
      display: none;
      position: fixed;
      inset: 0;
      background: var(--bg-overlay);
      z-index: 1000;
      justify-content: center;
      align-items: center;
      flex-direction: column;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      position: relative;
      width: 100%;
      height: 80vh;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
    }

    #modalImage, #modalVideo {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      border-radius: 6px;
      user-select: none;
      -webkit-user-drag: none;
      touch-action: none;
      will-change: transform;
    }