/*###################*/


:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --card-shadow: 0 4px 8px rgba(0,0,0,0.1);
    --hover-shadow: 0 8px 16px rgba(0,0,0,0.2);
}


.header-section {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
}

.pack-container {
    margin-bottom: 40px;
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
}

.pack-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.pack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-color);
}

.pack-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.card-inner code{
    opacity: 0;
    display: none;
}

.pack-progress {
    background-color: var(--light-color);
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: 600;
    color: var(--dark-color);
}

.cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    justify-content: center;
}

.card-item {
    width: 160px;
    height: 264px;
    border-radius: 10px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-item:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.card-front {
    background: linear-gradient(135deg, var(--primary-color), #5dade2);
    color: white;
    font-weight: bold;
}

.card-back {
    background: white;
    color: var(--dark-color);
    transform: rotateY(180deg);
    padding: 10px;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.card-title {
    font-size: 0.8rem;
    text-align: center;
}

.card-obtained {
    border: 3px solid var(--secondary-color);
}

.card-missing {
    border: 3px dashed #bdc3c7;
    opacity: 0.7;
}

.prize-card {
    width: 260px;
    background: linear-gradient(135deg, var(--secondary-color), #27ae60);
    color: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--card-shadow);
    margin-right: 20px;
    position: relative;
    /*overflow: hidden;*/
}

.prize-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(45deg);
}

.prize-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    z-index: 1;
}

.prize-title {
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    z-index: 1;
}

.prize-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    z-index: 2;
}

.pack-content {
    display: flex;
    align-items: center;
}

.completed-pack {
    border-left: 5px solid var(--secondary-color);
}

.incomplete-pack {
    border-left: 5px solid #bdc3c7;
}

@media (max-width: 768px) {
    .pack-content {
        flex-direction: column;
    }

    .prize-card {
        margin-right: 0;
        margin-bottom: 20px;
        width: 40%;
        height: 40%;
    }

    .cards-row {
        justify-content: center;
    }
}

/*****************************************************************************************************/
/* ######################################DISEÑO DE CARTAS MODERNO######################################*/
/* Estilo base de la carta */
.card {
    width: 120px;
    height: 180px;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Indicadores de cantidad */
.card-count {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Indicador de intercambio */
.card-trade {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: #4CAF50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Carta especial (premio) */
.card-special {
    border: 3px solid gold;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

/* Carta usada */
.card-used {
    filter: grayscale(80%);
    opacity: 0.7;
}
/* ######################################FIN DISEÑO DE CARTAS MODERNO######################################*/


/* #####################################GRID RESPONSIVE######################################*/
                        /* Visualización de Colección (Grid Responsivo)*/

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 15px;
}

@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}
/* #####################################FIN DE GRID RESPONSIVE######################################*/


/* #####################################MODAL INTERACCIONES######################################*/
                    /*Modal para Vista Ampliada e Interacciones*/
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

.modal-card-view img {
    max-height: 60vh;
    max-width: 100%;
    border-radius: 12px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: #4285F4;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* #####################################FIN MODAL INTERACCIONES######################################*/

/* #####################################PROGRESO DE PACKS######################################*/
                        /*Para mostrar el avance en los packs:*/
.pack-progress {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.progress-container {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
}

.pack-cards {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.mini-card {
    width: 30px;
    height: 45px;
    border-radius: 4px;
}

.mini-card.obtained {
    background: #4CAF50;
    border: 1px solid #388E3C;
}

.mini-card.missing {
    background: #f0f0f0;
    border: 1px dashed #ccc;
}
/* #####################################FIN DE PROGRESO DE PACKS######################################*/


/*###############################################################################################################*/

/* USADO PARA EL ESTILO PARA LA CARTA AMPLIADA */
.modal-carta,.modal-carta-seis {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 335px;
    height: auto;
    background-color: white;
    border: 2px solid black;
    z-index: 10000;
    display: none;
    border-radius: 10px;
    text-align: center;
}
.modal-carta-seis {
    margin-bottom: 54px;
    height: 542px;
}

.modal-carta img, .modal-carta-seis img {
    width: 100%;
    height: auto;
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

/* Estilo para las cartas pequeñas */
.mini-cartas-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.mini-carta {
    flex: 1 0 22%; /* Ajusta el tamaño flexible para adaptarse a diferentes pantallas */
    max-width: 35%;
    margin: 5px;
    cursor: pointer;
}

.mini-carta img {
    width: 100%;
    height: auto;
    border: 1px solid black;
    border-radius: 5px;
    transition: transform 0.2s;
}

.mini-carta img:hover {
    transform: scale(1.1);
}

.seleccionar-carta {
    border-radius: 25px;
    background-color: white;
}


.form-select.form-select-sm {
    padding-top: .25rem;
    padding-bottom: .25rem;
    padding-left: .5rem;
    font-size: .875rem;
    border-radius: .25rem;
}

.card-explication{
    width: 163px;
    white-space: pre-line;
    text-align: center;
    font-size: 12px;
    padding: 4px;
}

.border-blue{
    border: 1px solid blue;
}
/*###############################################################################################################*/

/*##############################################CSS PARA EL LISTADO DE USUARIOS #################################################*/

.search-container {
    position: relative;
    padding: 12px;
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item strong {
    display: block;
    margin-bottom: 2px;
}

.suggestion-item small {
    color: #6c757d;
    font-size: 0.8em;
}

.loading, .no-results, .error {
    padding: 10px 15px;
    color: #6c757d;
    font-style: italic;
}



input#userSearch{
    border-radius: 10px;
}

.search-container input[type="submit"] {
    margin: 9px;
    border-radius: 12px;
    background-color: blue;
}
.search-container #cerrarGift {
    margin: 9px;
    border-radius: 12px;
    background-color: #ff0000;
}
/*##############################################FIN DE CSS PARA EL LISTADO DE USUARIOS #################################################*/


/*###############################################################################################################*/


.card-item .cantidad
{
    right: 143px;
    background-color: #1aab07;
}

.card-item .envio  {
    right: -14px;
    background-color: #ff0000;
    border-color: gold;
}
.card-item .cantidad, .card-item .envio  {
    border-radius: 19%;
    border-style: ridge;
    border-width: 2px;
    position: absolute;
    top: 250px;
    padding: 2px 5px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}








/*##############################################EFECTO CSS PARA LA LLUVIA Y CARTAS #################################################*/
div#inner-body.lluvia {
    background: #000;
    overflow: hidden;
    margin: 0;
    height: 100vh;
}

.rain {
    position: absolute;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, #4a8fe7);
    animation: rain 1s linear infinite;
}

@keyframes rain {
    to { transform: translateY(100vh); }
}

/* Efecto adicional de iluminación */
div#inner-body.lluvia::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #000 70%);
    pointer-events: none;
}

.divBlack{
    background-image: url(/wp-content/uploads/cards/blackimage.png);
    min-height: 100%;
    min-width: 100%;
}

/* ###################################################################################################### */
.text-red{
    color: red;
}
.text-blue{
    color: blue;
}
.text-green{
    color: green;
}
.text-yellow{
    color: yellow;
}
/* ###################################################################################################### */



/*##############################################CSS PARA LA SECCIÓN DEL SOBRE#################################################*/

#contenedor-cartas, #contenedor-cartas-gift {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Todo el ancho de la pantalla */
    height: 100vh; /* Todo el alto de la pantalla */
    background-color: rgba(0, 0, 0, 0.8); /* Fondo oscuro semitransparente */
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px;
    z-index: 10000;
}

.mini-carta {
    flex: 0 1 calc(35% - 10px);
    margin: 5px;
}

.mini-carta img {
    width: 150px;
    height: auto;
    border-radius: 10px;
    border: 2px solid white;
}

#contenedor-cartas-gift .mini-carta img {
    width: 210px;
    height: auto;
    border-radius: 10px;
    border: 2px solid white;
}
#sobre-flotante, #gift-flotante {
    position: fixed;
    width: 300px;
    height: auto;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

#sobre-flotante:hover, #gift-flotante:hover {
    transform: scale(1.1);
}

