* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
  }

  :root {
    --box-bg: rgba(20, 20, 20, 0.6);
    --border-color: #222;
    --text-color: #fff;
    --heart-color: #ff2a6d;
  }

  body {
    background-color: #0f0f0f;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    min-height: 100vh;
    position: relative;
    color: var(--text-color);
    overflow-x: hidden;
    padding-top: 30px;
  }

  #particles-js {
    width: 100%;
    height: 100%;
    background-position: 50% 50%;
    position: fixed;
    top: 0px;
    z-index: -1;
  }

  .page-title {
    text-align: center;
    font-size: 4.5rem;
    font-weight: normal;
    color: white;
    margin: 0 0 20px 0;
  }

  .search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
  }

  #search-box {
    background-color: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(80, 80, 80, 0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    width: 200px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    outline: none;
  }

  #search-box:hover, #search-box:focus {
    width: 300px;
    background-color: rgba(40, 40, 40, 0.8);
    border-color: rgba(120, 120, 120, 0.5);
  }

  #search-box::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }

  .categories-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 1200px;
    padding: 0 15px;
  }

  .category-btn {
    background-color: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(80, 80, 80, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
  }

  .category-btn:hover {
    background-color: rgba(40, 40, 40, 0.8);
  }

  .category-btn.active {
    background-color: rgba(40, 40, 40, 0.9);
    border-color: rgba(120, 120, 120, 0.5);
  }
  
  .category-btn.liked {
    color: white;
    background-color: rgba(255, 42, 109, 0.3);
    border-color: rgba(255, 42, 109, 0.5);
  }
  
  .category-btn.liked.active {
    background-color: rgba(255, 42, 109, 0.5);
    border-color: rgba(255, 42, 109, 0.8);
  }
  
  .category-btn.liked:hover {
    background-color: rgba(255, 42, 109, 0.4);
  }

  #games {
      position: relative;
      width: 100%;
      height: 100%;
      margin-top: 20px;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      padding-bottom: 80px;
  }

  #games .item {
      width: 8vw;
      height: 8vw;
      margin: 0.8vw;
      display: flex;
      border-radius: 1vw;
      transition: all 0.5s;
      min-width: 120px;
      min-height: 120px;
      perspective: 1000px;
      position: relative;
  }

  #games .item a {
      width: 100%;
      height: 100%;
      text-decoration: none;
      color: white;
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  #games .item img {
      position: relative;
      width: 100%;
      height: 100%;
      border-radius: 1vw;
      object-fit: cover;
  }

  #games .item:hover {
      cursor: pointer;
      transform: rotate(-10deg) scale(1.3);
      box-shadow: 0 0 1vw #181818;
      z-index: 10;
  }
  
  .heart-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background-color: rgba(20, 20, 20, 0.7);
      backdrop-filter: blur(2px);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      border: none;
      z-index: 5;
      transition: transform 0.2s ease;
  }
  
  .heart-btn svg {
      width: 16px;
      height: 16px;
      color: white;
      transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .heart-btn.liked svg {
      color: var(--heart-color);
      fill: var(--heart-color);
      stroke: var(--heart-color);
  }
  
  .heart-btn:hover {
      transform: scale(1.15);
  }
  
  .heart-btn.animate svg {
      animation: heart-pulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  @keyframes heart-pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.3); }
      100% { transform: scale(1); }
  }

  .game-title {
      display: none;
  }

  .tooltip {
      position: absolute;
      background: rgba(0, 0, 0, 0.5);
      color: white;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 14px;
      font-family: sans-serif;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.2s ease-in-out;
      z-index: 9999;
      text-transform: capitalize;
      backdrop-filter: blur(2px);
  }

  .tooltip.show {
      opacity: 1;
  }

  .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: white;
  }

  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 15px;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  .ad-container {
    background-color: rgba(20, 20, 20, 0.4);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .ad-vertical-left {
    width: 160px;
    height: 300px;
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }

  .ad-vertical-right {
    width: 160px;
    height: 300px;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }

  .ad-horizontal-top {
    width: 728px;
    height: 90px;
    margin: 0 auto 20px;
  }

  .ad-horizontal-bottom {
    width: 468px;
    height: 60px;
    margin: 20px auto;
  }

  .adsterra-ref {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    background-color: rgba(20, 20, 20, 0.4);
    padding: 5px;
    border-radius: 5px;
  }

  .adsterra-ref:hover {
    opacity: 1;
  }

  .adsterra-ref img {
    border-radius: 5px;
  }

  .dock {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 20px;
    background-color: rgba(20, 20, 20, 0.8);
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    border-radius: 18px;
    box-shadow: 0 0 0 1px rgba(80, 80, 80, 0.2), 
               0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
  }
  
  .dock-icons {
    display: flex;
    align-items: center;
    gap: 22px;
  }
  
  .nav-link {
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 8px;
    text-decoration: none;
  }
  
  .nav-link:hover {
    transform: scale(1.15);
    opacity: 1;
  }
  
  .nav-link.active {
    opacity: 1;
  }
  
  .nav-link svg {
    width: 24px;
    height: 24px;
  }
  
  .nav-link::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background-color: rgba(40, 40, 40, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    z-index: 99;
    pointer-events: none;
    font-family: 'Poppins', sans-serif;
    font-weight: normal;
  }
  
  .nav-link:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  
  .content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
  }
  
  @media screen and (max-width: 1024px) {
    .ad-vertical-left, .ad-vertical-right {
      display: none;
    }
  }
  
  @media screen and (max-width: 768px) {
    .page-title {
      font-size: 3rem;
      margin: 0 0 20px 0;
    }
    
    .categories-container {
      gap: 8px;
    }
    
    .category-btn {
      font-size: 0.8rem;
      padding: 6px 12px;
    }
    
    #search-box {
      width: 150px;
    }
    
    #search-box:hover, #search-box:focus {
      width: 220px;
    }
    
    #games .item {
      width: 100px;
      height: 100px;
      margin: 8px;
    }
    
    .ad-horizontal-top {
      width: 468px;
      height: 60px;
    }
  }

  @media screen and (max-width: 500px) {
    .ad-horizontal-top, .ad-horizontal-bottom {
      width: 320px;
      height: 50px;
    }
    
    .adsterra-ref {
      bottom: 90px;
    }
  }