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

/* Importar fonte Bourbon St local */
@font-face {
    font-family: 'Bourbon St';
    src: url('fonts/bourbon-st-regular-1.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Roboto:wght@400;500&display=swap');

:root {
    --red-bg: #b71c1c;
    --red-dark: #8b0000;
    --gold: #F6C67E;
    --gold-light: #d4af37;
    --gold-button: #c9a050;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --text-dark: #333;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --success-color: #28a745;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: var(--white);
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/assets/red-texturized-bg.png');
    background-position: center;
    background-size: cover;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Vetor central atrás do formulário */
.vector-center {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

.vector-center img {
    width: 750px;
    height: auto;
    opacity: 0.8;
}

/* Vetores laterais - mostrando apenas as pontas */
.vector-left {
    position: fixed;
    top: 0%;
    left: 5%;
    transform: translate(-75%, -50%);
    z-index: -1;
    pointer-events: none;
}

.vector-left img {
    width: 450px;
    height: auto;
    opacity: 1;
}

.vector-right {
    position: fixed;
    top: 0%;
    right: 5%;
    transform: translate(75%, -50%);
    z-index: -1;
    pointer-events: none;
}

.vector-right img {
    width: 450px;
    height: auto;
    opacity: 1;
}

.vector-left-bottom {
    position: fixed;
    top: 101%;
    left: 5%;
    transform: translate(-75%, -50%);
    z-index: -1;
    pointer-events: none;
}

.vector-left-bottom img {
    width: 450px;
    height: auto;
    opacity: 1;
}

.vector-right-bottom {
    position: fixed;
    top: 101%;
    right: 5%;
    transform: translate(75%, -50%);
    z-index: -1;
    pointer-events: none;
}

.vector-right-bottom img {
    width: 450px;
    height: auto;
    opacity: 1;
}

/* Container principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.container::-webkit-scrollbar {
    display: none;
}

.content {
    width: 100%;
    text-align: center;
}

.logos .logo {
    width: 400px;
    height: auto;
}

/* Título principal */
h1 {
    font-family: 'Bourbon St', 'Cinzel Decorative', 'Playfair Display', Georgia, serif;
    font-size: 5rem;
    font-weight: 400;
    color: var(--gold);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

/* Texto introdutório */
.intro-text {
    font-size: 0.9rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    padding: 0 1rem;
}

/* Container do formulário */
.form-container {
    background: #F3F3F3;
    padding: 4rem 1.75rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 420px;
    margin: 1.5rem auto;
}

.form-container h2 {
    display: none;
}

/* Mensagens */
.message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: none;
    text-align: left;
}

.message.show {
    display: block;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Formulário */
.form-group {
    margin-bottom: 0.85rem;
    text-align: left;
}

.form-group label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--white);
    color: var(--text-dark);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder {
    color: #999;
    font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2);
}

input.error {
    border-color: #dc3545;
}

input.error:focus {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.error-text {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 0;
}

.error-text:empty {
    display: none;
}

/* Botão de envio */
.submit-btn {
    width: 100%;
    padding: 0.85rem 2rem;
    background: linear-gradient(90deg, #E9B872 0%, #D9A862 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(90deg, #F0C583 0%, #E0B873 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-block;
}

/* Seção Regulamento */
.regulamento-section {
    margin-top: 1.5rem;
    text-align: center;
}

.regulamento-title {
    font-family: 'Bourbon St', 'Cinzel Decorative', 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.4rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.regulamento-link {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
}

.regulamento-link:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        letter-spacing: 0.1em;
    }

    .intro-text {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
        margin: 1.5rem 1rem;
    }

    .container {
        padding: 2rem 1rem;
    }

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

    .diamond-line-1 {
        width: 500px;
        height: 500px;
        margin-top: -250px;
        margin-left: -250px;
    }

    .diamond-line-2 {
        width: 650px;
        height: 650px;
        margin-top: -325px;
        margin-left: -325px;
    }

    .diamond-line-3 {
        width: 800px;
        height: 800px;
        margin-top: -400px;
        margin-left: -400px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 3.2rem;
        letter-spacing: 0.05em;
    }

    .intro-text {
        font-size: 0.8rem;
    }

    .form-container {
        padding: 1.5rem 1.25rem;
    }

    .regulamento-title {
        font-size: 1.3rem;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estados de foco visíveis para acessibilidade */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* =============================================
   PÁGINA QR CODE
   ============================================= */

/* Layout da página QR Code */
body.qrcode-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Container do QR Code */
.qrcode-container {
    background: var(--white);
    border-radius: 8px;
    padding: 1.75rem 1.75rem;
    max-width: 450px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    text-align: center;
    animation: slideIn 0.5s ease-out;
    position: relative;
    z-index: 1;
}

/* Ícone de sucesso */
.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out 0.2s backwards;
}

.success-icon::after {
    content: '✓';
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

/* Título da página QR Code */
.qrcode-container h1 {
    font-family: 'Bourbon St', 'Cinzel Decorative', 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: normal;
    color: var(--gold);
    margin-bottom: 0.4rem;
    text-transform: none;
    text-shadow: none;
}

.subtitle {
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

/* Container do QR Code imagem */
.qr-container {
    background: var(--gray-light);
    padding: 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    animation: fadeIn 0.5s ease-out 0.4s backwards;
}

.qr-code {
    max-width: 220px;
    width: 100%;
    height: auto;
    border: 4px solid var(--white);
    border-radius: 8px;
}

/* Container do código PIX */
.pix-code-container {
    background: var(--gray-light);
    padding: 0.9rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    animation: fadeIn 0.5s ease-out 0.6s backwards;
}

.pix-code-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.4rem;
}

.pix-code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-dark);
    word-break: break-all;
    padding: 0.65rem;
    background: var(--white);
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 0.65rem;
}

/* Botão de copiar */
.copy-btn {
    background: linear-gradient(90deg, #E9B872 0%, #D9A862 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.copy-btn:hover {
    background: linear-gradient(90deg, #F0C583 0%, #E0B873 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: var(--success-color);
}

/* Instruções */
.instructions {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: left;
    animation: fadeIn 0.5s ease-out 0.8s backwards;
}

.instructions strong {
    color: var(--text-dark);
}

/* Botão voltar */
.back-btn {
    display: inline-block;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsividade da página QR Code */
@media (max-width: 480px) {
    .qrcode-container {
        padding: 1.25rem 1rem;
    }

    .qrcode-container h1 {
        font-size: 1.25rem;
    }

    .qr-container {
        padding: 1rem;
    }

    .qr-code {
        max-width: 180px;
    }
}