/* ==========================================================================
   ARCHIVAULT 3D - CSS PURO COMPLETO
   Tema Cyberpunk com substituição total do Tailwind
   ========================================================================== */

/* --------------------------------------
   VARIÁVEIS GLOBAIS
-------------------------------------- */
:root {
    --emerald: #00ff88;
    --emerald-dark: #00aa5b;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-900: #064e3b;

    --cyan-200: #a5f3fc;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --cyan-700: #0e7490;
    --cyan-800: #155e75;
    --cyan-900: #164e63;

    --yellow-400: #facc15;
    --yellow-500: #eab308;
    --yellow-600: #ca8a04;
    --yellow-700: #a16207;
    --yellow-900: #713f12;

    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;

    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-900: #581c87;

    --indigo-600: #4f46e5;

    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;

    --panel-bg: rgba(5, 12, 8, 0.85);
    --panel-border: rgba(0, 255, 136, 0.4);
    --glow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* --------------------------------------
   RESET & BASE
-------------------------------------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: #020508;
    font-family: 'Rajdhani', 'Inter', sans-serif;
    user-select: none;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* --------------------------------------
   UTILITÁRIOS DE LAYOUT (substituto Tailwind)
-------------------------------------- */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.absolute { position: absolute; }
.relative { position: relative; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) {
    .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Dimensões */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-max { width: max-content; }
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-40 { width: 10rem; }
.w-48 { width: 12rem; }
.w-56 { width: 14rem; }
.w-64 { width: 16rem; }
.w-80 { width: 20rem; }
.w-96 { width: 24rem; }

.h-full { height: 100%; }
.h-auto { height: auto; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.h-48 { height: 12rem; }
.h-56 { height: 14rem; }
.h-64 { height: 16rem; }
.h-80 { height: 20rem; }
.h-96 { height: 24rem; }

.min-w-0 { min-width: 0px; }
.min-w-full { min-width: 100%; }
.max-w-full { max-width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }

/* Margens e paddings */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.m-5 { margin: 1.25rem; }
.m-6 { margin: 1.5rem; }
.m-8 { margin: 2rem; }
.m-auto { margin: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-auto { margin-top: auto; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.ml-auto { margin-left: auto; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.mr-auto { margin-right: auto; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }

.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-6 { padding-top: 1.5rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-5 { padding-bottom: 1.25rem; }
.pb-6 { padding-bottom: 1.5rem; }

/* Texto */
.font-mono { font-family: 'JetBrains Mono', monospace; }
.title-orbitron { font-family: 'Orbitron', sans-serif; text-transform: uppercase; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.italic { font-style: italic; }
.not-italic { font-style: normal; }

.tracking-widest { letter-spacing: 0.1em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-normal { letter-spacing: 0; }

/* Cores de texto */
.text-emerald-400 { color: var(--emerald-400); }
.text-emerald-500 { color: var(--emerald-500); }
.text-emerald-600 { color: var(--emerald-600); }
.text-cyan-400 { color: var(--cyan-400); }
.text-cyan-500 { color: var(--cyan-500); }
.text-cyan-600 { color: var(--cyan-600); }
.text-yellow-400 { color: var(--yellow-400); }
.text-yellow-500 { color: var(--yellow-500); }
.text-yellow-600 { color: var(--yellow-600); }
.text-red-400 { color: var(--red-400); }
.text-red-500 { color: var(--red-500); }
.text-red-600 { color: var(--red-600); }
.text-purple-400 { color: var(--purple-400); }
.text-purple-500 { color: var(--purple-500); }
.text-gray-200 { color: var(--gray-200); }
.text-gray-300 { color: var(--gray-300); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-900 { color: var(--gray-900); }
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-emerald { color: var(--emerald); }
.text-cyan { color: var(--cyan-400); }
.text-yellow { color: var(--yellow-500); }
.text-red-500\/50 { color: rgba(239, 68, 68, 0.5); }
.text-\[\#020502\] { color: #020502; }

/* Fundos */
.bg-transparent { background: transparent; }
.bg-black { background-color: #000000; }
.bg-white { background-color: #ffffff; }
.bg-gray-900 { background-color: var(--gray-900); }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-600 { background-color: #4b5563; }
.bg-emerald-400 { background-color: var(--emerald-400); }
.bg-emerald-500 { background-color: var(--emerald-500); }
.bg-emerald-600 { background-color: var(--emerald-600); }
.bg-emerald-800 { background-color: #065f46; }
.bg-cyan-400 { background-color: var(--cyan-400); }
.bg-cyan-500 { background-color: var(--cyan-500); }
.bg-cyan-600 { background-color: var(--cyan-600); }
.bg-yellow-400 { background-color: var(--yellow-400); }
.bg-yellow-500 { background-color: var(--yellow-500); }
.bg-yellow-600 { background-color: var(--yellow-600); }
.bg-red-400 { background-color: var(--red-400); }
.bg-red-500 { background-color: var(--red-500); }
.bg-red-600 { background-color: var(--red-600); }
.bg-purple-400 { background-color: var(--purple-400); }
.bg-purple-500 { background-color: var(--purple-500); }
.bg-indigo-600 { background-color: var(--indigo-600); }

.bg-black\/90 { background-color: rgba(0, 0, 0, 0.9); }
.bg-black\/80 { background-color: rgba(0, 0, 0, 0.8); }
.bg-black\/60 { background-color: rgba(0, 0, 0, 0.6); }
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.4); }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-emerald-900\/20 { background-color: rgba(6, 78, 59, 0.2); }
.bg-emerald-900\/30 { background-color: rgba(6, 78, 59, 0.3); }
.bg-yellow-900\/20 { background-color: rgba(113, 63, 18, 0.2); }
.bg-cyan-900\/20 { background-color: rgba(22, 78, 99, 0.2); }
.bg-red-500\/50 { background-color: rgba(239, 68, 68, 0.5); }

/* Bordas */
.border { border-width: 1px; border-style: solid; }
.border-0 { border-width: 0; }
.border-2 { border-width: 2px; }
.border-4 { border-width: 4px; }
.border-l-4 { border-left-width: 4px; }

.border-transparent { border-color: transparent; }
.border-emerald-500 { border-color: var(--emerald-500); }
.border-emerald-400 { border-color: var(--emerald-400); }
.border-emerald-900 { border-color: var(--emerald-900); }
.border-cyan-500 { border-color: var(--cyan-500); }
.border-cyan-400 { border-color: var(--cyan-400); }
.border-yellow-500 { border-color: var(--yellow-500); }
.border-yellow-400 { border-color: var(--yellow-400); }
.border-red-500 { border-color: var(--red-500); }
.border-red-400 { border-color: var(--red-400); }
.border-purple-500 { border-color: var(--purple-500); }
.border-gray-600 { border-color: var(--gray-600); }
.border-gray-700 { border-color: var(--gray-700); }
.border-white { border-color: #ffffff; }
.border-white\/50 { border-color: rgba(255, 255, 255, 0.5); }

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 0.125rem; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Sombras e efeitos */
.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-inner { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06); }
.shadow-none { box-shadow: none; }

.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.backdrop-blur-lg { backdrop-filter: blur(16px); }
.backdrop-blur-xl { backdrop-filter: blur(24px); }

/* Transições e transformações */
.transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }
.scale-105 { transform: scale(1.05); }
.scale-110 { transform: scale(1.1); }
.rotate-45 { transform: rotate(45deg); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.translate-x-1\/2 { transform: translateX(50%); }
.translate-y-1\/2 { transform: translateY(50%); }

/* Cursor e eventos */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-grab { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* Overflow e visibilidade */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-hidden { overflow-y: hidden; }
.overflow-x-hidden { overflow-x: hidden; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Z-index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-auto { z-index: auto; }

/* Opacidade */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Animações */
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-bounce { animation: bounce 1s infinite; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

/* Fill para SVG */
.fill-current { fill: currentColor; }
.fill-yellow-400 { fill: var(--yellow-400); }
.fill-emerald-400 { fill: var(--emerald-400); }
.fill-white { fill: #ffffff; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.25);
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 136, 0.15);
}

/* --------------------------------------
   COMPONENTES GLOBAIS
-------------------------------------- */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid var(--panel-border);
    border-left: 4px solid var(--emerald);
    box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: #d0d0d0;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
    border-top-right-radius: 8px;
}

.btn-circuit {
    background: linear-gradient(135deg, #0a1f0a 0%, #0d2b0d 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #c0d0c0;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.25s;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.btn-circuit:hover {
    background: linear-gradient(135deg, #0d2b0d 0%, #0f3b0f 100%);
    border-color: #00ff88;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.25);
}

.clip-path-button {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

/* --------------------------------------
   UI LAYER
-------------------------------------- */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    box-sizing: border-box;
    z-index: 10;
}

#editor-ui,
#tv-console-menu {
    user-select: text;
}

/* --------------------------------------
   HOTBAR
-------------------------------------- */
.hotbar-container {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(4, 10, 6, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(0, 255, 136, 0.05);
    pointer-events: auto;
}

.hotbar-slot {
    width: 48px;
    height: 48px;
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 136, 0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a7a6a;
    cursor: pointer;
    transition: all 0.2s;
}

.hotbar-slot:hover {
    border-color: rgba(0, 255, 136, 0.5);
    color: var(--emerald);
    background: rgba(0, 255, 136, 0.05);
    transform: translateY(-2px);
}

.hotbar-slot.active {
    border-color: var(--emerald);
    color: var(--emerald);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3) inset, 0 0 8px rgba(0, 255, 136, 0.2);
}

.hotbar-slot.cargo-slot.active {
    border-color: #eab308;
    color: #eab308;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.3) inset, 0 0 8px rgba(234, 179, 8, 0.2);
}

.hotbar-key {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: bold;
    color: #888;
    text-shadow: 1px 1px 0 #000;
}

/* --------------------------------------
   SCANNER INFO
-------------------------------------- */
.scanner-info {
    padding: 1rem;
    width: 16rem;
    transition: opacity 0.3s;
    pointer-events: auto;
}

.scanner-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.scanner-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--emerald-400);
    animation: pulse 2s infinite;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.8);
}

.scanner-label {
    font-size: 0.75rem;
    color: var(--emerald-400);
    letter-spacing: 0.15em;
    border-bottom: 1px solid rgba(52, 211, 153, 0.3);
    width: 100%;
    padding-bottom: 0.25rem;
}

.scanner-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.scanner-floor {
    font-size: 0.75rem;
    color: var(--emerald-400);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.scanner-words {
    font-size: 0.75rem;
    color: rgba(167, 243, 208, 0.6);
    margin-bottom: 0.75rem;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tag-container span,
#note-tags span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    height: auto;
    width: auto;
    min-width: 60px;
}

div#note-tags {
    width: auto;
    height: auto;
    min-height: 40px;
}

/* --------------------------------------
   MINIMAP
-------------------------------------- */
.minimap-wrapper {
    display: none;
}
@media (min-width: 768px) {
    .minimap-wrapper {
        display: block;
        position: absolute;
        bottom: 24px;
        right: 24px;
        width: 160px;
        height: 160px;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid rgba(0, 255, 136, 0.4);
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.1), inset 0 0 15px rgba(0, 255, 136, 0.1);
        background: radial-gradient(circle, rgba(0, 20, 10, 0.85) 0%, rgba(2, 5, 2, 0.95) 100%);
        pointer-events: auto;
    }
}

#minimap-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 3;
}

.minimap-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 10px solid #00ff88;
    filter: drop-shadow(0 0 5px #00ff88);
    pointer-events: none;
    z-index: 4;
}

/* --------------------------------------
   SYS MENU
-------------------------------------- */
.sys-menu-wrapper {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    pointer-events: auto;
    z-index: 40;
    transition: all 0.3s;
}

.sys-menu-panel {
    padding: 1.5rem;
    min-width: 280px;
}

.sys-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(6, 78, 59, 0.5);
    padding-bottom: 0.75rem;
}

.sys-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sys-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--emerald-400);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.8);
}

.sys-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--emerald-400);
    letter-spacing: 0.2em;
}

.btn-icon {
    color: var(--gray-500);
    padding: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--emerald-400);
}

.sys-version {
    font-size: 10px;
    color: var(--emerald-600);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(6, 78, 59, 0.2);
    padding-bottom: 0.5rem;
}

.sys-controls {
    font-size: 0.875rem;
    color: var(--gray-300);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.control-row {
    display: flex;
    justify-content: space-between;
}

.control-label {
    letter-spacing: 0.1em;
}

.control-key {
    color: white;
    font-weight: 700;
}

.sys-architect-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(6, 78, 59, 0.3);
    margin-bottom: 1.5rem;
    text-align: center;
}

.sys-architect-text {
    font-size: 0.75rem;
    color: var(--emerald-400);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.sys-architect-key {
    color: white;
}

.sys-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-sys-action {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    cursor: pointer;
}

/* --------------------------------------
   BAG MENU (Carga)
-------------------------------------- */
.bag-menu-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1.5rem;
    pointer-events: auto;
    z-index: 40;
    border: 1px solid var(--yellow-500);
    box-shadow: 0 0 50px rgba(234, 179, 8, 0.15);
}

.bag-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(113, 63, 18, 0.5);
    padding-bottom: 0.75rem;
}

.bag-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bag-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--yellow-500);
    letter-spacing: 0.1em;
}

