/* Estilos generales del body: fuente, color y padding lateral */
body {
  font-family: 'Raleway', sans-serif;
  line-height: 1.6;
  color: #cacbd2;
  background-color: #141C2A;
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(20, 28, 42, 0.9), rgba(20, 28, 42, 0.95)), 
              url('/icons/images/gamesbackground.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px);
  z-index: -1;
  opacity: 0.5;
}

.gamestittle {
    font-size: 50px;
  font-family: "Rubik Dirt", system-ui;
    text-align: center;
    color: #e7e7eb;
    margin: 0 auto; 
    word-wrap: break-word; 
    overflow-wrap: break-word;
    margin-bottom: 5px;
  font-weight: 500;
    line-height: 1.1 !important;
  }
  .gamesdescription {
    font-family: 'Segoe UI', Arial, sans-serif;
    text-align: center;
    color: #cacbd2;
    max-width: 600px;
    margin: 0 auto; 
    word-wrap: break-word; 
    overflow-wrap: break-word;
    margin-bottom: 30px;
    font-weight: 500;
  }

  .star-hero-rating {
    align-items: center;
    text-align: center;
    gap: 0.7rem;
    font-size: 1.1rem;
    margin-bottom: 1.1rem;
}
.star-stars {
  color: #00B479;
  margin-right: 2px;
}

