/* ===== TÍTULO ===== */
h1 {
    font-size: 2rem;
    text-align: center;
    background: linear-gradient(90deg, #1e5b3a, #f28c28);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: .1vw black;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* ===== CONTAINER ===== */
.main {
    position: absolute;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    left: 50%;
    transform: translateX(-50%);
}

/* ===== CAROUSEL ===== */
.cover-flow {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#cylinder {
    position: relative;
    width: 17vw;
    height: auto;
    aspect-ratio: 1;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: grab;
    touch-action: pan-y;
    will-change: transform;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 1vw;
    top: 50%;
    transition:
        box-shadow 0.3s ease,
        filter 0.3s ease;
    backface-visibility: hidden;
    content-visibility: hidden;
    contain-intrinsic-size: 100%;
}

.card.is-front {
    filter: brightness(1.08);
}

.card:not(.is-front) {
    filter: brightness(0.55) saturate(0.7);
}

/* ===== PAINEL ===== */
#painel {
    position: fixed;
    display: flex;
    visibility: hidden;
    width: 100vw;
    height: 100vh;
    justify-content: center;
    align-items: center;
    transform: translateY(100%);
    background: linear-gradient(135deg, #0f1a14, #1e5b3a);
    transition: transform 0.6s ease, visibility 0.6s ease;
    z-index: 999;
    gap: 5%;
}

#painel.active {
    visibility: visible;
    transform: translateY(0);
}

#painel img {
    width: auto;
    height: auto;
    max-height: 50%;
    max-width: 30%;
    aspect-ratio: 1;
    border-radius: 10%;
}

#painel h2 {
    position: absolute;
    text-align: center;
    color: #f28c28;
    font-size: 1.5rem;
    font-weight: bold;
    top: 0;
    margin-top: 1%;
}

/* ===== BLOCO DIREITO ===== */
.emotion-selector {
    position: relative;
    width: 50%;
    height: auto;
    max-height: 60%;
    aspect-ratio: 9/16;
    display: flex;
    flex-direction: column;
    border: 0.2vw solid #f28c28;
    border-right: 0;
    border-radius: 1vw 0 0 1vw;
}

.buttons {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 10%;
    height: 100%;
    max-height: 100%;
    background: #000;
    border: 0.2vw solid #f28c28;
    border-left: 0;
    border-radius: 0 1vw 1vw 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    container-type: size;
}

.seta {
    width: 0;
    height: 0;
    cursor: pointer;
    margin-top: 2cqh;
    margin-bottom: 2cqh;
    background: transparent;
    border-right: 40cqw solid transparent;
    border-left: 40cqw solid transparent;
    border-bottom: 10cqh solid white;
    padding: 0;
}

#submit__btn {
    position: relative;
    height: fit-content;
    width: 100%;
    border: unset;
    text-align: center;
    border-bottom-left-radius: 1vw;
    background-color: #f28c28;
    pointer-events: auto;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    color: #000;
}

#submit__btn:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===== TAMBOR DE EMOÇÕES ===== */
.drum-wrapper {
    position: relative;
    flex: 1;
    perspective-origin: 50% 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* fade mask top/bottom */
.drum-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(15, 26, 20, 0.95) 0%,
            transparent 30%,
            transparent 70%,
            rgba(15, 26, 20, 0.95) 100%);
    z-index: 20;
    pointer-events: none;
}

/* anel de destaque */
.drum-wrapper::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 13%;
    border-top: 1px solid rgba(242, 140, 40, 0.55);
    border-bottom: 1px solid rgba(242, 140, 40, 0.55);
    z-index: 25;
    pointer-events: none;
}

.drum-cylinder {
    position: absolute;
    width: 100%;
    height: 15%;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.drum-item {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-wrap: break-word;
    overflow: hidden;
    font-size: 50%;
    color: white;
    font-weight: bold;
    backface-visibility: hidden;
    transition: color 0.3s ease, font-size 0.3s ease;
}

.drum-item.is-front {
    color: #f28c28;
    font-size: 70%;
}

.voltar {
    position: absolute;
    top: 6vh;
    left: 3%;
    background: #f28c28;
    color: black;
    padding: 1;
    border-radius: 8%;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
}

.overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.3);
    /* opcional, escurece um pouco */
    z-index: 1000;
}

.error-display {
    position: fixed;
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 500px;
    min-height: 160px;
    border-radius: 20px;
    inset: 50%;
    transform: translate(-50%, -50%) scale(0.8);

    background: rgba(199, 125, 51, 0.15);
    backdrop-filter: blur(12px);

    border: 2px solid rgba(242, 140, 40, 0.6);

    justify-content: flex-start;
    align-items: center;

    padding: 40px 20px 20px;
    z-index: 1001;

    opacity: 0;
    animation: aparecerErro 0.4s ease forwards, glowErro 2s infinite;
}

@keyframes aparecerErro {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes glowErro {
    0% {
        box-shadow: 0 0 10px rgba(242, 140, 40, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(242, 140, 40, 0.6);
    }

    100% {
        box-shadow: 0 0 10px rgba(242, 140, 40, 0.3);
    }
}

.error-display h1 {
    font-size: 1.8rem;
    color: #f28c28;
    margin-top: 0;
    margin-bottom: 6px;
    text-align: center;
}

.error-display p {
    font-size: 1.2rem;
    color: #ff4d4d;
    text-align: center;
    margin: 0;
    margin-top: 20px;
}

.btn-fechar {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #f28c28;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-fechar:hover {
    color: #ff2222;
    background: rgba(255, 0, 0, 0.1);
    transform: rotate(90deg) scale(1.1);
}

.btn-fechar:active {
    transform: scale(0.9);
}