.bag-slots {
    display: flex;
    gap: 1rem;
}

.bag-slot {
    width: 6rem;
    height: 6rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(113, 63, 18, 0.5);
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bag-slot-active {
    color: var(--gray-600);
    cursor: pointer;
}

.bag-slot-active:hover {
    border-color: var(--yellow-500);
    background: rgba(113, 63, 18, 0.2);
}

.bag-slot-empty {
    color: var(--gray-700);
}

.slot-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--cyan-500);
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

.slot-empty-text {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.5;
}

.bag-footer {
    font-size: 10px;
    color: var(--yellow-700);
    margin-top: 1rem;
    text-align: center;
}

/* --------------------------------------
   BUILD MENU
-------------------------------------- */
.build-menu-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2.5rem;
    text-align: center;
    pointer-events: auto;
    border: 1px solid var(--emerald-400);
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.3);
}

.build-animation {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem auto;
    position: relative;
}

.build-ring {
    width: 100%;
    height: 100%;
    border: 4px solid var(--emerald-400);
    border-radius: 0.25rem;
    opacity: 0.7;
    transform: rotate(45deg);
    animation: pulse 2s infinite, spin 3s linear infinite;
}

.build-core {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.build-core-dot {
    width: 0.75rem;
    height: 0.75rem;
    background-color: var(--emerald-400);
    border-radius: 0.25rem;
    box-shadow: 0 0 15px rgba(0, 255, 136, 1);
}

.build-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: 0.3em;
}

