/* ------------------- */
/* Variáveis e Reset   */
/* ------------------- */
:root {
    /* Cores */
    --purple-light: #A855F7;
    --purple-dark: #8B5CF6;
    --gold: #F59E0B;
    --bg-dark: #111827;
    --bg-card: rgba(31, 41, 55, 0.7);
    --text-light: #F3F4F6;
    --text-medium: #9CA3AF;
    --primary-gradient: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-light) 100%);
    --white: #ffffff;
    --dark-gradient: none;
    
    /* Fontes */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Poppins', sans-serif;
    
    /* Outros */
    --radius: 1rem;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    --shadow-purple: 0 0 30px rgba(168, 85, 247, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
    background-image: var(--dark-gradient);
    overflow-x: hidden;
}

/* ------------------- */
/* Animações Chave     */
/* ------------------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes confetti { 0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }
@keyframes rotate-cube { from { transform: rotateX(0deg) rotateY(0deg); } to { transform: rotateX(360deg) rotateY(360deg); } }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes animated-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ------------------- */
/* Estilos Gerais      */
/* ------------------- */
.main-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 2; }

/* ------------------- */
/* Fundo de Partículas */
/* ------------------- */
#particles-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.particle { position: absolute; width: 3px; height: 3px; background: var(--purple-light); border-radius: 50%; opacity: 0.6; animation: float 6s ease-in-out infinite; }

/* ------------------- */
/* Seção Herói         */
/* ------------------- */
.hero-section { text-align: center; padding: 1rem 0 2rem 0; animation: fadeIn 1s ease-out; }
.graduation-icon { font-size: 6rem; margin-bottom: 0rem; animation: float 3s ease-in-out infinite; }
.hero-title { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.title-line { display: block; }
.gradient-text { background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-medium); max-width: 650px; margin: 0 auto 2.5rem auto; }

/* ------------------- */
/* QR Code e Botões    */
/* ------------------- */
.qr-code-actions-wrapper { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2rem; margin-bottom: 2.5rem; }
.qr-code-container { position: relative; display: flex; flex-direction: column; align-items: center; }
.qr-code { width: 180px; height: 180px; border-radius: var(--radius); background: white; padding: 0.75rem; box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.qr-code:hover { transform: scale(1.05); }
.qr-glow { position: absolute; inset: -8px; background: var(--primary-gradient); border-radius: calc(var(--radius) + 8px); filter: blur(15px); opacity: 0.5; z-index: -1; }
.qr-instruction { color: var(--text-medium); margin-top: 1rem; display: flex; justify-content: center; align-items: center; gap: 0.4em; flex-wrap: wrap; min-height: 2.6em; }
.qr-instruction p { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.qr-instruction-subtext { font-size: 0.9em; opacity: 0.8; }
.qr-icon { font-size: 1.2rem; }
.action-buttons { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.75rem 1.5rem; background: rgba(168, 85, 247, 0.1); color: var(--text-light); border: 1px solid rgba(168, 85, 247, 0.3); border-radius: 0.75rem; text-decoration: none; font-size: 1rem; font-weight: 600; transition: all 0.3s ease; cursor: pointer; min-width: 200px; }
.action-btn:hover { background: rgba(168, 85, 247, 0.2); border-color: var(--purple-light); transform: translateY(-3px); box-shadow: var(--shadow-purple); }

/* ------------------- */
/* Seção de Progresso da Meta */
/* ------------------- */
.progress-section { padding: 2rem 0; }
.progress-container { background: transparent; border: none; max-width: 800px; margin: 0 auto; padding: 0; }
.progress-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}
.progress-subtitle {
    font-size: 0.9rem;
    color: var(--text-medium);
    text-align: center;
    font-style: italic;
    margin-bottom: 1rem;
}
.progress-bar-background {
    width: 100%;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    padding: 4px;
}
.progress-bar-fill {
    width: 0%; 
    height: 100%;
    border-radius: 50px;
    transition: width 1s ease-in-out;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: linear-gradient(90deg, var(--purple-dark), var(--purple-light), var(--purple-dark));
    background-size: 200% 100%;
    animation: animated-gradient 4s ease infinite;
    box-shadow: 0 0 8px var(--purple-light), 0 0 16px var(--purple-dark);
}
.progress-percentage { color: var(--white); font-weight: 700; font-size: 0.8rem; padding-right: 12px; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6); }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-medium); margin-top: 0.75rem; padding: 0 5px; }
.progress-labels span { font-weight: 600; color: var(--text-light); }

