/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container Principal */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Páginas */
.page {
    display: none;
    min-height: 100vh;
    padding: 20px 0;
}

.page.active {
    display: block;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00b4d8, #0077b6, #023e8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 180, 216, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #b8c5d1;
    max-width: 400px;
    margin: 0 auto;
}

/* Formulário de Doação */
.donation-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #e0e6ed;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 15px;
    color: #00b4d8;
    font-weight: 600;
    z-index: 1;
}

#donation-amount {
    width: 100%;
    padding: 15px 15px 15px 35px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 180, 216, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#donation-amount:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

#donation-amount::placeholder {
    color: #8a9ba8;
}

/* Botões */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(45deg, #00b4d8, #0077b6);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid rgba(0, 180, 216, 0.5);
    margin-top: 15px;
}

.btn-secondary:hover {
    background: rgba(0, 180, 216, 0.2);
    border-color: #00b4d8;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Seção PIX */
.pix-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 180, 216, 0.3);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pix-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #00b4d8;
    font-size: 1.3rem;
}

.pix-code-container {
    margin-bottom: 20px;
}

#pix-code {
    width: 100%;
    height: 100px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 180, 216, 0.5);
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 15px;
}

#pix-code:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 15px rgba(0, 180, 216, 0.3);
}

.pix-qr {
    text-align: center;
}

#pix-qr-image {
    max-width: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Estatísticas */
.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.total-raised, .timer {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.total-raised h3, .timer h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #b8c5d1;
}

.amount-display, .timer-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00b4d8;
}

/* Status do Pagamento */
.payment-status {
    background: rgba(0, 180, 216, 0.1);
    border: 2px solid rgba(0, 180, 216, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #00b4d8;
    font-weight: 500;
}

/* Página de Agradecimento */
#thank-you-page {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.celebration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #00b4d8;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    background: #00b4d8;
}

.confetti:nth-child(2) {
    left: 30%;
    animation-delay: 0.5s;
    background: #0077b6;
}

.confetti:nth-child(3) {
    left: 50%;
    animation-delay: 1s;
    background: #023e8a;
}

.confetti:nth-child(4) {
    left: 70%;
    animation-delay: 1.5s;
    background: #00b4d8;
}

.confetti:nth-child(5) {
    left: 90%;
    animation-delay: 2s;
    background: #0077b6;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.thank-you-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.thank-you-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00b4d8, #0077b6, #023e8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 180, 216, 0.3);
}

.thank-you-text {
    font-size: 1.2rem;
    color: #b8c5d1;
    margin-bottom: 30px;
}

.celebration-gif {
    margin: 30px 0;
}

.emoji-animation {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.final-stats {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.total-raised-final h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #b8c5d1;
}


/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .donation-form, .pix-section, .final-stats {
        padding: 20px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .thank-you-content h1 {
        font-size: 1.8rem;
    }
    
    .emoji-animation {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .donation-form, .pix-section, .final-stats {
        padding: 15px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .amount-display, .timer-display {
        font-size: 1.3rem;
    }
}

/* Animações de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.donation-form, .pix-section, .stats-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Efeitos de hover para botões */
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .confetti, .emoji-animation, .spinner {
        animation: none;
    }
}

/* Estados de loading */
.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .btn-loading {
    display: flex;
}

/* Feedback visual para cópia */
.copied {
    background: rgba(0, 255, 0, 0.2) !important;
    border-color: #00ff00 !important;
}

.copied::after {
    content: "✓ Copiado!";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #00ff00;
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}
