:root {
    --box-size: 100px;
}

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(var(--vh, 1vh) * 100);
    background: var(--bg-primary);
    transition: background 0.3s ease;
}

#loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: var(--loading-text, #333333);
    gap: 24px;
}

/* Loading title */
#loading-container::before {
    content: 'Gestiones Pack';
    font-size: 24px;
    font-weight: 600;
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    color: var(--loading-text, #333333);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#box {
    position: relative;
    width: var(--box-size);
    height: var(--box-size);
    transform-style: preserve-3d;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotateX(-20deg) rotateY(360deg);
    }
    100% {
        transform: rotateX(-20deg) rotateY(0deg);
    }
}

#box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--box-size);
    height: var(--box-size);
    background: rgba(246, 125, 8, 0.1);
    transform: rotateX(90deg) translateZ(calc(var(--box-size)*0.7 * -1));
    filter: blur(20px);
    border-radius: 12px;
}

/* Light theme shadow */
body.light #box::before {
    background: rgba(246, 125, 8, 0.1);
}

/* Dark theme shadow */
body.dark #box::before {
    background: rgba(246, 125, 8, 0.2);
}

#box div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

#box div span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

#box div span:nth-child(1) {
    background: #d8aa77;
    transform: rotateY(0deg) translate3d(0, 0, calc(var(--box-size) / 2));
}

#box div span:nth-child(2) {
    background: #ca9864;
    transform: rotateY(90deg) translate3d(0, 0, calc(var(--box-size) / 2));
}

#box div span:nth-child(3) {
    background: #d8aa77;
    transform: rotateY(180deg) translate3d(0, 0, calc(var(--box-size) / 2));
}

#box div span:nth-child(1)::before,
#box div span:nth-child(3)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('/gestiones-pack.png');
    background-size: 60%;
    background-repeat: no-repeat;
    background-position-x: center;
    background-position-y: center;
}

#box div span:nth-child(4) {
    background: #ca9864;
    transform: rotateY(270deg) translate3d(0, 0, calc(var(--box-size) / 2));
}

#box .top {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--box-size);
    height: var(--box-size);
    background: #e8bb84;
    transform: rotateX(90deg) translate3d(0, 0, calc(var(--box-size) / 2));
    display: flex;
    align-items: center;
}

#box .top::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 20%;
    background: #bb976a;
}

.tape {
    position: absolute;
    top: 4%;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
    width: 25%;
    height: 20%;
    background: #bb976a;
}

.hidden {
    display: none !important;
}

@media (max-width: 500px) {
    :root {
        --box-size: 75px;
    }

}