/* ------------------- */
/* Seção de Informações (Cards) */
/* ------------------- */
.info-section { padding: 3rem 0; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.info-card { background: var(--bg-card); backdrop-filter: blur(10px); border-radius: var(--radius); padding: 1.5rem; border: 1px solid rgba(168, 85, 247, 0.2); transition: all 0.3s ease; animation: fadeIn 0.5s ease-out forwards; opacity: 0; display: flex; flex-direction: column; }
.info-card:hover { transform: translateY(-5px); border-color: var(--purple-light); box-shadow: var(--shadow-purple); }
.card-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-light); text-shadow: 0 0 10px rgba(168, 85, 247, 0.7); }
.values-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.value-option { background: rgba(0, 0, 0, 0.3); border: 2px solid transparent; border-radius: 0.75rem; padding: 1rem 0.5rem; text-align: center; transition: all 0.2s ease; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 80px; cursor: pointer; }
.value-option:hover { transform: scale(1.05); border-color: rgba(168, 85, 247, 0.5); }
.value-option.active { background: var(--primary-gradient); transform: scale(1.05); border-color: var(--purple-light); }
.value-amount { font-size: 1.3rem; font-weight: 700; display: block; }
.value-icon { font-size: 1.5rem; }
.impact-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; flex-grow: 1; justify-content: center; }
.impact-list li { display: flex; align-items: center; gap: 0.75rem; background: rgba(0, 0, 0, 0.2); padding: 0.75rem; border-radius: 0.5rem; }
.impact-icon { font-size: 1.1rem; }
.personal-message { font-style: italic; color: var(--text-medium); margin-bottom: 1rem; flex-grow: 1; display: flex; align-items: center; }
.message-author { display: flex; align-items: center; gap: 0.75rem; }
.author-avatar { font-size: 2.5rem; }
.author-name { font-weight: 600; }
.author-course { color: var(--text-medium); font-size: 0.9rem; }

/* ------------------- */
/* Títulos de Seção Genéricos */
/* ------------------- */
.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
}

/* ------------------- */
/* Seção de Agradecimentos (CUBO MÁGICO) */
/* ------------------- */
.supporters-section { padding: 2rem 0; text-align: center; }
.cube-container { width: 200px; height: 200px; perspective: 1200px; margin: 0 auto; }
.rubiks-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 10s infinite linear; /* AJUSTE AQUI: Acelerado de 15s para 10s */
}
.rubiks-cube .face { position: absolute; display: flex; flex-wrap: wrap; width: 100%; height: 100%; }
.rubiks-cube .face.front  { transform: translateZ(100px); }
.rubiks-cube .face.back   { transform: rotateY(180deg) translateZ(100px); }
.rubiks-cube .face.left   { transform: rotateY(-90deg) translateZ(100px); }
.rubiks-cube .face.right  { transform: rotateY(90deg) translateZ(100px); }
.rubiks-cube .face.top    { transform: rotateX(90deg) translateZ(100px); }
.rubiks-cube .face.bottom { transform: rotateX(-90deg) translateZ(100px); }
.rubiks-cube .cube { width: calc(100% / 3); height: calc(100% / 3); box-sizing: border-box; border: 2px solid var(--bg-dark); display: flex; justify-content: center; align-items: center; text-align: center; padding: 4px; }
.rubiks-cube .cube-name { color: var(--bg-dark); font-weight: 600; font-size: 11px; line-height: 1.1; word-break: break-word; text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.3); }

/* Maior Doador */
.top-donor { display: inline-flex; align-items: center; gap: 0.75rem; margin-top: 5rem; background: var(--bg-card); border: 1px solid rgba(168, 85, 247, 0.2); border-radius: 999px; padding: 0.5rem 0.9rem; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.top-donor-icon { font-size: 1.2rem; filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5)); }
.top-donor-info { display: flex; flex-direction: column; align-items: flex-start; }
.top-donor-label { font-size: 0.75rem; color: var(--text-medium); line-height: 1; }
.top-donor-name { font-weight: 700; color: var(--text-light); line-height: 1; }
.top-donor-amount { margin-left: 0.5rem; font-weight: 700; color: var(--text-light); background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.3); border-radius: 999px; padding: 0.25rem 0.6rem; }