/*##############################################FIN CSS PARA LA SECCIÓN DEL SOBRE#################################################*/

/*##############################################CSS PARA CARTAS FLOTANTES#################################################*/
/* USADO PARA MOSTRAR LAS CARTAS FLOTANTES EN LA WEB */
.carta-flotante {
    position: fixed;
    width: 100px;
    height: auto;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.2s, width 0.5s, height 0.5s, top 0.5s, left 0.5s;
}

.carta-flotante > div {
    background-color: black;
    border-radius: 10px;
    color: aliceblue;
}

.carta-flotante > div:first-child {
    text-align: center;
    top: -205px;
    position: relative;
}

.carta-flotante:hover {
    transform: scale(1.1);
}

.mover-agrandar-carta {
    width: 335px !important;
    height: 150px !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -40%) !important;
}


.card_flip {
    position: relative;
    perspective: 1000px;
    cursor: pointer;
}

.card-face {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(180deg);
}

.card_flip.flipped .card-front {
    transform: rotateY(180deg);
}

.card_flip.flipped .card-back {
    transform: rotateY(0deg);
}




/***
PARA EL MÓVIL
 */
/* Mantener tamaño similar pero en 3 columnas */
@media (max-width: 768px) {
    .cards-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        justify-content: center;
        align-items: start;
    }

    .card-item {
        width: 110px;
        height: 181px;
        margin: 0 auto;
        transform: scale(1) !important;
    }

    /* Ajustar posición de los badges */
    .card-item .cantidad {
        right: 94px;
        top: 170px;
        font-size: 11px;
        padding: 2px 5px;
    }

    .card-item .envio {
        right: -11px;
        top: 170px;
        font-size: 11px;
        padding: 2px 5px;
    }

    /* Ajustar texto */
    .card-title {
        font-size: 0.75rem;
        padding: 0 4px;
        line-height: 1.2;
    }

    .card-icon {
        /*width: 75px;
        height: 75px;*/
        margin-bottom: 8px;
    }

    .card-icon img {
        max-width: 100%;
        max-height: 100%;
    }
}