:root {
    --bg-color: #050507;
    --surface-color: #16161a; /* Um pouco mais claro que o fundo */
    --primary-color: #a78bfa;
    --primary-glow: rgba(167, 139, 250, 0.4);
    --secondary-color: #34d399;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --danger-color: #f87171;
    --gold-color: #fbbf24;
    --radius-lg: 24px;
    --radius-md: 16px;
    --nav-height: 70px;
    /* Sombras e Bordas mais sutis */
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(25, 25, 30, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.06); /* Borda mais fina e discreta */
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif; background-color: var(--bg-color); color: var(--text-main); height: 100vh; overflow: hidden; user-select: none; }

/* Tipografia */
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.5px; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { line-height: 1.6; font-size: 0.95rem; color: #e2e8f0; margin-bottom: 1.2rem; }

.text-gradient { background: linear-gradient(135deg, #ffffff 40%, #a78bfa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 2px 20px rgba(167, 139, 250, 0.15); }
button:active { transform: scale(0.96); }

/* Views */
main#app { position: relative; width: 100%; height: 100%; padding-bottom: var(--nav-height); }
.view { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: none; opacity: 0; flex-direction: column; padding: 20px; padding-top: 10px; padding-bottom: calc(var(--nav-height) + 20px); overflow-y: auto; background: transparent; }
.view.active { display: flex; opacity: 1; z-index: 10; animation: fadeInView 0.4s ease-out forwards; }
.content-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; z-index: 2; }
.scroll-content { flex: 1; overflow-y: auto; width: 100%; scrollbar-width: none; }
.scroll-content::-webkit-scrollbar { display: none; }

/* Animações */
@keyframes fadeSlideUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fadeInView { 0% { opacity: 0; } 100% { opacity: 1; } }
.view.active .animate-step-1 { opacity: 0; animation: fadeSlideUp 0.6s ease forwards; animation-delay: 0.1s; }
.view.active .animate-step-2 { opacity: 0; animation: fadeSlideUp 0.6s ease forwards; animation-delay: 0.2s; }
.view.active .animate-step-3 { opacity: 0; animation: fadeSlideUp 0.6s ease forwards; animation-delay: 0.3s; }

/* Elementos de UI */
.top-bar { display: flex; justify-content: center; align-items: center; padding: 10px 0 15px 0; min-height: 50px; }
.top-bar.column { flex-direction: column; gap: 10px; padding-bottom: 10px; }
.user-greeting { font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 1.5px; }

/* Botões e Inputs */
.btn-primary { background: white; color: black; padding: 16px 32px; border-radius: 100px; font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 10px; margin-top: 40px; box-shadow: 0 10px 30px rgba(255,255,255,0.15); }
.btn-secondary { flex: 1; background: rgba(255,255,255,0.08); color: white; padding: 12px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; font-size: 0.9rem; }
.btn-primary-full { background: var(--gold-color); color: #000; width: 100%; padding: 14px; border-radius: 12px; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2); }

/* Onboarding & Conheça */
.logo-container { width: 100px; height: 100px; background: linear-gradient(135deg, #8b5cf6, #6d28d9); border-radius: 35px; display: flex; align-items: center; justify-content: center; margin-bottom: 30px; box-shadow: 0 0 50px rgba(139, 92, 246, 0.4); border: 1px solid rgba(255,255,255,0.1); }
.logo-container.small { width: 80px; height: 80px; margin-bottom: 16px; border-radius: 24px; overflow: hidden; }
.logo-icon { font-size: 48px; color: white; }
.pulsate { animation: pulse-animation 3s infinite ease-in-out; }
.profile-icon-img { width: 100%; height: 100%; object-fit: cover; }
.profile-section { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 30px; padding: 0 10px; }
.social-row { display: flex; gap: 12px; width: 100%; margin-bottom: 24px; }
.social-big-btn { flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-main); font-weight: 600; font-size: 0.9rem; transition: all 0.2s; }

/* Cards */
.oracle-card { 
    background: var(--glass-bg); 
    backdrop-filter: blur(20px); 
    border: var(--glass-border); 
    border-radius: var(--radius-lg); 
    padding: 24px; 
    box-shadow: var(--shadow-soft); 
    min-height: 280px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    margin-top: 5px; margin-bottom: 20px; 
    transition: all 0.3s ease; 
    position: relative; 
    width: 100%;
}
.card-header-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(167, 139, 250, 0.1); display: flex; align-items: center; justify-content: center; color: var(--primary-color); border: 1px solid rgba(167, 139, 250, 0.15); flex-shrink: 0; margin: 0 auto 20px auto; }
.card-header-icon.small { width: 36px; height: 36px; margin-bottom: 10px; }
.card-header-icon span { font-size: 24px; }

/* --- TRUQUE DO PRINT (RESOLVE O CORTE DO TEXTO) --- */
.oracle-card.capturing {
    position: absolute; /* Sai do fluxo normal */
    top: 0;
    left: 0;
    z-index: 9999;
    height: auto !important; /* Estica o quanto precisar */
    min-height: 100vh;
    width: 100%;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 40px 30px 60px 30px !important; /* Padding extra embaixo */
    
    /* Cores Sólidas para garantir legibilidade */
    background: #101012 !important; 
    backdrop-filter: none !important;
    color: #ffffff !important;
    border: none !important;
}
/* Força cor branca em tudo durante o print */
.oracle-card.capturing * { color: #ffffff !important; border-color: rgba(255,255,255,0.2) !important; }
.oracle-card.capturing .text-gradient { background: none; -webkit-text-fill-color: #ffffff; text-shadow: none; }
.oracle-card.capturing h4 { color: var(--secondary-color) !important; opacity: 1 !important; } /* Mantém destaque nos títulos */
/* Esconde elementos inúteis no print */
.oracle-card.capturing .row, 
.oracle-card.capturing .daily-limit-notice, 
.oracle-card.capturing #btn-close-modal,
.oracle-card.capturing .btn-close-floating { 
    display: none !important; 
}
.oracle-card.capturing .share-branding { display: block !important; margin-top: 40px; }

/* Animação Energia */
@keyframes cardPulse {
    0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.2); border-color: rgba(167, 139, 250, 0.3); }
    50% { box-shadow: 0 0 50px 10px rgba(167, 139, 250, 0.4); border-color: rgba(167, 139, 250, 0.8); transform: scale(1.01); }
    100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.2); border-color: rgba(167, 139, 250, 0.3); transform: scale(1); }
}
.oracle-card.energy-active { animation: cardPulse 2s infinite ease-in-out; background: rgba(20, 20, 25, 0.98); z-index: 50; }

/* Ritual Botão */
.hold-wrapper { display: flex; flex-direction: column; align-items: center; margin-top: 24px; }
.btn-hold-circle { width: 76px; height: 76px; border-radius: 50%; background: #23232a; border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: all 0.3s ease; }
@keyframes breathe { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.2); } 50% { transform: scale(1.05); box-shadow: 0 0 15px 5px rgba(167, 139, 250, 0.3); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.2); } }
.btn-hold-circle.breathing { animation: breathe 3s infinite ease-in-out; border-color: rgba(167, 139, 250, 0.4); color: var(--primary-color); }
.btn-hold-circle.success { background: var(--primary-color); color: white; box-shadow: 0 0 50px var(--primary-glow); border-color: var(--primary-color); transform: scale(1.1); animation: none; }
.hold-instruction { margin-top: 16px; text-align: center; font-size: 0.65rem; letter-spacing: 1.2px; color: #64748b; font-weight: 700; opacity: 0.8; }

/* Histórico */
.history-filters { display: flex; background: rgba(255,255,255,0.05); padding: 4px; border-radius: 12px; gap: 4px; }
.filter-btn { padding: 8px 16px; font-size: 0.85rem; color: var(--text-muted); border-radius: 8px; font-weight: 500; flex: 1; text-align: center; }
.filter-btn.active { background: #2d2d35; color: var(--primary-color); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.history-item { background: var(--glass-bg); border: var(--glass-border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.history-item:active { background: rgba(255,255,255,0.08); }
.history-header { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 0.75rem; color: var(--primary-color); font-weight: bold; opacity: 0.9; }
.history-question { font-size: 0.95rem; font-weight: 600; color: white; line-height: 1.4; }
.history-preview { font-size: 0.85rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Utils */
.share-branding { display: none; margin-top: 30px; font-size: 0.8rem; color: var(--secondary-color); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; text-align: center; }
.daily-limit-notice { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: 100%; }
.divider { height: 1px; background: rgba(255,255,255,0.1); margin: 16px 0; width: 100%; }
.quote-box { width: 100%; margin: 12px 0; padding: 16px; background: rgba(0,0,0,0.2); border-radius: var(--radius-md); border-left: 3px solid var(--primary-color); font-style: italic; color: #cbd5e1; font-size: 0.95rem; }
.row { display: flex; gap: 10px; width: 100%; margin-top: 20px; }
.hidden { display: none !important; }
.spacer-sm { height: 16px; } .spacer { height: 40px; }

/* Modais */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay:not(.hidden) { opacity: 1; pointer-events: auto; }
.modal-body { width: 100%; max-width: 400px; position: relative; opacity: 0; transform: translateY(20px); transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal-overlay:not(.hidden) .modal-body { opacity: 1; transform: translateY(0); }
.modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

/* CORREÇÃO DO BOTÃO FECHAR BRANCO */
.btn-close-floating { 
    position: absolute; top: -50px; right: 0; 
    background: rgba(255,255,255,0.1) !important; /* Cor de fundo fixa */
    border-radius: 50%; width: 40px; height: 40px; 
    display: flex; align-items: center; justify-content: center; 
    color: rgba(255,255,255,0.9) !important; /* Cor do ícone fixa */
    border: none;
    z-index: 201;
}
.btn-close-floating:active { background: rgba(255,255,255,0.2) !important; }

/* Alert Box */
.alert-box { background: #16161a; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; padding: 24px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.alert-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; width: 100%; }
.option-row { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.03); padding: 12px 16px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.radio-custom { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #52525b; position: relative; }
.option-row input:checked + .radio-custom { border-color: var(--primary-color); background: var(--primary-color); }
.btn-danger-filled { background: rgba(239, 68, 68, 0.15); color: #fca5a5; padding: 12px; border-radius: 100px; flex: 1; font-weight: 600; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.btn-text-danger { background: none; border: none; color: var(--danger-color); font-size: 0.9rem; padding: 20px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; opacity: 0.7; margin-top: 10px; }

/* Navegação */
.tab-bar { position: fixed; bottom: 0; left: 0; width: 100%; height: var(--nav-height); background: rgba(10, 10, 12, 0.95); border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; padding: 0 10px; padding-bottom: env(safe-area-inset-bottom); z-index: 50; backdrop-filter: blur(10px); }
.tab-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #52525b; flex: 1; height: 100%; padding-top: 8px; background: transparent; }
.tab-btn span.material-symbols-rounded { font-size: 26px; }
.tab-label { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.tab-btn.active { color: var(--text-main); }
.tab-btn.active span { color: var(--primary-color); text-shadow: 0 0 12px rgba(167, 139, 250, 0.5); transform: translateY(-2px); }

/* Fundo */
.space-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: -1; background: linear-gradient(to bottom, #050507 0%, #101015 100%); }
.stars-small { width: 1px; height: 1px; background: transparent; box-shadow: 10vw 10vh #fff, 20vw 80vh #fff, 30vw 30vh #fff, 40vw 50vh #fff, 50vw 90vh #fff, 60vw 20vh #fff, 70vw 60vh #fff, 80vw 10vh #fff, 90vw 40vh #fff, 15vw 95vh #fff, 55vw 15vh #fff, 85vw 75vh #fff; animation: space-drift 60s linear infinite; }
.stars-medium { width: 2px; height: 2px; background: transparent; box-shadow: 15vw 15vh rgba(255,255,255,0.5), 35vw 85vh rgba(255,255,255,0.5), 65vw 35vh rgba(255,255,255,0.5), 85vw 65vh rgba(255,255,255,0.5); animation: space-drift 100s linear infinite; }
@keyframes space-drift { from { transform: translateY(0); } to { transform: translateY(-2000px); } }
.comet { position: absolute; width: 120px; height: 1px; background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.6)); box-shadow: 0 0 10px 1px rgba(255, 255, 255, 0.3); border-radius: 0 50% 50% 0; left: -150px; top: 0; transform: rotate(45deg); opacity: 0; z-index: 1; pointer-events: none; }
@keyframes shoot { 0% { transform: translate(0, 0) rotate(45deg); opacity: 0; } 5% { opacity: 1; } 20% { transform: translate(calc(100vw + 150px), calc(100vh + 150px)) rotate(45deg); opacity: 0; } 100% { transform: translate(calc(100vw + 150px), calc(100vh + 150px)) rotate(45deg); opacity: 0; } }
.c1 { top: -5%; animation: shoot 25s infinite linear; animation-delay: 5s; }
.c2 { top: 30%; left: -200px; animation: shoot 40s infinite linear; animation-delay: 20s; }
.c3 { top: 60%; left: -200px; animation: shoot 55s infinite linear; animation-delay: 35s; }
@keyframes pulse-animation { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(167, 139, 250, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(167, 139, 250, 0); } }

/* Toast */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px); background: rgba(20, 20, 25, 0.95); backdrop-filter: blur(10px); border: 1px solid rgba(167, 139, 250, 0.3); border-radius: 50px; padding: 12px 24px; display: flex; align-items: center; gap: 10px; z-index: 1000; opacity: 0; pointer-events: none; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 10px 30px rgba(0,0,0,0.5); width: max-content; }
.toast span.material-symbols-rounded { color: var(--primary-color); font-size: 20px; }
.toast span#toast-message { font-size: 0.9rem; font-weight: 500; color: white; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.btn-close-subtle { position: absolute; top: 12px; right: 12px; color: rgba(255,255,255,0.4); padding: 8px; border-radius: 50%; }