.star-stars i {
    color: #00B479;
    margin-right: 2px;
}
.star-trustpilot {
    color: #00B479;
    font-weight: 600;
    margin-left: 0.6rem;
}
  
  
  .controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  #searchInput {
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 19px;
    width: 900px;
    border: none;
    font-size: 1em;
    background: #141c2a15;
    border: 3px solid #12121abb;
    color: #cacbd2;
    transition: all 0.3s ease;
  }
  #searchInput::placeholder {
    color: #cacbd2;
  }
  #searchInput:focus {
    background: transparent;
    outline: none;
    box-shadow: 0 0 3px #cacbd2;
  }
  
  .filter-dropdown {
    position: relative;
    display: inline-block;
  }
  
  /* Cambié #filterBtn por #platformFilterBtn para que encaje */
  #platformFilterBtn {
    background: #12121a15;
    border: 2px solid #12121abb;
    color: #cacbd2;
    padding: 14px 20px;
    border-radius: 19px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative; /* para el círculo */
    user-select: none;
    transition: all 0.3s ease;
  }
  #platformFilterBtn:hover {
    background: #15151f;
  }
  
  /* Círculo rojo indicador en botón cuando está activo */
  #platformFilterBtn.active::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 12px;
    height: 12px;
    background: linear-gradient(-131deg, #c822cb, #e069e2, #c822cb);
    border-radius: 50%;
    box-shadow: 0 0 6px #C622C9;
  }
  
  .filter-menu {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #12121a;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 100;
    min-width: 190px;
    max-height: 2200px;
    overflow-y: auto;
  }
  
  .filter-menu.active {
    display: block;
  }
  
  /* Botones toggle para plataformas (sin checkbox clásico) */
  .platform-filter-btn {
    background: #1616ec00;
    color: #cacbd2;
    border-radius: 10px;
    padding: 5px 5px;
    margin: 5px 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease, color 0.3s ease;
    border: 3px solid #c622c900;
  }
  
  
  
  .platform-filter-btn i {
    font-size: 1.2em;
    flex-shrink: 0;
    font-weight: 500;
  }
  
  /* Cuando está activo, cambia fondo y aparece check */
  .platform-filter-btn.active {
    color: #e6e6e6;
    border: 3px solid #c622c900;
  }
  .platform-filter-btn.active::after {
    content: "•";
    margin-left: auto;
    font-weight: bold;
    font-size: 1.1em;
    color: #C622C9;
  }
  
  /* Botón Eliminar Filtros */
  .clear-btn {
    background: #12121a15;
    border: 2px solid #12121abb;
    border-radius: 19px;
    color: #c90a10;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 20px;
    transition: background 0.3s ease, color 0.3s ease;
    user-select: none;
  }
  
  .clear-btn:hover {
    background: #15151f;
  }
  
  /* Tus estilos para .game-container y .game-card quedan igual */
  .game-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
  }
  
  .game-card {
    position: relative;
    width: calc(25% - 20px);  /* 4 cards per row on large screens */
    min-width: 200px;  /* Minimum width to prevent cards from getting too narrow */
    height: 330px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    outline: none;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease, outline 0.1s ease;
    margin-bottom: 20px;
  }
  
  .game-card:hover {
    transform: scale(1.05);
    outline: 2px solid #C622C9;
    box-shadow: 0 8px 20px #C622C9;
  }
  

  .game-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 5.8), rgba(0, 0, 0, 0));
    color: #fff;
  }
  
  .game-title {
    margin: 0;
    font-size: 1.2em;
  }
  
  .game-price {
    margin: 4px 0 8px;
    font-weight: bold;
    color: #00ff88;
  }
  
  .platform-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 2px;
    background-color: #12121a;
    border-radius: 6px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
  }
  .platform-icons i {
    background-color: #12121a;
    padding: 4px;
    border-radius: 6px;
    border: 0px solid #232333;
  }
  .platform-icons .disabled {
    opacity: 0.3;
  }
  
  .game-info span2 {
    color: #fff;
    font-size: 0.8em;
  }

  /* Estilos para la imagen de esquina */
  .corner-image {
    position: absolute;
    right: 0px;  
    bottom: 0px;  
    z-index: -1;
    overflow: hidden;
    width: 700px;   
    height: 700px;  
    opacity: 0.5;   
  }

  .corner-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translate(30%, 30%); 
  }

  /* Desktop view (4 cards per row) */
  @media (min-width: 1025px) {
    .game-card {
      width: 220px;  /* Fixed width instead of percentage */
    }
  }
  
  /* Tablet view (3 cards per row) */
  @media (min-width: 769px) and (max-width: 1024px) {
    .game-card {
      width: 220px;  /* Fixed width for consistency */
    }
  }

  /* Mobile view (2 cards per row) */
  @media (max-width: 768px) {
    .corner-image {
      display: none;
    }

    .game-container {
      justify-content: space-between;
      padding: 0 10px;
      gap: 10px;
    }
    
    .game-card {
      width: calc(50% - 5px);
      height: 280px;
      margin-bottom: 15px;
      min-width: auto;
    }
    
    .game-card:hover {
      transform: none;
      outline: 2px solid #C622C9;
      box-shadow: 0 4px 12px rgba(198, 34, 201, 0.6);
    }


    .platform-icons {
      font-weight: 100;
      display: flex;
      gap: 4px;
      font-size: 0.7em;
    }
    .platform-icons i {
      background-color: #12121a;
      padding: 4px;
      border-radius: 6px;
      border: 0px solid #232333;
    }


    .game-info {
      position: absolute;
      bottom: 0;
      width: 100%;
      padding: 12px;
      background: linear-gradient(to top, rgba(0, 0, 0, 5.8), rgba(0, 0, 0, 0));
      color: #fff;
    }
    
    .game-title {
      margin: 0;
      font-size: 0.9em;
    }
    
    .game-price {
      margin: 4px 0 8px;
      font-weight: bold;
      color: #00ff88;
    }
    


    #searchInput {
      font-weight: bold;
      padding: 10px 15px;
      border-radius: 10px;
      width: 40%;
      border: none;
      font-size: 1em;
      background: #141c2a15;
      border: 3px solid #12121abb;
      color: #cacbd2;
      transition: all 0.3s ease;
    }
  }
  /* Small mobile devices */
  @media (max-width: 480px) {
    .game-card {
      width: calc(50% - 5px);
      height: 250px;
    }
    
    .gamestittle {
      margin-top: 15%;
      font-size: 32px;
    }
    
    .game-title {
      font-size: 0.85em;
    }
    
    .game-price {
      font-size: 0.9em;
    }
  }
  @media (max-width: 900px) { 
    .gamestittle {
    margin-top: 24%;
    }
  }


@media (max-width: 1100px) { 
  
  #searchInput {
    width: 40%;
  }
}