.build-desc {
    font-size: 0.875rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.build-actions {
    display: flex;
    gap: 1rem;
}

.btn-build-confirm {
    background-color: var(--emerald-900);
    color: var(--gray-400);
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    width: 100%;
    border: 1px solid var(--emerald-900);
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-build-confirm:hover {
    background-color: var(--emerald-400);
}

.btn-build-cancel {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--emerald-900);
    color: var(--gray-400);
    width: 100%;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-build-cancel:hover {
    background-color: var(--emerald-400);
}

/* --------------------------------------
   HANGAR MENU
-------------------------------------- */
.hangar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 40;
}

.hangar-panel {
    width: 100%;
    max-width: 64rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
    background: transparent;
}

.hangar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    width: 100%;
    border-bottom: 1px solid rgba(6, 78, 59, 0.5);
    padding-bottom: 1rem;
}

.hangar-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.2em;
}

.btn-close-hangar {
    margin-left: auto;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--emerald-900);
    color: var(--emerald-500);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    background: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-close-hangar:hover {
    background: rgba(6, 78, 59, 0.3);
}

.hangar-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
}
@media (min-width: 768px) {
    .hangar-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.ship-card {
    background: rgba(10, 20, 15, 0.6);
    border: 2px solid rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ship-card:hover {
    border-color: rgba(0, 255, 136, 0.6);
    transform: translateY(-5px);
    background: rgba(20, 40, 25, 0.7);
}

.ship-card.active {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3) inset;
}

.ship-icon-wrap {
    width: 6rem;
    height: 6rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-900);
}

