body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-image: url('../images/banner.jpg'); /* Ruta a la imagen de fondo */
    background-size: cover; /* Ajusta la imagen para cubrir todo el área */
    background-position: center; /* Centra la imagen de fondo */
    background-repeat: no-repeat; /* Evita que la imagen se repita */
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

main {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Define 4 columnas */
    gap: 20px; /* Espacio entre las cartas */
    justify-items: center; /* Centra las cartas en sus celdas */
}

.chromatic-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 30px; /* Aumenta el padding para hacer la carta más grande */
    text-align: center;
    width: 300px; /* Ajusta el ancho de la carta al doble */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chromatic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%; /* Asegúrate de que la imagen ocupe todo el ancho de la carta */
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px; /* Aumenta el margen inferior para más espacio */
}

.chromatic-card h3 {
    margin: 0 0 20px;
    font-size: 24px; /* Aumenta el tamaño del texto */
    color: #4CAF50;
}

.chromatic-card p {
    margin: 0 0 20px;
    font-size: 18px; /* Aumenta el tamaño del texto */
    color: #555;
}

.chromatic-card button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px; /* Aumenta el tamaño del botón */
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px; /* Aumenta el tamaño del texto del botón */
}

.chromatic-card button:hover {
    background-color: #45a049;
}

#coin-balance {
    font-size: 20px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.fas.fa-coins {
    color: #FFD700; /* Color dorado para el icono de moneda */
    margin-right: 5px;
}

/* Estilos para la navegación */
nav {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-button:hover {
    background-color: #45a049;
    transform: translateY(-3px);
}

.nav-button i {
    margin-right: 8px;
}

/* Estilos para el modal de inventario */
.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: #f4f4f9;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 900px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #4CAF50;
}

.modal h2 {
    color: #4CAF50;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 28px;
}

/* Estilos para la cuadrícula del inventario */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px;
}

.inventory-item {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.inventory-item:hover {
    transform: translateY(-5px);
}

.inventory-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.inventory-item h4 {
    margin: 10px 0;
    color: #4CAF50;
    font-size: 18px;
}

.inventory-item p {
    color: #555;
    margin: 5px 0;
    font-size: 16px;
}

.empty-inventory {
    text-align: center;
    color: #777;
    font-size: 18px;
    grid-column: 1 / -1;
    padding: 30px;
}

/* Estilos para las notificaciones */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 1001;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease;
}

.notification.error {
    background-color: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.notification.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* Responsive design */
@media (max-width: 1200px) {
    main {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    main {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chromatic-card {
        width: 250px;
    }
}

@media (max-width: 600px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .chromatic-card {
        width: 280px;
    }
    
    nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .nav-button {
        width: 80%;
    }
}

/* Estilos para cartas y botones de cartas ya adquiridas */
.chromatic-card.owned-card {
    position: relative;
}

.chromatic-card.owned-card::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4CAF50;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

button.owned {
    background-color: #888 !important;
    cursor: not-allowed;
}
