:root {
    --primary: #e50914;
    --dark: #141414;
    --light: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Helvetica Neue', Arial, sans-serif; }

body { background-color: var(--dark); color: var(--light); overflow-x: hidden; }

/* Utilitários */
.hidden { display: none !important; }

/* TELA DE PERFIL */
/* VIDEO INTRO */
.video-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.video-intro video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BOTÃO DE SOM (overlay) */
.unmute-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 2100;
    font-weight: bold;
}
@media (max-width: 600px) {
    .unmute-btn { bottom: 20px; right: 20px; padding: 8px 12px; }
}

/* OVERLAY DE PERMISSÃO DE ÁUDIO */
.audio-permission {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2200;
    pointer-events: auto;
}
.audio-permission-content {
    background: rgba(0,0,0,0.6);
    padding: 24px 30px;
    border-radius: 10px;
    text-align: center;
}
.audio-permission-content p { margin-bottom: 12px; }
.allow-audio-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* TELA DE PERFIL */
.profile-gate {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    text-align: center;
}
.profile { cursor: pointer; transition: 0.3s; }
.profile:hover .avatar { border: 3px solid white; }
.avatar {
    width: 150px; height: 150px;
    background-size: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* NAVBAR */
nav {
    position: fixed; top: 0; width: 100%;
    padding: 20px 4%;
    display: flex; justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    z-index: 100;
}
.logo { font-size: 25px; font-weight: bold; color: var(--primary); }

/* BILLBOARD (CAPA) */
.billboard {
    height: 80vh;
    background: linear-gradient(to top, var(--dark), transparent),
                url('../img/foto\ capa.jpg') no-repeat center top/cover; /* Alterado de 'center center' para 'center top' */
    display: flex;
    align-items: center;
    padding-left: 4%;
}
.title { font-size: 4rem; margin-bottom: 10px; text-shadow: 2px 2px 4px black; }
.description { max-width: 500px; font-size: 1.2rem; margin-bottom: 20px; text-shadow: 1px 1px 2px black; }

.btn {
    padding: 10px 25px; border-radius: 4px; border: none;
    font-size: 1.2rem; cursor: pointer; font-weight: bold; margin-right: 10px;
}
.btn-play { background: white; color: black; }
.btn-play:hover { background: rgba(255,255,255,0.7); }
.btn-info { background: rgba(109, 109, 110, 0.7); color: white; }
.btn-info:hover { background: rgba(109, 109, 110, 0.4); }

/* CARROSSEL */
.row { padding: 20px 4%; }
.row-posters { display: flex; gap: 10px; overflow-x: auto; padding: 20px 0; }

/* Scrollbar discreta no desktop: fina e esmaecida; aparece no hover */
@media (min-width: 769px) {
    .row-posters {
        scrollbar-width: thin; /* Firefox */
        scrollbar-color: rgba(255,255,255,0.08) transparent;
    }
    .row-posters::-webkit-scrollbar { height: 8px; }
    .row-posters::-webkit-scrollbar-track { background: transparent; }
    .row-posters::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.06);
        border-radius: 6px;
        transition: background-color 120ms, opacity 120ms;
        opacity: 0;
    }
    .row-posters:hover::-webkit-scrollbar-thumb { opacity: 1; background: rgba(255,255,255,0.10); }
    .row-posters:hover { scrollbar-color: rgba(255,255,255,0.10) transparent; }
}
.poster {
    min-width: 250px; height: 150px;
    cursor: pointer; transition: transform 0.3s;
    position: relative; overflow: hidden; border-radius: 4px;
}
.poster:hover { transform: scale(1.1); z-index: 10; }
.poster-locked { cursor: not-allowed; opacity: 0.75; }
.poster-locked::after {
    content: "";
}
.poster-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: bold; }

/* Make poster info labels match poster text size for consistency */

.poster-info { font-size: 1.1rem; text-align: center; }

