* {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: sans-serif;
      background-color: #f9f9f9;
    }

    .gallery {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 15px;
      padding: 20px;
    }

    .gallery img {
      width: 100%;
      height: auto;
      cursor: pointer;
      border-radius: 8px;
      transition: transform 0.3s ease;
    }

    .gallery img:hover {
      transform: scale(1.03);
    }

    .lightbox {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.85);
      display: flex;
      justify-content: center;
      align-items: center;
      display: none;
      z-index: 1000;
      flex-direction: column;
    }

    .lightbox img {
      max-width: 90%;
      max-height: 80%;
      border-radius: 8px;
    }

    .lightbox .close {
      position: absolute;
      top: 20px;
      right: 30px;
      font-size: 30px;
      color: white;
      cursor: pointer;
    }

    .arrow {
      position: absolute;
      top: 50%;
      font-size: 50px;
      color: white;
      cursor: pointer;
      user-select: none;
      transform: translateY(-50%);
      padding: 10px;
    }

    .arrow.left {
      left: 30px;
    }

    .arrow.right {
      right: 30px;
    }

    .caption {
      margin-top: 20px;
      background-color: rgba(0, 0, 0, 0.6);
      color: white;
      padding: 10px 20px;
      border-radius: 5px;
      font-size: 16px;
      text-align: center;
      max-width: 90%;
    }