/* ============================================
   PLATFORM PAGE - CSS
   Todos los juegos de una plataforma
============================================= */

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --neon-green: #00ffcc;
    --text-white: #f8fafc;
    --text-gray: #cbd5e1;
    --border-color: rgba(0, 255, 204, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    padding-top: 125px;
    min-height: 100vh;
}

body.promo-hidden {
    padding-top: 80px;
}

/* ==================== PLATFORM HEADER ==================== */
.platform-header {
    padding: 3rem 2rem 2rem;
    background: linear-gradient(180deg, rgba(0, 255, 204, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.platform-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.platform-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 3px solid var(--neon-green);
    box-shadow: 0 10px 40px rgba(0, 255, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.platform-icon-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 24px;
}

.platform-icon-large::after {
    content: '';
    position: absolute;
    font-size: inherit;
    z-index: 1;
}

.platform-info {
    flex: 1;
}

.platform-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.platform-stats {
    font-size: 1.125rem;
    color: var(--neon-green);
}

/* ==================== FILTERS ==================== */
.platform-filters {
    padding: 1.5rem 2rem;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 125px;
    z-index: 100;
    transition: top 0.3s ease;
}

body.promo-hidden .platform-filters {
    top: 80px;
}

.filters-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.filter-search {
    flex: 2;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label i {
    color: var(--neon-green);
}

.filter-select,
.filter-input {
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover,
.filter-input:hover {
    border-color: var(--neon-green);
    background: rgba(15, 23, 42, 0.95);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
}

.btn-back {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid var(--neon-green);
    border-radius: 8px;
    color: var(--neon-green);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: var(--neon-green);
    color: var(--bg-dark);
    transform: translateX(-5px);
}

/* ==================== GAMES GRID ==================== */
.platform-grid-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Game Item */
.game-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.game-item:hover {
    border-color: var(--neon-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.2);
}

/* Platform Icon Small */
.game-platform-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 255, 204, 0.2);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.game-platform-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 12px;
}

.platform-emoji {
    font-size: 2rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Game Info */
.game-info {
    flex: 1;
    min-width: 0;
}

.game-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.game-meta i {
    color: var(--neon-green);
}

/* ==================== LOADING & STATES ==================== */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    display: none;
}

.loading-indicator.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(0, 255, 204, 0.2);
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results i {
    font-size: 4rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.no-results p {
    color: var(--text-gray);
}

.end-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* ==================== MODAL (igual que search-results) ==================== */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.game-modal.active {
    display: block;
}

.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: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid var(--neon-green);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 255, 204, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #ff0000;
    color: #ff0000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #ff0000;
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-image {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-platform-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 255, 204, 0.9);
    color: var(--bg-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.875rem;
}

.modal-game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--neon-green);
    margin-bottom: 1rem;
}

.modal-game-description {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.modal-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-white);
}

.modal-detail i {
    color: var(--neon-green);
    font-size: 1.25rem;
}

.modal-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-screenshots img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-screenshots img:hover {
    transform: scale(1.05);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-download-btn,
.modal-view-btn {
    flex: 1;
    min-width: 200px;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-download-btn {
    background: var(--neon-green);
    color: var(--bg-dark);
    border: 2px solid var(--neon-green);
}

.modal-download-btn:hover {
    background: transparent;
    color: var(--neon-green);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
}

.modal-view-btn {
    background: transparent;
    color: var(--neon-green);
    border: 2px solid var(--neon-green);
}

.modal-view-btn:hover {
    background: var(--neon-green);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    body {
        padding-top: 110px;
    }
    
    body.promo-hidden {
        padding-top: 70px;
    }
    
    .platform-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .platform-icon-large {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }
    
    .platform-title {
        font-size: 1.75rem;
    }
    
    .platform-filters {
        top: 110px;
    }
    
    body.promo-hidden .platform-filters {
        top: 70px;
    }
    
    .filters-container {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .platform-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-platform-icon {
        width: 50px;
        height: 50px;
    }
    
    .platform-emoji {
        font-size: 1.5rem;
    }
}