/* CSS Document */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

*,
::after,
::before {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #130226!important;
    color: #fff !important;
}

.container {
    margin: auto;
    padding: 1rem;
}

header {
    background: #180230;
    padding: 0rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}

header .containe {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 4px 0px;
    height: 100%;
}

header img {
    width: 6rem;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin-left: 10px;
}

header nav a {
    position: relative;
    font-size: 0.9rem;
    color: #e8e3f1;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0;
    transition: color 0.3s;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

header nav a:hover,
header nav a.active {
    color: #ff9421;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav li {
    position: relative;
}

@media (max-width: 768px) {
    header nav {
        display: none;
    }
    header .container {
        gap: 0;
        justify-content: space-between
    }
}

.menu-toggle {
    color: white;
    font-size: 1.5rem;
    padding: .25rem .5rem;
    background: transparent;
    border-radius: 3px;
}

.nav-link{
    color: #e8e3f1 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    padding: 15px 1px !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -28px;
    right: -24px;
    bottom: 0;
    background: linear-gradient(90deg, #26034c 0%, #8b3e87 300%);
    z-index: -1;
    opacity: 0;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    color: white !important;
    transform: translateX(0px);
}

.main-with-offcanvas {
    position: relative;
    min-height: 90vh;
}

.custom-offcanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    will-change: transform;
    margin-top: 60px;
}

.custom-offcanvas.show {
    transform: translateX(0);
}

.main-content {
    transition: margin-left 0.3s ease-in-out;
    will-change: margin-left;
}

.main-content-shifted {
    margin-left: 260px;
}

.offcanvas-content {
    height: calc(100vh - 60px);
    padding-bottom: 20px;
}

.main-with-offcanvas {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.main-with-offcanvas * {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.main-with-offcanvas input,
.main-with-offcanvas textarea {
    cursor: text;
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
}

.main-with-offcanvas {
    margin-top: 0;
}

.Canvas{
    background: #23083f;
}

.Canvas::after {
    content: '';
    position: absolute;
    top: 10%;
    bottom: 20%;
    right: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        #ff9421 20%,
        #ff9421 50%,
        #ff9421 80%,
        transparent 100%
    );
    border-radius: 2px;
}

.offcanvas-nav-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #ffffff;
}

.collapsing {
    -webkit-transition: none;
    transition: none;
    display: none;
}

.btn-primary {
    --bs-btn-bg: #ff9421 !important;
    --bs-btn-border-color: #ff9421 !important;
    --bs-btn-hover-bg: #dd7e17 !important;
    --bs-btn-hover-border-color:#ff9421 !important;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #ff9421!important;
    --bs-btn-active-border-color: #ff9421 !important;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fab56c !important;
    --bs-btn-disabled-bg: #f8ddc0 !important;
    --bs-btn-disabled-border-color: #f8ddc0 !important;
    --bs-btn-font-weight: 500 !important;
}

a {
    cursor: pointer;
}

.wrapper {
    align-items: stretch;
    display: flex;
    width: 100%;
}

.gallery-item {
    padding: 5px;
    box-sizing: border-box;
    position: relative;
    display: inline-block;
}

.gallery-item:hover .gallery-image {
    transition: transform 0.25s ease;
    opacity: 0.7;
    cursor: pointer;
}

.gallery-item:hover {
    opacity: 1;
}

.gallery-item:hover::before {
    content: '\f04b';
    font-family: "Font Awesome 5 Free";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hidden {
    display: none;
}

.gallery-image {
    width: 100%;
    border-radius: 8px;
    background: #000;
    padding: 5px;
}

.gallery-title {
    text-align: center;
    color: #ffff;
    font-family: rubik;
    font-size: 16px;
}

.image-link {
    position: relative;
    display: inline-block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ff9421 !important;
    color: white;
    border: none;   
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    width: 100px;
}

.play-button:hover {
    background: #dd7e17 !important;
}

.play-button-wrapper:hover .play-button {
    transform: translate(-50%, -50%) scale(1.05);
    transition: transform 0.3s ease;
}

.game-card:hover .play-button,
.image-link:hover .play-button {
    opacity: 1;
}

.category-filter {
    display: flex;
    flex-wrap: nowrap;
    margin: 0.5%;
    gap: 7px    
}

.input-group {
    margin: 0.5%;
}

.bi-search::before {
    color: #f08307;
}

.gallery-title {
    display: none;
}

.gallery-image.loaded + .gallery-title {
    display: block;
}

#no-results-message {
    color: #fff;
    font-family:'Open Sans', sans-serif;
    font-size: 18px;
    height: 600px;
    align-content: center;
}

.mecanicas-container {
    max-height: 400px; 
    overflow-y: auto; 
    padding: 15px;
    font-weight: 500;
}

.modal {
    font-size: 14px;
    background: #00000098;  
}

.modal-dialog {
    align-content: center;
}

.modal-header {
    gap: 1rem;
}

.modal-content {
    opacity: 1;
    color: #000 !important;
    width: 95vw;
    height: 73vh;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
}

@media (max-width: 767px) {
    .wrapper {
        overflow-x: hidden !important;
    }
}

.content {
    flex: 1;
    max-width: 100vw;
    width: 100vw;
}

@media (min-width:768px) {
    .content {
        width: auto;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #ff9421;
    border-radius: 8px;
}

.no-scroll {
    overflow: hidden;
}

.modern-filter {
    font-family: 'Segoe UI', sans-serif;
    margin-bottom: 10px;
}

.modern-filter label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.modern-filter .options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modern-filter button {
    padding: 8px 16px;
    border: none;
    border-radius: 12px;
    background: #2b014d75;
    color: #e8e3f1;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    position: relative;
}

.modern-filter button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(180deg, #2b0456 0%, #971591 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.modern-filter button:hover {
    background: #e0e0e000;
}

.modern-filter button.active {
    background: #ff004800;
    color: white;
}

.modern-filter button i {
    font-size: 16px;
}

/* ===== BUSCADOR Y MODAL - VERSIÓN GALERÍA ===== */

/* Contenedor del buscador */
.search-container {
    position: relative;
    margin: 0;
    width: 100%;
}

/* Ocultamos el dropdown de resultados anterior */
.search-results {
    display: none !important;
}

/* Nueva galería de resultados */
.search-gallery-results {
    display: none;
    margin-top: 20px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Grid responsivo para los resultados */
.search-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px 0;
    max-height: 100%;
    overflow-y: auto;
}

/* Items de la galería de búsqueda */
.search-gallery-item {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.search-game-cover {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.search-game-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-play-button {
    background: #ff9421;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 8px;
    width: 100%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-play-button:hover {
    background: #dd7e17;
}

/* Mensaje de no resultados */
.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Scrollbar para la galería */
.search-gallery-grid::-webkit-scrollbar {
    width: 8px;
}

.search-gallery-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.search-gallery-grid::-webkit-scrollbar-thumb {
    background: #ff9421;
    border-radius: 4px;
}

.search-gallery-grid::-webkit-scrollbar-thumb:hover {
    background: #dd7e17;
}

/* Responsive */
@media (max-width: 768px) {
    .search-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .search-game-cover {
        height: 100px;
    }
    
    .search-game-title {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .search-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== FIN BUSCADOR Y MODAL ===== */

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.filter-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    width: max-content;
}

.category-buttons {
    display: flex;
    gap: 0.5rem;
}

.category-button {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
}

.mobile-filter-btn {
    display: none;
}