/* Map posters: centralizar e limitar largura das frases */
.poster-map .poster-img .map-line,
.poster-map .poster-img .map-sub {
    font-size: 1.4rem;
    text-align: center;
    width: 100%;
}
.poster-map .poster-img { padding: 12px; }
.poster-map .poster-info { font-size: 1.25rem; text-align: center; font-weight: 700; }
.poster-map .poster-img .map-sub { font-size: 1rem; margin-top: 6px; }
.poster-map .poster-img div { white-space: normal; max-width: 180px; }

/* Estilos para o poster de confirmação (RSVP) */
.poster-confirmacao .poster-img .line-top,
.poster-confirmacao .poster-img .line-bottom {
    font-size: 1.2rem;
    text-align: center;
    width: 100%;
}
.poster-confirmacao .poster-img { padding: 10px; }
.poster-confirmacao .poster-info {
    font-size: 1.25rem;
    text-align: center;
    font-weight: 700;
}
.poster-info-confirm { white-space: normal; max-width: 200px; margin: 0 auto; }

/* MODAL */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    background: #181818; padding: 30px; border-radius: 8px;
    width: 90%; max-width: 500px; position: relative;
}
/* Melhorias responsivas para o modal de pagamento */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
}

.modal-pagamento { width: 100%; }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Certifica que campos do cartão não ultrapassem a largura */
#card-fields input, #card-fields select { width: 100%; box-sizing: border-box; }

.payment-result img { max-width: 100%; height: auto; display: block; margin: 10px auto; }

@media (max-width: 600px) {
    .modal-content { max-width: 96%; padding: 16px; }
    .form-row { flex-direction: column; }
    .presentes-container { padding: 20px 12px; }
    .presente-img { height: 150px; }
}

@media (max-width: 420px) {
    .modal-content { padding: 12px; }
    .btn-confirmar { padding: 12px; font-size: 1rem; }
}
.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 4px;
    background: rgba(0,0,0,0.35);
    border-radius: 6px;
    z-index: 1011;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.close-btn:hover { background: rgba(0,0,0,0.5); }

@media (max-width: 420px) {
    .close-btn { width: 44px; height: 44px; font-size: 26px; right: 12px; top: 8px; }
}

/* ESTILO DOS FORMULÁRIOS DENTRO DO MODAL */
input, select { width: 100%; padding: 10px; margin: 10px 0; background: #333; border: none; color: white; border-radius: 4px; }
.btn-submit { width: 100%; background: var(--primary); color: white; padding: 10px; border: none; cursor: pointer; font-weight: bold; margin-top: 10px; }

/* PÁGINA DE PRESENTES */
.presentes-page { background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); min-height: 100vh; padding-top: 80px; }

.presentes-container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.presentes-container h1 { font-size: 3rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.presentes-intro { font-size: 1.2rem; color: rgba(255,255,255,0.8); margin-bottom: 40px; }

/* GRID DE PRESENTES */
.presentes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.presente-card {
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.presente-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(229, 9, 20, 0.3);
}

.presente-img {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.presente-card h3 {
    padding: 20px 15px 10px;
    font-size: 1.3rem;
    color: white;
}

.presente-card p {
    padding: 0 15px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

/* MODAL DE PAGAMENTO */
.modal-pagamento {
    animation: slideIn 0.3s ease;
}

.modal-pagamento h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.modal-pagamento p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 25px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: white;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    background: #333;
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

/* OPÇÕES DE PAGAMENTO */
.opcoes-pagamento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.opcao-pag {
    position: relative;
    cursor: pointer;
}

.opcao-pag input[type="radio"] {
    display: none;
}

.opcao-pag span {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 15px 10px;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(229, 9, 20, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.opcao-pag input[type="radio"]:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.opcao-pag span i {
    margin-bottom: 5px;
    font-size: 1.5rem;
}

/* BOTÃO DE CONFIRMAR */
.btn-confirmar {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 15px;
}

.btn-confirmar:hover {
    background: #cc0711;
}

/* ANIMAÇÃO */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .presentes-container h1 { font-size: 2rem; }
    .opcoes-pagamento { grid-template-columns: 1fr; }
}