.ship-1-icon {
    border: 1px solid var(--gray-600);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.ship-2-icon {
    border: 1px solid var(--cyan-800);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.ship-3-icon {
    border: 1px solid var(--cyan-700);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.ship-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
    letter-spacing: 0.1em;
}

.ship-desc {
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

/* --------------------------------------
   PROMPTS (Dock, Hangar, TV)
-------------------------------------- */
.prompt-wrapper {
    position: absolute;
    bottom: 7rem;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    display: flex;
    gap: 1rem;
}

.prompt-box {
    padding: 0.75rem 2rem;
    border-radius: 0.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    animation: bounce 1s infinite;
}

.prompt-dock {
    background-color: var(--emerald-500);
    color: black;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.8);
}

.prompt-hangar {
    background-color: var(--indigo-600);
    color: white;
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.8);
}

.prompt-tv-console {
    background-color: var(--cyan-500);
    color: black;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
}

.prompt-tv-close {
    background-color: var(--red-500);
    color: white;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
}

.prompt-key {
    font-size: 0.875rem;
}

/* --------------------------------------
   SEARCH MODAL
-------------------------------------- */
.search-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 50;
}

.search-panel {
    width: 100%;
    max-width: 28rem;
    padding: 1.5rem;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(52, 211, 153, 0.3);
    color: white;
    width: 100%;
    padding: 0.5rem;
    outline: none;
}

