:root {
    --primary-color-light: #2196F3;
    --primary-color-dark: #1c026b;
    --accent-color-light: #1976D2;
    --accent-color-dark: #1565C0;
    --bg-color-light: #E3F2FD;
    --bg-color-dark: #121212;
    --card-bg-light: white;
    --card-bg-dark: #1e1e1e;
    --text-color-light: #212121;
    --text-color-dark: #f0f0f0;
    --hover-color-light: #BBDEFB;
    --hover-color-dark: #37474F;
  }

  body.light {
    --primary-color: var(--primary-color-light);
    --accent-color: var(--accent-color-light);
    --bg-color: var(--bg-color-light);
    --card-bg: var(--card-bg-light);
    --text-color: var(--text-color-light);
    --hover-color: var(--hover-color-light);
  }

  body.dark {
    --primary-color: var(--primary-color-dark);
    --accent-color: var(--accent-color-dark);
    --bg-color: var(--bg-color-dark);
    --card-bg: var(--card-bg-dark);
    --text-color: var(--text-color-dark);
    --hover-color: var(--hover-color-dark);
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s, color 0.4s;
  }

  body {
    font-family: 'Segoe UI',sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    transition: background-color 0.4s, color 0.4s, opacity 0.5s ease-out;
    opacity: 0;
  }
  
  body.fade-out {
      opacity: 0;
  }
  
  .fade-in-effect {
    animation: pageFadeIn 0.5s ease-in forwards;
  }
  
  .slide-in-effect {
    animation: pageSlideInFromRight 0.6s ease-out forwards;
  }

  @keyframes pageFadeIn {
    to {
        opacity: 1;
    }
  }
  
  @keyframes pageSlideInFromRight {
    from {
      opacity: 0;
      transform: translateX(100px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }


  .container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
  }

  .navbar {
    background-color: var(--primary-color);
    padding: 10px 20px;
    color: white;
  }

  .navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }

  .navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
  }

  .search-box {
    padding: 8px 15px;
    border-radius: 16px;
    border: none;
    width: 300px;
  }

  .btn-masuk {
    background-color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 19px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }

  .btn-masuk:hover {
    background-color: #00085d;
    transform: scale(1.05);
  }

  .dark-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
  }

  body.dark .navbar,
  body.dark footer {
    background-color: var(--primary-color-dark);
  }

  body.dark .btn-masuk {
    background-color: #333;
    color: #f0f0f0;
  }

  body.dark .btn-masuk:hover {
    background-color: #3d3c3c;
  }

  .produk-section {
    padding: 40px 0;
  }

  .produk-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .produk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
  }

  .card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 8px rgba(0,0,0,0.1);
    text-align: center;
    font-family: sans-serif bold;
    font-weight: bold;
    font-style: italic;
    transition: transform 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
  }

  .card:hover {
    transform: scale(1.05);
    background-color: var(--hover-color);
  }

  .game-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f5f5f5;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
  }

  .card:hover .game-img {
    transform: scale(1.03);
  }

  .fade-in {
    animation: fadeIn 1s ease-in-out;
  }

  .slide-up {
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  footer {
    background-color: var(--primary-color);
    text-align: center;
    color: white;
    padding: 15px 0;
    margin-top: 40px;
  }

  @media (max-width: 768px) {
    .navbar-inner {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }

    .navbar-actions {
      width: 100%;
      justify-content: space-between;
    }

    .search-box {
      width: 100%;
    }

    .btn-masuk {
      flex-grow: 1;
      text-align: center;
    }
  }

  .logo-img {
    height: 60px; /* Tinggi asli untuk menjaga layout header */
    width: auto;
    display: block;
    transform: scale(1.5); /* Membuat logo 50% lebih besar secara visual */
    transition: transform 0.3s ease; /* Opsional: transisi halus */
  }

  .carousel {
    margin-top: 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
  }

  .carousel-inner {
    display: flex;
    width:100%;
    position: relative;
  }

  .carousel-slide {
    width: 100%;
    flex-shrink: 0;
    display: none;
    object-fit: cover;
    border-radius: 15px;
  }

  .carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
  }

  .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: white;
    background-color: rgba(255, 255, 255, 0);
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    z-index: 2;
    transition: background-color 0.3s ease;
  }

  .carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0);
  }

  .carousel-btn.prev {
    left: 1px;
  }

  .carousel-btn.next {
    right: 1px;
  }

  .carousel-3d {
    position: relative;
    perspective: 1000px;
    height: 300px;
    margin: 60px auto;
    overflow: visible;
  }

  .carousel-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.6s ease;
    position: relative;
    transform-style: preserve-3d;
    height: 100%;
  }

  .carousel-item {
    width: 520px;
    height: 100%;
    position: absolute;
    transition: transform 0.6s ease, opacity 0.6s ease;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 30px rgba(0,0,0,0.15);
    opacity: 0.5;
    transform: scale(0.8);
  }

  .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }


  .carousel-item.active {
    opacity: 1;
    transform: scale(1) translateZ(90px);
    z-index: 2;
  }

  .carousel-item.left {
    transform: translateX(-60%) rotateY(30deg) scale(0.85);
    z-index: 1;
  }

  .carousel-item.right {
    transform: translateX(60%) rotateY(-30deg) scale(0.85);
    z-index: 1;
  }

  .carousel-dots {
    text-align: center;
    margin-top: 20px;
  }

  .carousel-dots button {
    width: 12px;
    height: 12px;
    background-color: #bbb;
    border: none;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .carousel-dots button.active {
    background-color: #0088ff;
  }

  /* BARU: Efek glow untuk kartu game di dark mode */
  body.dark .card {
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.1);
  }

  /* BARU: Efek glow yang lebih kuat saat hover di dark mode */
  body.dark .card:hover {
    box-shadow: 0 0 25px rgba(33, 150, 243, 0.2);
  }

  /* BARU: Gaya untuk Modal Pop-up */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .modal-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  .modal-content {
    background-color: var(--card-bg);
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 90%;
    max-width: 380px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  }

  .modal-overlay.show .modal-content {
    transform: scale(1);
  }

  .modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    color: var(--text-color);
  }

  .modal-content p {
    margin-bottom: 25px;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.5;
  }

  .close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    line-height: 1;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .close-modal-btn:hover {
    color: var(--text-color);
    transform: scale(1.1);
  }