*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
.gallery{
    width: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #ffffff;
    justify-content: center;
    align-items: center;
    scroll-behavior: smooth;
}

.gallery-container{
    align-items: center;
    display: flex;
    height: 600px;
    margin: 0 auto;
    max-width: 90%;
    position: relative;

}

.gallery-item{
    height: 225px;
    opacity: 0;
    position: absolute;
    transition: all 0.3s ease-in-out;
    width: 400px;
    z-index: 0;
    border-radius: 15px;
    background-size: contain;
}

.gallery-item-1{
    left: 15%;
    opacity: .4;
    transform: translateX(-50%);
}

.gallery-item-2, .gallery-item-4{
    height: 270px;
    opacity: 0.8;
    width: 480px;
    z-index:1;
}

.gallery-item-2{
    left: 30%;
    transform:translateX(-50%) ;
}

.gallery-item-3{
    box-shadow: -2px 5px 33px 6px rgba(0, 0, 0, 0.35);
    height: 315px;
    opacity: 1;
    left: 50%;
    transform: translateX(-50%);
    width: 560px;
    z-index: 2;
    transition: all 0.3s ease-in-out;
}

.gallery-item-3:hover{
    box-shadow: -2px 5px 20px 6px rgba(0, 0, 0, 0.55);
    scale: 1.02;
}

.gallery-item-4{
    left:70%;
    transform:  translateX(-50%);
}

.gallery-item-5{
    left:85%;
    opacity: .4;
    transform: translateX(-50%);
}

.gallery-controls {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    box-sizing: border-box;
}

.gallery-controls button {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    margin-bottom: 5rem;
    border-radius: 50%;
    cursor: pointer;
    height: 70px;
    width: 70px;
    display: flex;
    align-items: center;
    font-size: 0;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-controls button:hover {
    background-color: rgba(211, 211, 211, 0.7);
}

.gallery-controls-button:focus{
    outline: none;
}

.gallery-controls-previous{
    position: relative;
}

.gallery-controls-previous::before,
.gallery-controls-next::before {
    border: solid #000;
    border-width: 0 3px 3px 0;
    content: '';
    display: inline-block;
    height: 8px;
    position: relative;
    width: 8px;
}

.gallery-controls-previous::before {
    transform: rotate(135deg);
}

.gallery-controls-next::before {
    transform: rotate(-45deg);
}


.gallery-controls-next{
    position: relative;
}

.gallery-controls-next::before {
    border: solid #000;
    border-width: 0 3px 3px 0;
    content: '';
    display: inline-block;
    height: 8px;
    position: relative;
    transform: rotate(-45deg);
    width: 8px;
}


.gallery-nav{
    bottom:-15px;
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    position: absolute;
    width: 100%;
}

.gallery nav li{
    background: #ccc;
    border-radius: 50%;
    height: 10px;
    margin: 0 16px;
    width: 10px;
}

.gallery-nav li.gallery-item-selected{
    background: #555;
}

/* Container utama */
.container1 {
    width: 100%; /* Lebar penuh */
    padding-bottom: 1rem; /* Kurangi padding bawah jika perlu */
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
  }
  
  /* Judul */
  .container1 h1 {
    text-align: left; /* Pindahkan teks ke kiri */
    color: rgb(0, 0, 0);
    margin-bottom: 1rem; /* Jarak antara judul dan slider */
    font-size: 2.5rem; /* Ukuran font besar */
    font-weight: bold; /* Pastikan teks tebal */
    margin-left: 1rem; /* Tambahkan margin kiri agar tidak terlalu menempel ke tepi */
  }
  
  /* Slider */
  .slider {
    width: 100%; /* Lebar penuh */
    position: relative;
  }
  /* Track (konten yang bergerak) */
  .slider .track {
    display: flex;
    width: calc(250px * 12 + 20px * 12); /* Lebar total track */
    animation: slide 15s linear infinite; /* Animasi loop */
  }
  
/* Element individu dalam track */
.slider .element {
    width: 250px; /* Lebar setiap elemen */
    background-color: white;
    margin: 0 20px; /* Margin antar elemen */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: visible; /* Pastikan konten tidak terpotong */
    box-shadow: 0 6px 10px rgb(0, 0, 0);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Efek transisi untuk hover */
  }
  
  /* Gambar dalam element */
  .image-container {
    width: 100%;
    height: auto; /* Tinggi gambar diperbesar dari 100px ke 150px */
    overflow: hidden;
  }
  .image-container img {
    width: 100%;
    height: 100%;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s ease; /* Efek hover untuk gambar */
}

/* Hover effect pada gambar */
.element:hover {
  transform: scale(1.1); /* Perbesar gambar saat di-hover */
  box-shadow: 0 6px 10px rgb(0, 0, 0);
}
  /* Teks deskripsi dalam element */
  .element p {
    margin: 0;
    padding: 15px; /* Padding untuk teks deskripsi */
    text-align: center;
    font-size: 1rem;
    color: #333;
    background-color: white; /* Pastikan latar belakang teks tidak transparan */
    border-bottom-left-radius: 10px; /* Sudut bawah kiri melengkung */
    border-bottom-right-radius: 10px; /* Sudut bawah kanan melengkung */
  }
  
  /* Animasi slide */
  @keyframes slide {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(calc(-250px * 6 - 20px * 6)); /* Geser sejauh lebar 6 elemen + margin */
    }
  }
.games-section {
    padding: 2rem;
    margin-top: 2rem;
}
.games-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: bold;
    color: #000000;
}
.games-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    
}
.game-box {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgb(0, 0, 0);
}
.game-box.hidden {
    display: none; /* Menyembunyikan kotak game */
}
.game-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 50%);
    pointer-events: none;
    z-index: 1;
}
.game-box:hover::after {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}
.game-box:hover .game-content {
    opacity: 1;
}
.game-box:hover .game-image img {
    filter: blur(5px);
    border: white 2px solid;
}
.game-box:hover .game-logo {
    opacity: 1;
}
.game-image {
    width: 100%;
    padding-top: 140%; /* Creates 10:16 aspect ratio (16/10 * 100) */
    position: relative;
    overflow: hidden;
}
.game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* This ensures the image covers the area without distortion */
}
.game-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: #fff;
    padding: 1rem;
    z-index: 2; /* Ensure content appears above the shadow */
}
.game-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}
.game-content p {
    margin: 0;
    font-size: 0.9rem;
}
.game-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
}
.game-logo img {
    width: 50px;
    height: 50px;
}
@media screen and (max-width: 768px) {
    .games-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }
    .game-box {
        padding: 0.8rem;
    }
    .game-image {
        padding-top: 62.5%; /* Maintain 16:10 aspect ratio */
    }
    .game-image img {
        width: 100%;
        height: 100%;
    }
}
@media screen and (max-width: 480px) {
    .games-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}
.load-more-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #6a5acd;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}
.load-more-button:hover {
    background-color: #5743d6;
}

.site-footer {
    background: #333;
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 1rem;
    border-bottom: 1px solid #555;
}

.footer-info,
.footer-links,
.footer-social {
    flex: 1;
    margin: 1rem;
    min-width: 200px;
}

.footer-links ul,
.footer-social ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li,
.footer-social ul li {
    margin: 0.5rem 0;
}

.footer-links a,
.footer-social a {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover,
.footer-social a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 1rem;
    font-size: 0.9rem;
}