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

/* GENERALES --------------------------*/

@font-face {
    font-family: BD_Edding;
    src: url(/assets/web-font/BD_Edding850.otf);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    background-color: #bbb;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('/assets/bg/bg-site.jpg') center/cover no-repeat;
    opacity: 0.3;
    z-index: -1;
}

/* HEADER — recto en mobile, rotado en desktop */
header {
    position: relative;
    width: auto;
    margin-top: 16px;
    z-index: 10;
    rotate: 0deg;
    text-align: center;
}

h1 {
    font-family: BD_Edding;
    font-size: clamp(2.5rem, 10vw, 11em);
    letter-spacing: 1px;
    font-weight: lighter;
    line-height: 0.75;
    text-shadow: -4px 4px rgb(255, 255, 255);
    text-align: center;
}

@media (min-width: 1524px) {
    header {
        position: absolute;
        width: 100px;
        top: 11%;
        left: 5%;
        rotate: -10deg;
        text-align: left;
    }
}

/* STRUCTURE */
.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px;
    min-height: 100vh;
}

.app section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app aside {
    display: flex;
    flex-direction: column;
    max-height: 65dvh;
}

.app aside header {
    padding: 1em;
}

.app aside nav {
    padding-left: 4px;
}

.app aside .export,
.app aside .transformers label {
    padding-left: 4px;
}

@media (min-width: 1524px) {
    .app {
        display: block;
        position: relative;
        overflow: hidden;
    }
}

/* ASIDE — recto en mobile, rotado en desktop */
aside {
    width: 95vw;
    max-width: 500px;
    position: relative;
    margin: 0 auto 20px;
    right: auto;
    top: auto;
    rotate: 0deg; /* SIN rotate en mobile */
}

@media (min-width: 1524px) {
    aside {
        position: absolute;
        right: 8.5%;
        top: 15%;
        rotate: 5deg; /* rotate en desktop */
    }
    .panes {
        height: 25vh;
    }
}

/* PANES */
.panes {
    height: 100%;
    overflow: scroll;
    background-color: black;
    width: 100%;
    padding: 0 0.5em;
    border-top: 0.5em solid black;
    border-bottom: 0.5em solid black;
}

.panes .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5em;
}

@media (min-width: 1524px) {
    .panes {
        width: fit-content;
    }
}

/* Hide scrollbar */
.panes::-webkit-scrollbar { display: none; }
.panes {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* TABS */
.tabs {
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 4px;
}

@media (min-width: 1524px) {
    .tabs {
        max-width: 300px;
        display: block;
        padding: 0;
    }
}

/* AVATAR SPACE */
.stage-wrap {
    aspect-ratio: 1/1;
    width: 80vh;
    box-shadow: black -8px 8px;
    position: absolute;
    rotate: -5deg;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: auto;
}

@media (max-width: 1524px) {
    .stage-wrap {
        position: relative;
        width: min(85vw, 50vh, 480px);
        left: auto;
        top: auto;
        transform: none;
        margin: 10px auto;
        rotate: 0deg;
    }
}

/* TABS DESIGN */
.tab {
    padding: 6px 8px;
    border: 1px solid transparent;
    background: #fff;
    cursor: pointer;
    font-size: clamp(11px, 2.5vw, 13px);
    color: black;
    transition: border 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.tab:hover {
    border: 1px solid #000000;
    background: #000000;
    color: white;
    animation: bounce 0.4s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@keyframes bounce {
    0%   { transform: translateY(0); }
    40%  { transform: translateY(-5px); }
    60%  { transform: translateY(2px); }
    80%  { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

.tab[aria-selected="true"] {
    border: 1px solid #000000;
    background: #000000;
    color: white;
}

/* PANES FONCTION */
.pane { display: none }
.pane[aria-hidden="false"] { display: block }

/* CARDS DESIGN */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid #ddd;
    padding: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

.card:hover {
    box-shadow: -4px 4px 0 rgb(250, 234, 81);
    transform: scale(1.05);
}

.card.active {
    color: white;
    background-color: rgb(0, 0, 0);
    box-shadow: rgb(250, 234, 81) -3px 3px;
}

.card.disabled { opacity: .45 }
.card svg { background: #fff }

.card img.thumb {
    width: 100%;
    height: auto;
    background: #fff;
    display: block
}

.card label { font-size: 12px }

.none {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    border: 1px dashed #bbb;
    color: #999;
    font-size: 12px
}

button {
    padding: 6px 8px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: -4px 4px black;
}

.row button:hover {
    background-color: black;
    color: white;
}

.card .remove {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    line-height: 20px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease-in-out;
}

.card:hover .remove,
.card.active .remove { opacity: 1; }
.card .remove:hover { border-color: #333 }
.card.disabled .remove { display: none }

/* FOOTER */
footer {
    max-width: 306px;
    right: 8%;
    top: 85%;
    position: absolute;
}

@media (max-width: 1524px) {
    footer {
        position: relative;
        right: auto;
        top: auto;
        text-align: start;
        padding: 10px;
        margin: 10px auto;
    }
}

/* COLOR PICKER */
input[type="color"] {
    width: 130px;
    height: 130px;
    border-radius: 300px;
    box-shadow: -8px 8px black;
    outline: 2px black solid;
    position: absolute;
    bottom: 25%;
    left: 25.5%;
}

@media (max-width: 1524px) {
    input[type="color"] {
        width: 50px;
        height: 50px;
        position: static;
        display: inline-block;
        vertical-align: middle;
    }
}

input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
input[type="color"]::-moz-color-swatch { border: none; border-radius: 50%; }