/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

header h1 {
    margin-bottom: 1rem;
}

main {
    display: flex;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.filters {
    width: 250px;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-right: 1rem;
    height: fit-content;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.filter-group select, 
.filter-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.games-container {
    flex: 1;
}

#games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-image {
    width: 100%;
    height: 200px; /* Altura fija para uniformidad */
    object-fit: contain; /* Muestra toda la imagen sin recortar */
    background-color: #f0f0f0; /* Fondo para imágenes no cuadradas */
    border-radius: 8px 8px 0 0; /* Bordes redondeados solo arriba */
}

.game-info {
    padding: 1rem;
}

.game-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.game-genre {
    display: inline-block;
    background-color: #e0e0e0;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.game-description {
    font-size: 0.9rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    position: relative;
    animation: modalopen 0.5s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

/* Estilos para el detalle del juego */
#game-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-detail-header {
    display: flex;
    gap: 2rem;
}

.game-detail-image {
    width: 250px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.game-detail-info {
    flex: 1;
}

.game-detail-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.game-detail-genres {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.game-detail-genre {
    background-color: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.game-detail-description {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.download-btn {
    display: inline-block;
    background-color: #27ae60;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.download-btn:hover {
    background-color: #219653;
}

/* Estilos para donaciones */
.donate-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #29abe0;
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 100;
    transition: all 0.3s;
}

.donate-floating-btn:hover {
    background-color: #1e8bc3;
    transform: scale(1.1);
}

.donate-options {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.donate-option {
    text-align: center;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    min-width: 250px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.donate-option h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.donate-option p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.paypal-donate-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    
    .filters {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .game-detail-header {
        flex-direction: column;
    }
    
    .game-detail-image {
        width: 100%;
        height: 200px;
    }
    
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .donate-floating-btn {
        width: 60px;
        height: 60px;
        font-size: 0.8rem;
    }
}