/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px;
    color: #333;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Tema Padrão */
body.tema-padrao {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

body.tema-padrao::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Background fixo das imagens do evento */
.evento-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Atrás do gradiente do tema (z-index: 0) */
    pointer-events: none;
}

.evento-background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Fixo ao rolar a página */
    opacity: 0;
    transition: opacity 2s ease-in-out; /* Mesma transição da página principal */
    z-index: -2;
}

.evento-background-layer.active {
    opacity: 0.25; /* Transparência - ajuste conforme necessário (0.25 = 25% de opacidade) */
    z-index: -1; /* Garantir que a imagem ativa fique acima das outras */
}

/* Tema Claro */
body.tema-claro {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

body.tema-claro::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Tema Escuro */
body.tema-escuro {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

body.tema-escuro::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    background: transparent; /* Garantir que o container seja transparente */
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeInDown 0.8s ease;
    position: relative;
}


.header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.header .evento-data {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.9);
    color: #667eea;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 50px;
    margin-bottom: 15px;
}

.header .evento-nome {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header .evento-atracoes {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    white-space: pre-line;
}

/* Banner do evento - largura aumentada */
.evento-banner {
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto 20px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0;
}

@media (max-width: 600px) {
    .evento-banner {
        height: calc(100vw * 2 / 3);
    }
}

.evento-banner-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

.evento-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    /* Garantir que a imagem preencha completamente */
    min-width: 100%;
    min-height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.evento-banner-img.active {
    opacity: 1;
    z-index: 1;
}

.evento-atracoes {
    font-size: 1.1rem;
    opacity: 0.9;
    white-space: pre-line;
}

/* Aviso visual discreto durante o vídeo */
.video-notice {
    display: none;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.notice-content {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.notice-icon {
    font-size: 1.5rem;
    animation: rotate 2s linear infinite;
}

.notice-text {
    font-size: 0.95rem;
}

/* Container do vídeo */
.video-container {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin: 0 auto 30px auto;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
    animation: fadeInUp 0.8s ease 0.2s both;
    display: none;
}

.video-container.show {
    display: block;
}

#player {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Painel de links */
.links-panel {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: none;
}

.links-panel.show {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.6s ease;
    display: block;
    margin-top: 20px;
}

.panel-content {
    text-align: center;
}

.panel-title {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
    font-weight: 700;
}

.panel-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.instagram-btn {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(131, 58, 180, 0.4);
}

.instagram-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(131, 58, 180, 0.6);
}

.replay-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.replay-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.link-icon {
    font-size: 1.5rem;
}

.link-text {
    flex: 1;
    text-align: left;
}

.link-handle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Anúncios */
/* Media containers (anúncios) - nomes neutros para evitar bloqueio */
.media-container {
    max-width: 600px;
    margin: 20px auto;
    display: none;
}

.media-container img,
.media-container video {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.media-container img:hover {
    transform: scale(1.02);
}

.media-container video {
    height: auto;
}

/* Formulário */
.formulario {
    background: #ffffff;
    border-radius: 32px;
    padding: 50px 45px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 620px;
    margin: 0 auto;
    display: none;
    border: 2px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.formulario::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.formulario.show {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.6s ease;
    display: block;
}

.form-header {
    text-align: center;
    margin-bottom: 45px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
    position: relative;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    border-radius: 2px;
}

.form-header h2 {
    font-size: 2.4rem;
    color: #667eea;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.form-header p {
    color: #333333;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.lista-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #000000;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.label-icon {
    font-size: 1.3rem;
    opacity: 0.8;
}

.form-group input,
.form-group select {
    padding: 18px 20px;
    border: 2px solid #cccccc;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #000000;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.08),
        0 8px 24px rgba(102, 126, 234, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-1px) scale(1.005);
}

.form-group input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.form-group select option {
    padding: 10px;
}

.submit-btn {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 50px rgba(102, 126, 234, 0.35),
        0 8px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.submit-btn:active {
    transform: translateY(0px);
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-icon {
    font-size: 1.25rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Mensagens */
.success-message {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.6s ease;
    display: none;
}

.success-message.show {
    display: block;
}

.success-content {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 50px 40px;
    border-radius: 28px;
    box-shadow: 
        0 25px 70px rgba(16, 185, 129, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.success-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.success-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

.success-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.success-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 10px;
}

.success-content p.spam-warning {
    font-size: 0.95rem;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.error-message {
    background-color: #e53935;
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    display: none;
    text-align: center;
}

.error-message.show {
    display: block;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animações */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }


    .header {
        text-align: center;
        padding-top: 10px;
    }

    .video-container {
        padding: 15px;
    }

    .links-panel {
        padding: 30px 20px;
    }

    .panel-title {
        font-size: 1.5rem;
    }

    .link-btn {
        padding: 10px 16px;
        font-size: 1rem;
    }

    .media-container {
        margin: 15px auto;
    }

    .media-container img,
    .media-container video {
        margin: 15px auto;
        border-radius: 10px;
    }

    .formulario {
        padding: 35px 25px;
        border-radius: 28px;
        margin: 20px auto;
    }

    .form-header {
        margin-bottom: 35px;
        padding-bottom: 20px;
    }

    .form-header h2 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .form-header p {
        font-size: 0.95rem;
    }

    .form-group {
        gap: 8px;
    }

    .form-group label {
        font-size: 0.8rem;
        gap: 8px;
    }

    .label-icon {
        font-size: 1.2rem;
    }

    .form-group input,
    .form-group select {
        padding: 17px 16px;
        font-size: 1rem;
        border-radius: 14px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .form-group input:focus,
    .form-group select:focus {
        transform: translateY(-1px) scale(1.002);
        box-shadow: 
            0 0 0 3px rgba(102, 126, 234, 0.08),
            0 6px 20px rgba(102, 126, 234, 0.12);
    }

    .submit-btn {
        padding: 18px 32px;
        font-size: 1rem;
        border-radius: 14px;
        margin-top: 10px;
        -webkit-tap-highlight-color: transparent;
    }

    .submit-btn:active {
        transform: scale(0.98);
    }

    .btn-icon {
        font-size: 1.2rem;
    }

    .btn-text {
        font-size: 1rem;
        letter-spacing: 0.4px;
    }

    .success-message {
        padding: 30px 15px;
    }

    .success-content {
        padding: 40px 28px;
        border-radius: 24px;
    }

    .success-icon {
        font-size: 3.5rem;
        margin-bottom: 15px;
    }

    .success-content h3 {
        font-size: 1.7rem;
        margin-bottom: 12px;
    }

    .success-content p {
        font-size: 1rem;
    }

    .success-content p.spam-warning {
        font-size: 0.9rem;
        padding: 14px;
        margin-top: 18px;
        border-radius: 12px;
    }

    .notice-content {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .notice-text {
        font-size: 0.85rem;
    }

    .evento-banner {
        height: calc(100vw * 2 / 3);
        max-width: 100%;
    }
}

/* Correções específicas para iOS - backdrop-filter */
/* iOS Safari e Chrome iOS têm problemas com backdrop-filter quando há camadas de background complexas */
/* O backdrop-filter não funciona corretamente no iOS, deixando tudo muito claro/branco */
/* Solução: desabilitar backdrop-filter e usar backgrounds sólidos que respeitam o tema do sistema */
@supports (-webkit-touch-callout: none) {
    /* Detecta iOS */
    
    /* Container principal - escurece o fundo para melhor contraste no iOS */
    .container {
        background: rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Header - desabilita backdrop-filter e usa background sólido que funciona com todos os temas */
    body.tema-padrao .header,
    body.tema-escuro .header {
        background: rgba(0, 0, 0, 0.7) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    body.tema-claro .header {
        background: rgba(255, 255, 255, 0.9) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        color: #333 !important;
    }
    
    /* Back link - desabilita backdrop-filter e usa background sólido */
    body.tema-padrao .back-link,
    body.tema-escuro .back-link {
        background: rgba(0, 0, 0, 0.7) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    body.tema-claro .back-link {
        background: rgba(255, 255, 255, 0.9) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        color: #333 !important;
    }
    
    /* Video container - desabilita backdrop-filter e usa background sólido */
    body.tema-padrao .video-container,
    body.tema-escuro .video-container {
        background: rgba(0, 0, 0, 0.6) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    body.tema-claro .video-container {
        background: rgba(255, 255, 255, 0.9) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    /* Evento banner - desabilita backdrop-filter e usa background sólido */
    body.tema-padrao .evento-banner,
    body.tema-escuro .evento-banner {
        background: rgba(0, 0, 0, 0.5) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    body.tema-claro .evento-banner {
        background: rgba(255, 255, 255, 0.8) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    /* Notice content - remove backdrop-filter (já tem background claro suficiente) */
    .notice-content {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    
    /* Links panel - remove backdrop-filter (já tem background claro suficiente) */
    .links-panel {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
}

