/* ===== Estilo Base ===== */ * { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; width: 100%; } /* ===== Barra Superior ===== */ header.top-bar { position: sticky; top: 0; left: 0; width: 100%; height: 60px; background-color: rgba(26,26,26,0.95); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 10000; } /* ===== Logo y título ===== */ .logo { height: 40px; width: auto; cursor: pointer; /* Para indicar que es clickable */ } .title { flex: 1; text-align: center; font-size: 24px; color: #ff4c4c; } .search-btn { background: none; border: none; font-size: 24px; color: #fff; cursor: pointer; } /* ===== Cuerpo ===== */ body { font-family: 'Arial', sans-serif; background: url("https://i.imgur.com/V7TfPO4.png") no-repeat center center fixed; background-size: cover; color: #f5f5f5; overflow-x: hidden; transition: background 1s ease-in-out; animation: bgPulse 20s infinite alternate; margin: 0; padding-top: 60px; min-height: 100vh; } /* ===== UI de Buscador ===== */ .search-ui { position: fixed; top: 60px; right: 20px; background: rgba(26,26,26,0.95); padding: 15px; border-radius: 10px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; } .search-ui.hidden { display: none; } .search-ui input { padding: 8px; border-radius: 5px; border: 2px solid #ff0033; background-color: rgba(26,26,26,0.9); color: #f5f5f5; } /* ===== Wrapper de Juegos con fondo semi-transparente ===== */ .games-wrapper { max-width: 1200px; width: calc(100% - 40px); margin: 20px auto; padding: 20px; border-radius: 12px; background: rgba(24,24,24,0.6); /* semi-transparente */ backdrop-filter: blur(6px); /* difuminado del fondo */ } /* ===== Grid de Juegos autoajustable ===== */ .games-container { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* minmax mínimo 140px, máximo 1fr, se adapta a pantalla */ justify-items: center; } /* ===== Tarjetas de Juego ===== */ .game-card { position: relative; width: 100%; max-width: 220px; /* no se hacen demasiado grandes */ text-decoration: none; color: inherit; background: rgba(24,24,24,0.85); padding: 12px; border-radius: 10px; transition: transform 0.16s ease, box-shadow 0.16s ease; overflow: hidden; box-sizing: border-box; } .game-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; } .game-card h2 { font-size: 16px; margin: 0 0 8px 0; text-align: center; } .game-description { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); color: #fff; padding: 15px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; font-size: 14px; text-align: center; border-radius: 10px; } .game-card:hover .game-description { opacity: 1; } /* ===== Ajustes Responsivos ===== */ /* Ajustes responsivos para móviles */ @media (max-width:480px){ .games-container { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); /* más pequeñas */ gap: 12px; /* reduce el gap para que entre todo */ } .game-card { max-width: 140px; /* limita ancho de cada tarjeta */ padding: 8px; /* reduce padding interno */ } .game-card img { height: 100px; /* altura de imagen más pequeña */ } .game-card h2 { font-size: 14px; /* título más pequeño */ } .game-description { font-size: 12px; /* descripción más pequeña */ } } /* ===== Modal de Advertencia Edad ===== */ #ageOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(11,11,11,0.6); display: flex; justify-content: center; align-items: center; z-index: 20000; } #ageBox { background-color: rgba(26,26,26,0.95); width: 90%; max-width: 400px; padding: 20px; border-radius: 15px; text-align: center; box-shadow: 0 0 20px #ff0033, 0 0 40px #ff0033 inset; animation: fadeInBox 0.5s ease-in-out; max-height: 90%; overflow-y: auto; } #ageBox img { width: 100px; max-width: 50%; height: auto; margin-bottom: 15px; } #ageBox h2 { margin-bottom: 10px; color: #ff0033; } #ageBox p { font-size: 14px; margin-bottom: 20px; color: #f5f5f5; } #ageBox button { margin: 0 10px; padding: 8px 20px; font-weight: bold; border-radius: 5px; border: 2px solid #ff0033; background-color: transparent; color: #ff0033; cursor: pointer; transition: all 0.3s ease-in-out; } #ageBox button:hover { background-color: #ff0033; color: #0b0b0b; box-shadow: 0 0 10px #ff0033, 0 0 20px #ff0033; } @keyframes fadeInBox { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } } /* Ajustes móviles */ @media screen and (max-width: 500px) { #ageBox { width: 90%; padding: 15px; } #ageBox h2 { font-size: 18px; } #ageBox p { font-size: 12px; } #ageBox img { width: 80px; margin-bottom: 10px; } html > header.top-bar { padding: 0 10px; } .title { font-size: 20px; } } /* Contenedor de juegos */ /* Contenedor de juegos */ .games-container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 juegos por fila, se ajusta al ancho */ gap: 8px; /* espacio entre cartillas */ width: 100%; /* asegurar que ocupe todo el ancho */ max-width: 1200px; /* opcional, para no exceder el diseño */ margin: 0 auto; /* centra el grid */ padding: 0 8px; /* reduce el padding lateral */ } /* Cada cartilla */ .game-card { background-color: #1e1e1e; border-radius: 8px; overflow: hidden; text-align: center; padding: 6px; transition: transform 0.2s; width: 100%; /* asegura que ocupe todo el espacio de su columna */ } /* Imagen dentro de la cartilla */ .game-card img { width: 100%; height: auto; display: block; border-radius: 4px; } /* Nombre y descripción */ .game-card h2 { font-size: 16px; margin: 6px 0 4px 0; /* reduce el margen superior e inferior */ } .game-description { font-size: 14px; color: #ccc; margin-top: 2px; /* Esto limita a 1 línea y agrega "..." */ white-space: nowrap; /* no permite que el texto haga salto de línea */ overflow: hidden; /* corta el texto que sobrepase el contenedor */ text-overflow: ellipsis; /* agrega "..." al final */ } /* Si quieres permitir hasta 2 líneas y luego "..." */ .game-description-2lines { font-size: 14px; color: #ccc; margin-top: 2px; display: -webkit-box; /* necesario para multiline ellipsis */ -webkit-line-clamp: 2; /* número máximo de líneas */ -webkit-box-orient: vertical; overflow: hidden; }