/* ------------------- */
/* Seção Mural de Recados */
/* ------------------- */
.guestbook-section { padding: 2rem 0; text-align: center; }
.section-subtitle { font-size: 1.1rem; color: var(--text-medium); margin-top: -2rem; margin-bottom: 1.5rem; }
.guestbook-carousel { 
    margin-top: 2.5rem; 
    max-width: 100%; 
    overflow: hidden; 
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); 
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    cursor: grab; /* Indica que a área é arrastável */
}

.guestbook-list { 
    display: flex; 
    animation: scroll 60s linear infinite; 
    will-change: transform; 
}

/* NOVA CLASSE: Pausa a animação quando o usuário está arrastando */
.guestbook-list.is-dragging {
    animation-play-state: paused;
    cursor: grabbing;
}

.guestbook-list .message-card { margin: 0 1rem; flex: 0 0 350px; }

/* ------------------- */
/* Estilos do Modal */
/* ------------------- */
.modal { display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); }
.modal-content { background: var(--bg-dark); border: 1px solid rgba(168, 85, 247, 0.2); margin: 15% auto; padding: 2rem; border-radius: var(--radius); width: 90%; max-width: 500px; position: relative; animation: fadeIn 0.5s; }
.close-btn { color: var(--text-medium); position: absolute; top: 1rem; right: 1.5rem; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.3s ease; }
.close-btn:hover { color: var(--text-light); }
.modal-content h2 { font-family: var(--font-display); text-align: center; margin-bottom: 1.5rem; }
.modal-content form { display: flex; flex-direction: column; gap: 1rem; }
.modal-content label { text-align: left; font-weight: 500; color: var(--text-medium); }
.modal-content input, .modal-content textarea { width: 100%; padding: 0.75rem; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(168, 85, 247, 0.2); border-radius: 0.5rem; color: var(--text-light); font-size: 1rem; font-family: var(--font-primary); }
.modal-content textarea { resize: vertical; }
.modal-note { font-size: 0.85rem; color: var(--text-medium); text-align: center; margin-top: -0.5rem; margin-bottom: 0.5rem; }
.cta-button { background: var(--primary-gradient); color: var(--text-light); border: none; padding: 1rem 2rem; border-radius: 50px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: var(--shadow); }
.cta-button:hover { transform: translateY(-3px); box-shadow: var(--shadow-purple); }

/* ------------------- */
/* Footer              */
/* ------------------- */
.footer { background-color: var(--bg-dark); padding: 2rem; text-align: center; border-top: 1px solid rgba(168, 85, 247, 0.2); color: var(--text-medium); font-size: 0.9rem; margin-top: 3rem; }
.footer-content p { margin-bottom: 0.5rem; }
.footer-content p:last-child { margin-bottom: 0; }
.portfolio-link { color: var(--purple-light); font-weight: bold; text-decoration: none; font-size: 1.1rem; letter-spacing: 0.5px; transition: all 0.3s ease; }
.portfolio-link:hover { color: var(--purple-dark); text-decoration: underline; }

/* ------------------- */
/* Confetti            */
/* ------------------- */
#confetti-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1000; }
.confetti { position: absolute; width: 8px; height: 8px; background: var(--purple-light); animation: confetti 3s linear infinite; }

/* ------------------- */
/* Responsividade      */
/* ------------------- */
@media (max-width: 768px) {
    .main-container { padding: 0 1rem; }
    .graduation-icon { font-size: 5rem; }
    .qr-code-actions-wrapper { flex-direction: column; gap: 1.5rem; }
    .action-buttons { width: 100%; max-width: 300px; }
    .action-btn { width: 100%; }
    .qr-instruction { flex-direction: column; gap: 0.1em; line-height: 1.3; }
    .progress-container { padding: 1.5rem 1rem; }
    .info-grid { grid-template-columns: 1fr; }
    .info-section { padding-top: 1.5rem; margin-top: 0; }
    .progress-section { padding: 1rem 0; margin-top: -1.5rem; }
    .supporters-section { padding-top: 1.5rem; }
    .values-container { grid-template-columns: repeat(2, 1fr); }
    .value-option { min-height: auto; padding: 0.75rem 0.5rem; }
    .guestbook-list .message-card { flex: 0 0 280px; }
}

/* Prefers-reduced-motion desativado a pedido: manter todas animações ativas */