body {
      margin: 0;
      font-family: 'Segoe UI', sans-serif;
      background: #f9f9f9;
    }

    .gallery {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      padding: 20px;
      gap: 12px;
    }

    .gallery .gallery-item {
      perspective: 1000px;
    }

    .gallery .gallery-item img {
      width: 100%;
      max-width: 240px;
      aspect-ratio: 4/3;
      object-fit: cover;
      border-radius: 8px;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      transition: transform 0.5s, box-shadow 0.5s;
    }

    .gallery .gallery-item:hover img {
      transform: perspective(1000px) rotateY(5deg) scale(1.05);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }

    .lightbox {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0,0,0,0.9);
      justify-content: center;
      align-items: center;
      z-index: 1000;
      flex-direction: column;
    }

    .lightbox.show {
      display: flex;
    }

    .lightbox img {
      max-width: 90%;
      max-height: 80%;
      border-radius: 10px;
    }

    .lightbox .controls {
      margin-top: 15px;
      display: flex;
      gap: 15px;
    }

    .lightbox button {
      padding: 8px 16px;
      background: #fff;
      color: #111;
      border: none;
      border-radius: 5px;
      font-weight: bold;
      cursor: pointer;
    }

    .lightbox button:hover {
      background: #ddd;
    }

@media (max-width: 768px) {
    .gallery .gallery-item img {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .gallery {
        padding: 10px;
        gap: 10px;
    }
    .gallery .gallery-item {
        width: calc(50% - 10px);
    }
    .lightbox img {
        max-width: 95%;
    }
}

@media (max-width: 360px) {
    .gallery .gallery-item {
        width: 100%;
    }
}
