/* ========================================
   CATALOG PAGE - RETROGRADOS GAMING
   Estilo PlayStation adaptado con colores Retrogrados
======================================== */

:root {
    --primary-dark: #0f172a;
    --secondary-dark: #1e293b;
    --accent-cyan: #00ffcc;
    --accent-purple: #9d4edd;
    --accent-orange: #ff6b00;
    --text-white: #ffffff;
    --text-gray: #cbd5e1;
    --border-color: rgba(0, 255, 204, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-dark);
    color: var(--text-white);
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   HERO BANNER - SWITCH DESTACADOS
======================================== */
.catalog-hero {
    position: relative;
    height: 70vh;
    min-height: 600px;
    overflow: hidden;
    margin-top: 80px;
}

.hero-slides-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: all;
}

.hero-slide-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    transition: transform 10s ease-out;
}

.hero-slide.active .hero-slide-bg {
    transform: scale(1.1);
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(15, 23, 42, 0.7) 50%,
        transparent 100%
    );
}

.hero-slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    max-width: 600px;
    z-index: 10;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-cyan), #00cc99);
    color: var(--primary-dark);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 255, 204, 0.4);
}

.hero-game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-game-description {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-btn {
    background: linear-gradient(135deg, var(--accent-cyan), #00cc99);
    color: var(--primary-dark);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 204, 0.5);
}

/* Hero Controls */
.hero-controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 20;
}

.hero-prev,
.hero-next {
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 204, 0.1);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-prev:hover,
.hero-next:hover {
    background: var(--accent-cyan);
    color: var(--primary-dark);
    transform: scale(1.1);
}

/* Hero Dots */
.hero-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-cyan);
    width: 40px;
    border-radius: 6px;
}

/* ========================================
   GAMES SECTION
======================================== */
.games-section {
    padding: 5rem 0;
    position: relative;
}

.games-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--border-color),
        transparent
    );
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-white);
}

.view-all-btn {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid transparent;
}

.view-all-btn:hover {
    border-color: var(--accent-cyan);
    transform: translateX(5px);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.game-card {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--secondary-dark);
}

.game-card:hover {
    transform: translateY(-10px) scale(1.05);
    z-index: 10;
}

.game-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.game-card:hover .game-card-image {
    transform: scale(1.1);
}

.game-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 1rem;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.95),
        rgba(15, 23, 42, 0.7),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.game-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.game-card-size {
    font-size: 0.8rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.game-card-server-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-server-badge {
    opacity: 1;
}

/* Loading Skeleton */
.game-card.loading {
    background: linear-gradient(
        90deg,
        var(--secondary-dark) 25%,
        rgba(0, 255, 204, 0.1) 50%,
        var(--secondary-dark) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    pointer-events: none;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   DEVICE SHOWCASE - CONSOLAS GIGANTES
======================================== */
.device-showcase {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
}

.device-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    z-index: 0;
}

.device-content {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Right Layout */
.device-showcase.right .device-content {
    grid-template-columns: 1fr 1fr;
}

/* Left Layout */
.device-showcase.left .device-content {
    grid-template-columns: 1fr 1fr;
}

.device-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}

.device-badge {
    display: inline-block;
    align-self: flex-start;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 10;
}

.device-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-white), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 10;
}

.device-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    position: relative;
    z-index: 10;
}

.device-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.device-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-cyan);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.device-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--accent-cyan), #00cc99);
    color: var(--primary-dark);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
    align-self: flex-start;
    position: relative;
    z-index: 10;
}

.device-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 204, 0.5);
}

/* Device Image - Tu solución con arreglos */
.device-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-device {
    width: 150%;
    /*max-width: 600px;*/
    height: auto;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 0;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.device-glow {
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(
        circle,
        rgba(0, 255, 204, 0.3) 0%,
        transparent 70%
    );
    filter: blur(40px);
    animation: pulse 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ========================================
   GAME MODAL
======================================== */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.game-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--secondary-dark);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: var(--accent-cyan);
    color: var(--primary-dark);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-image {
    position: relative;
}

.modal-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-platform-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--accent-cyan);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
}

.modal-game-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-gray);
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0, 255, 204, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.modal-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-gray);
}

.modal-detail i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
    width: 24px;
}

.modal-screenshots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.modal-screenshots img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-screenshots img:hover {
    transform: scale(1.05);
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-download-btn,
.modal-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.modal-download-btn {
    background: linear-gradient(135deg, var(--accent-cyan), #00cc99);
    color: var(--primary-dark);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
}

.modal-download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 204, 0.5);
}

.modal-view-btn {
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.modal-view-btn:hover {
    background: rgba(0, 255, 204, 0.2);
    transform: translateY(-3px);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
    .device-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .device-showcase.left .device-content,
    .device-showcase.right .device-content {
        grid-template-columns: 1fr;
    }
    
    .device-image {
        order: -1;
        opacity: 0.7;
    }
    
    .floating-device {
        width: 100% !important;
        max-width: 500px !important;
    }
    
    .device-badge,
    .device-cta-btn {
        align-self: center;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .catalog-hero {
        height: 50vh;
        min-height: 400px;
    }
    
    .hero-slide-content {
        left: 5%;
        right: 5%;
        max-width: 90%;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .device-showcase {
        padding: 4rem 0;
    }
    
    .device-stats {
        gap: 1rem;
    }
    
    .floating-device {
        max-width: 350px !important;
    }
    
    .modal-actions {
        grid-template-columns: 1fr;
    }
    
    .modal-screenshots {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-game-title {
        font-size: 2rem;
    }
    
    .device-title {
        font-size: 1.8rem;
    }
    
    .floating-device {
        max-width: 280px !important;
    }
}

/* ========================================
   PLACEHOLDER PERSONALIZADO
======================================== */
.game-card-image.placeholder-active {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    background-size: cover !important;
}

.game-card-image.placeholder-active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: auto;
    background: url('https://i.ibb.co/qMQcjKgR/Logo-Brillante.png') center center / contain no-repeat;
    opacity: 0.15;
    pointer-events: none;
    aspect-ratio: 1/1;
}

.game-card-image.placeholder-active::after {
    content: 'No Preview Available';
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    color: #00ffcc;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    opacity: 0.5;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
}





/* Access Notice en Modal */
.modal-access-notice {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-left: 3px solid #8b5cf6;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.modal-access-notice i {
    color: #8b5cf6;
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.modal-access-notice p {
    color: #cbd5e1;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.modal-access-notice strong {
    color: #fff;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-access-notice {
        padding: 0.875rem 1rem;
        font-size: 0.8125rem;
    }
    
    .modal-access-notice i {
        font-size: 1rem;
    }
}