.search-input:focus {
    border-bottom-color: var(--emerald-400);
}

.search-results {
    max-height: 15rem;
    overflow-y: auto;
    color: var(--gray-300);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
}

.search-footer {
    font-size: 10px;
    color: var(--emerald-600);
    margin-top: 0.5rem;
}

/* --------------------------------------
   TV CONSOLE
-------------------------------------- */
.tv-console-wrapper {
    position: absolute;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    width: 20rem;
    padding: 1.25rem;
    pointer-events: auto;
    z-index: 60;
    border: 1px solid var(--cyan-500);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
    transition: all 0.3s;
}

.tv-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--cyan-400);
    font-weight: 700;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(22, 78, 99, 0.5);
    padding-bottom: 0.75rem;
}

.tv-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon-tv {
    color: var(--cyan-600);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-icon-tv:hover {
    color: var(--red-400);
}

.tv-status {
    font-size: 10px;
    color: var(--cyan-700);
    margin-bottom: 0.75rem;
    text-align: center;
}

.tv-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    color: var(--cyan-200);
    outline: none;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.tv-input:focus {
    border-color: var(--cyan-400);
}

.tv-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.btn-tv-action {
    font-size: 11px;
    padding: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
    letter-spacing: 0.1em;
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-tv-video {
    background: rgba(22, 78, 99, 0.2);
    border: 1px solid var(--cyan-500);
    color: var(--cyan-400);
}

.btn-tv-video:hover {
    background: var(--cyan-500);
    color: black;
}

.btn-tv-web {
    background: rgba(88, 28, 135, 0.2);
    border: 1px solid var(--purple-500);
    color: var(--purple-400);
}

.btn-tv-web:hover {
    background: var(--purple-500);
    color: black;
}

/* --------------------------------------
   EDITOR UI (Notion-like)
-------------------------------------- */
.editor-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 50;
}

.editor-panel {
    width: 100%;
    max-width: 64rem;
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 0 80px rgba(0, 255, 136, 0.2);
    border: 1px solid var(--emerald-500);
    position: relative;
}

.btn-editor-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.25rem;
    color: var(--emerald-600);
    border-radius: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 60;
}

