* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f0f4ff;
  color: #333;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 123, 255, 0.1);
  position: relative;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #007bff;
}

.logo img {
  height: 39px;
  width: auto;
  margin-left: -1px; 
  transform: rotate(-6deg); 
  transform-origin: center;
  vertical-align: middle;
}

.logo span {
  margin-left: -5px;
}

.hamburger {
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: darkcyan;
  font-weight: 660;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #007bff;
}

.hero {
  text-align: center;
  padding: 6rem 3rem;
  background-image: url('mobilelegends.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4); 
  z-index: 1;
}

.hero h1 {
  font-size: 1rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.hero p {
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.section {
  padding: 3rem 2rem;
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #007bff;
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.card {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  width: 160px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: auto;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.card-title {
  margin-top: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
}
@media(min-width: 900px) {
  .card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    justify-items: center;
    max-width: 600px;
    margin: auto;       
  }

  .card {
    width: 100%;
    max-width: 170px;
  }
}

.price {
  margin-top: 0.5rem;
  color: #007bff;
  font-weight: bold;
  font-size: 0.95rem;
}

.cart-icon {
  color: #007bff;
  font-size: 1.2rem;
  background: #e6f0ff;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0.5rem auto;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cart-icon:hover {
  transform: scale(1.2);
  background-color: #c1daf9;
}

.cart-icon,
.qr-icon {
  color: #007bff;
  font-size: 1.2rem;
  background: #e6f0ff;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0.5rem auto;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cart-icon:hover,
.qr-icon:hover {
  transform: scale(1.2);
  background-color: #c1daf9;
}

#qrPopupText {
  margin-bottom: 10px;
  font-weight: bold;
  color: #333;
  font-size: 0.5rem; 
}

#qrPopup {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

#qrPopup img {
  transform: scale(0.8);
  opacity: 0;
  animation: zoomIn 0.6s ease forwards; 
}

@keyframes zoomIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}


.wa-icons {
  margin: 0.5rem 0;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
}

.wa-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: mediumslateblue;
}

.wa-item a {
  color: #25D366;
  font-size: 1.2rem;
  background: #e6f9ec;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.wa-item a:hover {
  transform: scale(1.2);
  background-color: #c1f0d1;
}

.dark-toggle {
  margin: 2rem auto;
  text-align: center;
}

.dark-toggle input {
  display: none;
}

.dark-toggle label {
  width: 80px;
  height: 50px;
  background: #f3f3f3;
  border-radius: 999px;
  position: relative;
  display: inline-block;
  cursor: pointer;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.dark-toggle input:checked + label {
  background: #444; 
}

.dark-toggle .circle {
  width: 42px;
  height: 46px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.4s;
  overflow: hidden;
}

.dark-toggle svg {
  width: 35px;
  height: 38px;
  position: absolute;
  transition: 0.4s;
}

.sun {
  color: #FFD600;
  opacity: 1;
}

.moon {
  color: #555;
  transform: translateY(-100%);
  opacity: 0;
}

.dark-toggle input:checked + label .circle {
  transform: translateX(36px);
  background: #2C2C2F;
}

.dark-toggle input:checked + label .circle .sun {
  transform: translateY(100%);
  opacity: 0;
}

.dark-toggle input:checked + label .circle .moon {
  transform: translateY(0);
  opacity: 1;
}

body.dark-mode {
  background: #1a1a1a;
  color: white;
}

body.dark-mode nav {
  background: rgba(0, 0, 0, 0.6);
}

body.dark-mode .hero {
  background: #333;
}

body.dark-mode .card {
  background: #2c2c2f;
  color: white;
}

body.dark-mode footer {
  background: #2c2c2f;
  color: #aaa;
}

body.dark-mode .hero {
  background-image: url('mobilelegends.png'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.dark-mode .hero::before {
  background: rgba(0, 0, 0, 0.6);
}

footer {
  background: #e6f0ff;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #777;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    position: relative;
    z-index: 1100;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    position: absolute;
    top: 70px;
    right: 20px;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: max-content;
    min-width: 150px;
    z-index: 1000;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  .card-grid {
    justify-content: space-between;
    gap: 1rem;
  }

  .card {
    width: 45%;
  }
}