*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{

    min-height: 100vh;
    background: url('../imagens/madeira.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    font-family: 'Special Elite', cursive;
    overflow-x: hidden;
}

.hidden{
    display: none;
}

/* TELA SENHA */

.lock-screen{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lock-box{
    background:
    rgba(255,248,220,0.92);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow:0 10px 40px rgba(0,0,0,0.25);
    max-width: 400px;
    width: 100%;
}

.lock-box h1{
    font-size: 4rem;
}

.lock-box p{
    margin-top: 10px;
    color: #5a4634;
    line-height: 1.6;
}


input{
    margin-top: 25px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid rgba(120,80,40,0.2);
    outline: none;
    text-align: center;
    font-size: 1rem;
}

button{
    margin-top: 20px;
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    background: #b86a3d;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    font-family: 'Special Elite', cursive;
}

button:hover{
    transform: translateY(-2px);
    background: #9f5830;
}

/* CENA LIVRO */

.book-scene{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
    padding: 20px;
}

/* LIVRO FECHADO */

.book-closed{
    width: min(95vw, 1200px);
    aspect-ratio: 16 / 9;
    cursor: pointer;
    transition: 0.5s;
}

.book-closed:hover{
    transform:
    rotateY(-10deg)
    scale(1.02);
}

.book-cover{
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7b3f00,#5a2d0c);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff5dc;
    position: relative;
}

.book-cover::before{
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 100%;
    background:
    rgba(0,0,0,0.25);
}

.book-cover h1{
    font-size: 4rem;
}

.book-cover h2{
    margin-top: 20px;
    font-size: clamp(2rem, 5vw, 3rem);
    font-family: 'Caveat', cursive;
}

.book-cover p{
    margin-top: 30px;
    opacity: 0.8;
}

.book-cover img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}



/* LIVRO ABERTO */

.book-open{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    animation: fadeBook 1s ease;
}

.book-page{
    display: none;
    width: min(95vw, 1100px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    animation: fadeBook 1s ease;
}

.book-page.active{
    display: block;
}

.book-page img{
    width: 100%;
    display: block;
}

.page h2{
    font-size: 3rem;
    font-family: 'Caveat', cursive;
    color: #7b3f00;
    margin-bottom: 30px;
}

.page p{
    color: #4a3728;
    line-height: 2;
    font-size: 1.1rem;
}

.controls{
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.controls button{
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    background: #7b3f00;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    font-family: 'Special Elite', cursive;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.controls button:hover{
    transform: translateY(-3px);
    background: #5a2d0c;
}

/* Página dos ingressos */

.tickets-page{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 40px;
}

/* Lado esquerdo */

.ticket-left{
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.ticket-title{
    font-size: 2.5rem;
    color: #5c3b1e;
    margin-bottom: 25px;
    font-family: "Georgia", serif;
}

.ticket-text{
    font-size: 1.15rem;
    line-height: 1.9;
    color: #4a3422;
    max-width: 420px;
}

.ticket-footer{
    margin-top: 30px;
    font-size: 1rem;
    color: #7a4b2c;
    font-style: italic;
    line-height: 1.7;
}

/* Lado direito */

.ticket-right{
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Área dos ingressos */

.tickets-area{
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ingressos */

.ticket{
    width: 320px;
    position: absolute;
    border-radius: 18px;
    background: white;
    padding: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Hover */

.ticket:hover{
    transform: scale(1.04) rotate(0deg);
    box-shadow: 0 20px 45px rgba(0,0,0,0.35);
}

/* Ingresso esquerdo */

.ticket-1{
    left: 30px;
    transform: rotate(-7deg);
    z-index: 1;
}

/* Ingresso direito */

.ticket-2{
    right: 30px;
    transform: rotate(6deg);
    z-index: 2;
}

/* Fita adesiva */

.ticket::before{
    content: "";
    position: absolute;
    width: 90px;
    height: 25px;
    background:rgba(255,255,255,0.4);
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-5deg);
    border-radius: 4px;
    backdrop-filter: blur(2px);
}

/* Anotação */

.ticket-note{
    position: absolute;
    bottom: 30px;
    right: 20px;
    font-family: cursive;
    font-size: 1.3rem;
    color: #7a4b2c;
    transform: rotate(-4deg);
    opacity: 0.9;
}

/* Fundo da página dos ingressos */

.tickets-page{
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    padding: 40px;
    background: url("../imagens/paper-texture.png");
    background-size: cover;
    background-position: center;
    box-shadow:inset 0 0 80px rgba(0,0,0,0.08);
}


.ticket-left, .ticket-right{
    position: relative;
    z-index: 2;
}

/* Estrelinhas decorativas */

.ticket-left::before{
    content: "✦";
    position: absolute;
    top: 40px;
    left: 40px;
    font-size: 1.5rem;
    color: rgba(122,75,44,0.35);
    transform: rotate(-12deg);
}

.ticket-left::after{
    content: "★";
    position: absolute;
    bottom: 60px;
    left: 120px;
    font-size: 1rem;
    color: rgba(122,75,44,0.25);
    transform: rotate(10deg);
}

/* Responsividade */

@media (max-width: 900px){

    .tickets-page{
        flex-direction: column;
        padding: 25px;
        gap: 20px;
    }

    .ticket-left{
        text-align: center;
        align-items: center;
    }

    .ticket-title{
        font-size: 2rem;
    }

    .ticket-text{
        font-size: 1rem;
    }

    .tickets-area{
        height: 420px;
    }

    .ticket{
        width: 230px;
    }

    .ticket-1{
        left: 0;
    }

    .ticket-2{
        right: 0;
    }

    .ticket-note{
        bottom: 0;
        right: 50%;
        transform: translateX(50%) rotate(-3deg);
        font-size: 1rem;
    }
}


/* POPUP DE ERRO */
.error-popup{

    position: fixed;

    inset: 0;

    background:
    rgba(0,0,0,0.55);

    display: none;

    justify-content: center;
    align-items: center;

    z-index: 999;
}

.error-box{

    background:
    rgba(255,248,220,0.98);

    padding: 40px;

    border-radius: 25px;

    text-align: center;

    max-width: 400px;
    width: 90%;

    box-shadow:
    0 20px 50px rgba(0,0,0,0.3);

    animation: popupFade 0.3s ease;
}

.error-box h2{

    font-size: 3rem;

    margin-bottom: 15px;
}

.error-box p{

    color: #5a4634;

    line-height: 1.6;

    margin-bottom: 25px;
}

@keyframes popupFade{

    from{

        opacity: 0;

        transform: scale(0.9);
    }

    to{

        opacity: 1;

        transform: scale(1);
    }
}



/* ANIMAÇÃO */

@keyframes fadeBook{

    from{
        opacity: 0;
        transform: scale(0.95);
    }

    to{
        opacity: 1;
        transform: scale(1);
    }
}

/* RESPONSIVO */

@media (max-width: 900px){

    .pages{
        grid-template-columns: 1fr;
    }

    .left-page{

        border-radius: 20px 20px 0 0;

        border-right: none;

        border-bottom:
        2px solid rgba(120,80,40,0.2);
    }

    .right-page{
        border-radius: 0 0 20px 20px;
    }

    .page{
        min-height: auto;
    }
}
