main {
    display: flex;
    align-items: start;
    flex-wrap: wrap;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.player-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.player-header h3 {
    font-size: 30px;
    font-family: Arial, Helvetica, sans-serif;

    span {
        color: #236DAD;
    }
}

.player-header button {
    display: flex;
    align-items: center;
    color: #535252;
    background-color: #fcfcfc;
    border: 1px solid #53525274;
     border-radius: 8px;
}


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

.container-skin{
    display: flex;
    gap: 18px;
    width: 100%;
    height: auto;
    min-height: 480px; 
    align-items: stretch;
    justify-content: center;
}

.card-skin-viewer-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: end;
    align-items: end;
    position: absolute;
    top: 18px;
    right: 10px;
    pointer-events: none;

}

.card-skin-viewer {
    position: relative;
    display: flex;
    cursor: move;
    width: 80%;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    height: 400px;
    min-height: 220px;     /* mínimo en móviles */
    border: #53525274 1px solid;
    border-radius: 10px;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAQMAAACQp+OdAAAABlBMVEX4+Pj///9njiF9AAAAFklEQVQoz2P4DwQMIDDKwMoYDQi8DADzAv8BKis8ZwAAAABJRU5ErkJggg==);
}

.card-skin-viewer #skin-canvas,
.card-skin-viewer #cape-canvas {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: contain; /* mantiene proporciones internas */
}

.loading{
    position: absolute;
}

.card-skin-viewer-controls button {
    display: flex;
    align-items: center;
    background-color: #808080;
    padding: 10px;
    pointer-events: auto;
     border-radius: 8px;
}

#like-btn {
    background-color: #cf6464;
    border: 1px solid #ff4141;
}

#download-btn {
    background-color: #117617;
}

.container-right{
    width: 50%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.card-info{
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    border: #53525274 1px solid;
    border-radius: 10px;
}

.card-info-title {
    display: flex;
    align-items: center;
    padding: 8px;
    width: 100%;
    background-color: #F8F8F8;
    color: #236DAD;
    border-bottom: 1px solid rgb(188, 188, 188);
    border-radius: 10px 10px 0px 0px;
}

.card-info-body {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px;
    width: 100%;
    height: auto;
    overflow-y: auto;
    background-color: #fff;
    border-radius: 0px 0px 10px 10px;
}

.card-profile{
    border: #53525274 1px solid;
    border-radius: 10px;
    height: auto;
}

.card-profile-title {
    display: flex;
    align-items: center;
    padding: 8px;
    width: 100%;
    background-color: #F8F8F8;
    color: #236DAD;
    border-bottom: 1px solid rgb(188, 188, 188);
    border-radius: 10px 10px 0px 0px;
}

.card-profile-body{
   display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 8px;
    width: 100%;
    height: 255px;
    overflow-y: auto;
    background-color: #fff;
    border-radius: 0px 0px 10px 10px;
}

@media (max-width: 1100px) {
    .container-skin {
        gap: 12px;
        width: calc(100% - 32px);
        min-height: 420px;
    }

    .card-skin-viewer {
        max-width: 600px;
    }
}

@media (max-width: 800px) {
    .container-skin {
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 20px;
    }

    .card-skin-viewer {
        width: 100%;
        max-width: none;   /* ocupa todo el ancho */
    }

    .container-right {
        width: 100%;
    }

    .player-header h3 {
        font-size: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container-skin {
        padding: 6px;
        width: 100%;
    }

    .card-skin-viewer {
        aspect-ratio: 1 / 1; /* cuadrado en móviles */
        min-height: 200px;
    }

    .card-,
    .card-right- {
        font-size: 12px;
    }
}
