/* --- MOTOR DE TRADUCCIÓN NATIVA (NÚCLEO) --- */
html[lang="es"] .lang-en { display: none !important; }
html[lang="en"] .lang-es { display: none !important; }

:root { --bg-deep: #0a0510; --glass: rgba(15, 20, 30, 0.7); }
body { background-color: var(--bg-deep); color: white; font-family: 'Inter', sans-serif; overflow-x: hidden; transition: font-size 0.3s ease; }
.font-display { font-family: 'Space Grotesk', sans-serif; }

::-webkit-scrollbar { width: 0px; background: transparent; }

.glass-card { background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1); transition: box-shadow 0.4s ease; }
.glass-card:hover { box-shadow: 0 30px 60px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.2); }

.icon-3d-container { background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.8) 100%); box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.8), -4px -4px 10px rgba(255, 255, 255, 0.03), inset 1px 1px 2px rgba(255, 255, 255, 0.1), inset -1px -1px 2px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); position: relative; overflow: hidden; }
.icon-3d-container::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent); transform: skewX(-20deg); animation: shine 6s infinite; }
@keyframes shine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

.text-3d-metallic { background: linear-gradient(to bottom, #ffffff 0%, #a1a1aa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0px 4px 4px rgba(0,0,0,0.6)); }
.text-3d-gold { 
    background: linear-gradient(to bottom, #fef08a 0%, #eab308 50%, #a16207 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.8)); 
}
.real-crypto-logo { filter: drop-shadow(0px 5px 8px rgba(0,0,0,0.6)); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.real-crypto-logo:hover { transform: scale(1.15) rotate(5deg); }

.emulator-card { background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 16px; padding: 24px; margin-top: 20px; margin-bottom: 40px; box-shadow: inset 0 0 20px rgba(0,0,0,0.8); position: relative; overflow: hidden; }
.emulator-card::before { position: absolute; top: 0; right: 0; background: rgba(59, 130, 246, 0.2); color: #60a5fa; font-size: 10px; font-weight: bold; padding: 4px 12px; border-bottom-left-radius: 12px; letter-spacing: 1px; z-index: 20; }
html[lang="es"] .emulator-card::before { content: 'SIMULADOR'; }
html[lang="en"] .emulator-card::before { content: 'EMULATOR'; }

.data-grid-bg {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
}
.hud-border {
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(59, 130, 246, 0.1);
}
@keyframes scanline-laser { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.hud-scanner { position: absolute; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, #06b6d4, transparent); box-shadow: 0 0 10px #06b6d4; animation: scanline-laser 3s linear infinite; pointer-events: none; z-index: 0; opacity: 0.3; }
.emulator-card > * { position: relative; z-index: 10; }

.wallet-sidebar { position: fixed; top: 0; bottom: 0; width: 100%; max-width: 450px; background: rgba(10, 10, 15, 0.95); backdrop-filter: blur(25px); z-index: 100; display: flex; flex-direction: column; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
.wallet-sidebar-left { left: 0; transform: translateX(-100%); border-right: 1px solid rgba(59, 130, 246, 0.3); box-shadow: 20px 0 50px rgba(0,0,0,0.8); }
.wallet-sidebar-left.open { transform: translateX(0); }

.wallet-sidebar-right { right: 0; transform: translateX(100%); border-left: 1px solid rgba(16, 185, 129, 0.3); box-shadow: -20px 0 50px rgba(0,0,0,0.8); }
.wallet-sidebar-right.open { transform: translateX(0); }

.btn-sidebar-toggle-left { position: fixed; left: 0; top: 35%; transform: translateY(-50%); background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); color: white; padding: 16px 12px; border-top-right-radius: 16px; border-bottom-right-radius: 16px; cursor: pointer; z-index: 90; box-shadow: 5px 0 20px rgba(37, 99, 235, 0.4); border: 1px solid rgba(255,255,255,0.2); border-left: none; transition: 0.3s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.btn-sidebar-toggle-left:hover { padding-left: 20px; box-shadow: 10px 0 30px rgba(37, 99, 235, 0.6); }
.btn-sidebar-toggle-left span { writing-mode: vertical-rl; transform: rotate(180deg); text-orientation: mixed; font-size: 10px; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; }

.btn-sidebar-toggle-right { position: fixed; right: 0; top: 65%; transform: translateY(-50%); background: linear-gradient(135deg, #10b981 0%, #047857 100%); color: white; padding: 16px 12px; border-top-left-radius: 16px; border-bottom-left-radius: 16px; cursor: pointer; z-index: 90; box-shadow: -5px 0 20px rgba(16, 185, 129, 0.4); border: 1px solid rgba(255,255,255,0.2); border-right: none; transition: 0.3s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.btn-sidebar-toggle-right:hover { padding-right: 20px; box-shadow: -10px 0 30px rgba(16, 185, 129, 0.6); }
.btn-sidebar-toggle-right span { writing-mode: vertical-rl; text-orientation: mixed; font-size: 10px; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; }

.wallet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 99; display: none; backdrop-filter: blur(3px); }
.wallet-overlay.open { display: block; }

.crypto-list-container::-webkit-scrollbar { width: 6px; }
.crypto-list-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.crypto-list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.w-tab { padding: 10px 4px; font-size: 10px; font-weight: bold; text-align: center; cursor: pointer; border-bottom: 2px solid transparent; color: #6b7280; transition: 0.3s; text-transform: uppercase; letter-spacing: 1px; }
.w-tab-a.active { color: #60a5fa; border-bottom-color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.w-tab-b.active { color: #34d399; border-bottom-color: #10b981; background: rgba(16, 185, 129, 0.1); }

.w-pane { display: none; flex: 1; overflow-y: auto; padding: 20px; }
.w-pane.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.gas-fee-warning { background: rgba(245, 158, 11, 0.1); border-left: 4px solid #f59e0b; padding: 8px 12px; font-size: 11px; margin-bottom: 12px; color: #fcd34d; }
.tx-history-item { border-left: 2px solid transparent; padding-left: 12px; margin-bottom: 16px; position: relative; }
.tx-history-item::before { content: ''; position: absolute; left: -5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; }
.tx-success { border-color: #10b981; } .tx-success::before { background: #10b981; box-shadow: 0 0 8px #10b981; }
.tx-failed { border-color: #ef4444; } .tx-failed::before { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.tx-receive { border-color: #3b82f6; } .tx-receive::before { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }

.terminal-bg { background: #050505; border: 1px solid #333; border-radius: 12px; font-family: monospace; color: #4ade80; position: relative; overflow: hidden; }
.terminal-bg::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(59, 130, 246, 0.5); box-shadow: 0 0 10px #3b82f6; }

.protected-text { user-select: none; -webkit-user-select: none; }
.ebook-text { font-size: 1.05rem; line-height: 1.8; color: #d1d5db; padding: 20px; background: rgba(0,0,0,0.3); border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 2rem; }
.ebook-text strong { color: #fff; } .ebook-text p { margin-bottom: 1rem; }
.ebook-h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: bold; color: #fff; margin-top: 2.5rem; margin-bottom: 1rem; border-left: 4px solid #3b82f6; padding-left: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.ebook-ul { list-style-type: disc; margin-left: 2rem; margin-bottom: 1.5rem; } .ebook-ul li { margin-bottom: 0.5rem; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in-up { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); } 20%, 40%, 60%, 80% { transform: translateX(6px); } }
.error-shake { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; border-color: #ef4444 !important; box-shadow: 0 0 20px rgba(239, 68, 68, 0.3) !important; }

.result-box { padding: 16px; border-radius: 12px; font-size: 14px; font-weight: bold; margin-top: 20px; display: none; border: 1px solid transparent; line-height: 1.5; }
.res-success { display: block !important; background: rgba(34, 197, 94, 0.15); border-color: #22c55e; color: #4ade80; box-shadow: 0 0 15px rgba(34, 197, 94, 0.1); }
.res-error { display: block !important; background: rgba(239, 68, 68, 0.15); border-color: #ef4444; color: #f87171; }

.badge-chap { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }

.progress-track { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #22c55e); width: 0%; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); }

@media (max-width: 768px) {
    .btn-sidebar-toggle-left { padding: 12px 6px; border-radius: 0 12px 12px 0; }
    .btn-sidebar-toggle-right { padding: 12px 6px; border-radius: 12px 0 0 12px; }
    .btn-sidebar-toggle-left span, .btn-sidebar-toggle-right span { font-size: 9px; letter-spacing: 1px; }
    .ebook-h3 { font-size: 1.25rem; margin-top: 1.5rem; }
    .glass-card { padding: 1.25rem; border-radius: 16px; }
    .emulator-card { padding: 1.25rem; border-radius: 12px; }
    .wallet-sidebar { max-width: 85vw; }
}

img, svg, i { pointer-events: none; -webkit-user-drag: none; }
.allow-click { pointer-events: auto; }

#robot-avatar-master { cursor: grab; }
#robot-avatar-master:active { cursor: grabbing; }

@media print {
    body { display: none !important; } html { background-color: black; }
    html::after { content: "El contenido protegido no puede ser impreso."; color: red; font-family: monospace; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
}

section[id^="cap-"] { scroll-margin-top: 110px; }

@keyframes floatOrganico {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}
.floating-avatar { animation: floatOrganico 3.5s ease-in-out infinite; }

@keyframes pulsoHabla {
    0% { filter: drop-shadow(0 0 5px rgba(34,211,238,0.3)); transform: scale(1); }
    100% { filter: drop-shadow(0 0 20px rgba(34,211,238,0.8)); transform: scale(1.02); }
}
.hablando-avatar { animation: pulsoHabla 0.4s alternate infinite !important; }