.btn-editor-close:hover {
    color: var(--emerald-400);
    background: rgba(6, 78, 59, 0.3);
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(6, 78, 59, 0.5);
    padding-bottom: 1rem;
    padding-right: 3rem;
}

.editor-title-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
    margin-right: 1.5rem;
}

.editor-status-dot {
    width: 1rem;
    height: 1rem;
    background-color: var(--emerald-400);
    animation: pulse 2s infinite;
    box-shadow: 0 0 15px var(--emerald-400);
}

.editor-title-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(52, 211, 153, 0.3);
    color: white;
    font-size: 1.875rem;
    font-weight: 700;
    width: 100%;
    padding-bottom: 0.5rem;
    outline: none;
}

.editor-title-input:focus {
    border-bottom-color: var(--emerald-400);
}

.editor-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-tool {
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-fav {
    color: var(--yellow-500);
    border: 1px solid var(--yellow-500);
}

.btn-fav:hover {
    background: var(--yellow-500);
    color: black;
}

.btn-fav-active {
    background-color: var(--yellow-500) !important;
    color: #000000 !important;
    border-color: var(--yellow-500) !important;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.4);
}

.btn-export {
    color: var(--emerald-400);
    border: 1px solid var(--emerald-400);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.btn-export:hover {
    background: var(--emerald-400);
    color: black;
}

.switch-toggle {
    position: relative;
    width: 140px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.switch-indicator {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 66px;
    height: 30px;
    background: #00ff88;
    border-radius: 15px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), background-color 0.3s ease;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
}

.switch-text {
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: white;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.mode-view .switch-indicator {
    transform: translateX(68px);
    background: #00f0ff;
    box-shadow: 0 2px 8px rgba(0, 240, 255, 0.4);
}

.mode-view {
    border-color: rgba(0, 240, 255, 0.4);
}

.switch-text-active {
    color: #020502 !important;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(6, 78, 59, 0.5);
    transition: opacity 0.3s;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-label {
    font-size: 0.75rem;
    color: var(--emerald-600);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.color-picker-wrap {
    display: flex;
    gap: 0.75rem;
}

.btn-add-floor {
    color: black;
    background-color: var(--emerald-500);
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-add-floor:hover {
    background-color: var(--emerald-400);
}

.blocks-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 1rem;
    font-size: 0.875rem;
    color: var(--gray-200);
    padding-bottom: 60px;
}

.block-palette {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 1rem;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
    z-index: 20;
    width: max-content;
    max-width: 90%;
}

.palette-btn {
    background: transparent;
    border: 1px solid rgba(52, 211, 153, 0.5);
    color: var(--emerald-400);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.palette-btn:hover {
    background: var(--emerald-400);
    color: black;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(6, 78, 59, 0.5);
    background-color: #020502;
    z-index: 10;
    position: relative;
    transition: opacity 0.3s;
}

.btn-delete-floor {
    padding: 0.75rem 2rem;
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: var(--red-400);
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-floor:hover {
    background-color: var(--red-600);
    color: white;
}

.footer-actions {
    display: flex;
    gap: 1rem;
}

.btn-editor-cancel {
    padding: 0.75rem 2rem;
    color: var(--emerald-600);
    border: 1px solid transparent;
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-editor-cancel:hover {
    color: var(--emerald-400);
    border-color: var(--emerald-900);
}

.btn-editor-save {
    padding: 0.75rem 2.5rem;
    background-color: var(--emerald-600);
    color: black;
    font-weight: 700;
    letter-spacing: 0.2em;
    font-size: 0.875rem;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-editor-save:hover {
    background-color: var(--emerald-400);
}

/* --------------------------------------
   BLOCK EDITOR (estilos específicos)
-------------------------------------- */
.block-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 255, 136, 0.1);
    padding: 10px 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.block-row:hover {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.block-row.dragging {
    opacity: 0.5;
    border-color: #00ff88;
    transform: scale(0.98);
}

.drag-handle {
    cursor: grab;
    color: rgba(255, 255, 255, 0.2);
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.2);
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle:hover {
    color: var(--emerald) !important;
    background: rgba(0, 255, 136, 0.1);
}

.block-content {
    flex-grow: 1;
    min-width: 0;
}

.block-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: #d0d0d0;
    padding: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    resize: none;
    outline: none;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
    pointer-events: auto;
}

.block-input:focus {
    border-color: #00ff88;
    box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.1);
    background: rgba(0, 0, 0, 0.6);
}

.view-media {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.kanban-board {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.kanban-col {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 6px;
    padding: 8px;
}

.kanban-header {
    font-weight: bold;
    color: #00ff88;
    margin-bottom: 8px;
    font-size: 12px;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    padding-bottom: 6px;
}

.btn-delete-block {
    background: transparent;
    border: none;
    color: rgba(239, 68, 68, 0.5);
    cursor: pointer;
    transition: color 0.2s;
    padding: 2px;
}

.btn-delete-block:hover {
    color: var(--red-400);
}

/* --------------------------------------
   MARKDOWN PROSE (visualização)
-------------------------------------- */
.markdown-prose {
    max-width: 800px;
    margin: 0 auto;
    color: #d0d0d0;
    line-height: 1.7;
    font-family: 'Rajdhani', 'Inter', sans-serif;
    font-size: 16px;
    padding: 0.5rem;
}

.markdown-prose h1,
.markdown-prose h2,
.markdown-prose h3,
.markdown-prose h4 {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    text-transform: uppercase;
}

.markdown-prose h1 {
    font-size: 1.8em;
    color: var(--emerald);
    border-bottom: 2px solid rgba(0, 255, 136, 0.3);
    padding-bottom: 0.2em;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.markdown-prose h2 {
    font-size: 1.5em;
    color: var(--emerald-dark);
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    padding-bottom: 4px;
}

.markdown-prose h3 {
    font-size: 1.25em;
    color: #cccccc;
}

.markdown-prose p {
    margin-bottom: 1em;
}

.markdown-prose a {
    color: var(--emerald);
    text-decoration: none;
    border-bottom: 1px dashed var(--emerald);
    transition: all 0.2s;
}

.markdown-prose a:hover {
    color: #fff;
    background: rgba(0, 255, 136, 0.2);
}

.markdown-prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
    color: #b0b0b0;
}

.markdown-prose ol {
    list-style-type: decimal;
    padding-left: 1.5em;
    margin-bottom: 1em;
    color: #b0b0b0;
}

.markdown-prose li {
    margin-bottom: 0.3em;
}

.markdown-prose li::marker {
    color: var(--emerald);
}

.markdown-prose strong {
    color: #fff;
    font-weight: 700;
}

.markdown-prose em {
    color: #aaa;
    font-style: italic;
}

.markdown-prose blockquote {
    border-left: 4px solid var(--emerald);
    padding: 12px 16px;
    color: #a0aec0;
    background: rgba(0, 255, 136, 0.05);
    margin-bottom: 1.5em;
    border-radius: 4px;
    font-style: italic;
    box-shadow: inset 2px 0 5px rgba(0, 255, 136, 0.1);
}

.markdown-prose code {
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
    font-family: 'JetBrains Mono', monospace;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.markdown-prose pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1em;
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.markdown-prose pre code {
    background: transparent;
    padding: 0;
    color: #e0e0e0;
    border: none;
    font-size: 0.9em;
    box-shadow: none;
}

.markdown-prose hr {
    border: 0;
    border-top: 1px dashed rgba(0, 255, 136, 0.3);
    margin: 2em 0;
}

/* --------------------------------------
   TOAST NOTIFICATIONS (refinado)
-------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    z-index: 1000;
    width: auto;
    max-width: 360px;
    min-width: 240px;
}

.toast-notification {
    background: rgba(5, 12, 8, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    border-left: 4px solid var(--emerald-500);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 255, 136, 0.2);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e0e0e0;
    transform: translateX(0);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    pointer-events: auto;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    position: relative;
    overflow: hidden;
}

.toast-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.05), transparent);
    pointer-events: none;
}

.toast-success {
    border-left-color: var(--emerald-500);
    color: var(--emerald-400);
    text-shadow: 0 0 2px rgba(0, 255, 136, 0.3);
}

.toast-error {
    border-left-color: var(--red-500);
    color: var(--red-400);
    text-shadow: 0 0 2px rgba(239, 68, 68, 0.3);
}

.toast-notification.toast-hide {
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-notification {
    animation: toastSlideIn 0.25s ease-out forwards;
}

/* --------------------------------------
   STARTUP MODAL
-------------------------------------- */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: auto;
}

.startup-panel {
    padding: 2.5rem;
    max-width: 32rem;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--emerald-500);
    box-shadow: 0 0 80px rgba(0, 255, 136, 0.15);
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.5rem;
    color: var(--emerald-400);
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.8));
}

.spinner-track {
    opacity: 0.25;
}

.spinner-head {
    opacity: 0.75;
}

.startup-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
}

.startup-subtitle {
    color: var(--gray-400);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.startup-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.btn-startup-primary {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    cursor: pointer;
}

.btn-startup-secondary {
    background: rgba(0, 20, 10, 0.5);
    border-color: rgba(6, 78, 59, 0.5);
    color: var(--gray-400);
}

.btn-startup-secondary:hover {
    border-color: var(--emerald-400);
    color: white;
}

/* --------------------------------------
   MEDIA QUERIES (responsividade)
-------------------------------------- */
@media (max-width: 768px) {
    .block-palette {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
        width: 95%;
    }
    .palette-btn {
        font-size: 0.65rem;
        padding: 0.375rem 0.75rem;
    }
    .editor-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .editor-tools {
        justify-content: flex-start;
    }
    .build-actions {
        flex-direction: column;
    }
    .hangar-header {
        flex-wrap: wrap;
    }
    .btn-close-hangar {
        margin-left: 0;
    }
    .toast-container {
        max-width: 280px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* --------------------------------------
   UTILITÁRIOS ADICIONAIS (JS dinâmico)
-------------------------------------- */
.auto-resize {
    overflow: hidden;
}

.absolute.bg-black\/90.border.border-emerald-500.p-2.rounded.shadow.z-50 {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--emerald-500);
    padding: 0.5rem;
    border-radius: 0.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.block.w-full.text-left.px-2.py-1.hover\:bg-emerald-900\/30.text-emerald-400.text-xs {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.25rem 0.5rem;
    transition: background-color 0.15s;
}

.block.w-full.text-left.px-2.py-1.hover\:bg-emerald-900\/30.text-emerald-400.text-xs:hover {
    background-color: rgba(6, 78, 59, 0.3);
}