  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #121212;
    color: #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    height: auto;
  }
  h1 {
    margin-bottom: 16px;
    color: #4ade80; /* vibrant green */
    text-align: center;
  }

  /* Gallery grid */
  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px,1fr));
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    max-height: 520px;
    overflow-y: auto;
    border-radius: 8px;
    padding: 5px;
    background: #1e1e1e;
    box-shadow:
      0 4px 10px rgba(74, 222, 128, 0.4),
      inset 0 0 8px rgba(74, 222, 128, 0.3);
  }

  .gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.6);
  }
  .gallery img:hover,
  .gallery img:focus {
    transform: scale(1.1);
    box-shadow:
      0 6px 12px rgba(74, 222, 128, 0.8);
    outline: none;
  }

  /* Modal styles */
  .modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(18,18,18,0.95);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 15px;
  }
  .modal.open {
    display: flex;
  }
  .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px #4ade80;
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 3.5%; margin-top: 3%;
  }
  .modal-content img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    border-radius: 10px;
  }
  .modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 30px;
    color: #4ade80;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    user-select: none;
    transition: color 0.3s ease;
    z-index: 11;
  }
  .modal-close:hover,
  .modal-close:focus {
    color: #86efac;
    outline: none;
  }

  /* Carousel arrows */
  .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #4ade80;
    background: rgba(0,0,0,0.4);
    border: none;
    font-size: 40px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 50%;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 10;
  }
  .carousel-arrow:hover,
  .carousel-arrow:focus {
    background: rgba(74,222,128,0.9);
    color: #121212;
    outline: none;
  }
  .carousel-arrow.prev {
    left: 10px;
  }
  .carousel-arrow.next {
    right: 10px;
  }

  /* Scrollbar for gallery */
  .gallery::-webkit-scrollbar {
    width: 6px;
  }
  .gallery::-webkit-scrollbar-thumb {
    background-color: #4ade80;
    border-radius: 4px;
  }

  /* Responsive to max height 600px and width 350px */
  @media (max-width: 380px) {
    .gallery {
      max-width: 100vw;
      max-height: 520px;
    }
  }  
   @media (max-width: 600px) {
     .modal-content {
      margin-top: 35%;
      margin-left: auto;      
    max-width: 100%;
    max-height: 40vh;
     }
     .modal-content img{
     max-height: 40vh;
    }
    }

    