/* --- Chaosverse Global Terminal & Hologram Styles --- */

/* 0. Global Vue Cloak & Font Display Shield */
[v-cloak] {
  display: none !important;
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('../fonts/material-symbols-outlined.woff2') format('woff2');
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  user-select: none;
  vertical-align: middle;
  transform-origin: 50% 50%;
}

.material-symbols-outlined.animate-spin,
.animate-spin.material-symbols-outlined,
.animate-spin .material-symbols-outlined,
.material-symbols-outlined.animate-spin-slow {
  overflow: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform-origin: 50% 50% !important;
}

:root {
  --sci-blue: #00f2ff;
  --sci-blue-glow: rgba(0, 242, 255, 0.3);
  --sci-blue-transparent: rgba(0, 242, 255, 0.05);
  --sci-red: #ff3e3e;
  --sci-red-glow: rgba(255, 62, 62, 0.3);
  --sci-green: #4ade80;
  --sci-purple: #c026d3;
  --sci-purple-glow: rgba(192, 38, 211, 0.3);
}

/* --- Standard Sci-Fi Form Inputs (Guaranteed across Turbo Navigations) --- */
.input-group {
  position: relative;
  width: 100%;
}

.input-field {
  width: 100%;
  padding: 12px 40px 12px 40px !important;
  background: rgba(0, 242, 255, 0.05);
  border: 1px solid rgba(0, 242, 255, 0.2);
  color: #b8e6ff;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
  border-radius: 4px;
}

.input-field::placeholder {
  color: rgba(184, 230, 255, 0.4);
  font-family: 'Inter', sans-serif;
}

.input-field:focus {
  border-color: #00f2ff;
  background: rgba(0, 242, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #0088aa;
  transition: color 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.input-field:focus ~ .input-icon {
  color: #00f2ff;
  text-shadow: 0 0 8px #00f2ff;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #0088aa;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
}

.password-toggle:hover {
  color: #00f2ff;
  text-shadow: 0 0 8px #00f2ff;
}

/* 1. Base Modal Overlay */
.terminal-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* 2. Holographic Card / Border */
.hologram-border {
  position: relative;
  background: rgba(5, 11, 20, 0.95);
  border: 1px solid rgba(0, 242, 255, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.15);
}

.hologram-border-error {
  border-color: rgba(255, 62, 62, 0.4);
  box-shadow: 0 0 30px rgba(255, 62, 62, 0.15);
}

/* 3. Corner Accents (Standardized at 8px) */
.corner-accent {
  position: relative;
}

.corner-accent::before,
.corner-accent::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--sci-blue);
  border-style: solid;
  z-index: 10;
  pointer-events: none;
  transition: all 0.3s ease;
}

.hologram-border-error.corner-accent::before,
.hologram-border-error.corner-accent::after {
  border-color: var(--sci-red);
}

.corner-tl::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.corner-br::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

/* 4. Terminal Message Box */
.terminal-message-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.terminal-message-content {
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.6;
  border-left: 2px solid rgba(0, 242, 255, 0.3);
  padding-left: 1rem;
}

.terminal-message-content b,
.terminal-message-content strong {
  color: #facc15;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.25);
}

.hologram-border-error .terminal-message-content {
  border-left-color: rgba(255, 62, 62, 0.5);
}

/* 5. Styled Terminal Buttons */
.btn-terminal {
  padding: 0.5rem 1.25rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-terminal-primary {
  border-color: rgba(0, 242, 255, 0.4);
  color: var(--sci-blue);
}

.btn-terminal-primary:hover {
  background: rgba(0, 242, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

.btn-terminal-secondary {
  border-color: rgba(255, 62, 62, 0.4);
  color: var(--sci-red, #ff3e3e);
}

.btn-terminal-secondary:hover {
  background: rgba(255, 62, 62, 0.1);
  box-shadow: 0 0 15px rgba(255, 62, 62, 0.2);
}

.btn-terminal-success {
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--sci-green, #4ade80);
}

.btn-terminal-success:hover {
  background: rgba(74, 222, 128, 0.1);
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.2);
}

.btn-terminal-underlink {
  border-color: rgba(250, 204, 21, 0.5);
  color: #facc15;
}

.btn-terminal-underlink:hover {
  background: rgba(250, 204, 21, 0.1);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.25);
}

/* 5.1 Grid Adaptations for Standard Terminal Buttons (Geometrical, Retilinear) */
.btn-terminal-action {
  height: 3rem; /* h-12 to align with standard button grids */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  width: 100%;
  border-radius: 0px !important; /* Retilinear, cantos retos */
}

.btn-terminal-action-sm {
  height: 2.5rem; /* 40px */
}

.btn-terminal-action-icon {
  width: 3rem;
  padding: 0;
  flex-shrink: 0;
}

.btn-terminal-action-icon.btn-terminal-action-sm {
  width: 2.5rem;
}

.btn-terminal-action-auto {
  width: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  flex-shrink: 0;
}

.btn-terminal-action-primary {
  border-color: rgba(0, 242, 255, 0.4);
  color: var(--sci-blue, #00f2ff);
  background: rgba(0, 242, 255, 0.03);
}

.btn-terminal-action-primary:hover:not(:disabled) {
  border-color: rgba(0, 242, 255, 0.8);
  background: rgba(0, 242, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.35), inset 0 0 10px rgba(0, 242, 255, 0.15);
}

.btn-terminal-action-secondary {
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  background: rgba(255, 255, 255, 0.02);
}

.btn-terminal-action-secondary:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15), inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.btn-terminal-action-warning {
  border-color: rgba(250, 204, 21, 0.4);
  color: #facc15;
  background: rgba(250, 204, 21, 0.03);
}

.btn-terminal-action-warning:hover:not(:disabled) {
  border-color: rgba(250, 204, 21, 0.8);
  background: rgba(250, 204, 21, 0.1);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.35), inset 0 0 10px rgba(250, 204, 21, 0.15);
}

.btn-terminal-action-danger {
  border-color: rgba(255, 62, 62, 0.4);
  color: var(--sci-red, #ff3e3e);
  background: rgba(255, 62, 62, 0.03);
}

.btn-terminal-action-danger:hover:not(:disabled) {
  border-color: rgba(255, 62, 62, 0.8);
  background: rgba(255, 62, 62, 0.1);
  box-shadow: 0 0 20px rgba(255, 62, 62, 0.35), inset 0 0 10px rgba(255, 62, 62, 0.15);
}

.btn-terminal-action-success {
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
  background: rgba(74, 222, 128, 0.03);
}

.btn-terminal-action-success:hover:not(:disabled) {
  border-color: rgba(74, 222, 128, 0.8);
  background: rgba(74, 222, 128, 0.1);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.35), inset 0 0 10px rgba(74, 222, 128, 0.15);
}

.btn-terminal-action-indigo {
  border-color: rgba(129, 140, 248, 0.4);
  color: #818cf8;
  background: rgba(129, 140, 248, 0.03);
}

.btn-terminal-action-indigo:hover:not(:disabled) {
  border-color: rgba(129, 140, 248, 0.8);
  background: rgba(129, 140, 248, 0.1);
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.35), inset 0 0 10px rgba(129, 140, 248, 0.15);
}

.btn-terminal-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 5.2 Hold-to-Charge Mechanics */
.btn-terminal-charge-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  pointer-events: none;
  transition: width 50ms linear;
  z-index: 0;
}

.btn-terminal-charge-bar-warning {
  background-color: rgba(250, 204, 21, 0.4);
}

.btn-terminal-charge-bar-primary {
  background-color: rgba(0, 242, 255, 0.4);
}

.btn-terminal-charge-bar-danger {
  background-color: rgba(255, 62, 62, 0.4);
}

/* 5.3 Chargeable Buttons Affordance (Sonar Ripple) */
.btn-chargeable {
  --sonar-color: rgba(0, 242, 255, 0.6);
  --sonar-color-fade: rgba(0, 242, 255, 0);
  position: relative;
}

.btn-terminal-action-warning.btn-chargeable {
  --sonar-color: rgba(250, 204, 21, 0.6);
  --sonar-color-fade: rgba(250, 204, 21, 0);
}

.btn-terminal-action-danger.btn-chargeable {
  --sonar-color: rgba(255, 62, 62, 0.6);
  --sonar-color-fade: rgba(255, 62, 62, 0);
}

/* The ripple element */
.btn-chargeable::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 var(--sonar-color);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.btn-chargeable:hover:not(:disabled)::before {
  opacity: 1;
  animation: sonar-ripple 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
@keyframes sonar-ripple {
  0% { box-shadow: 0 0 0 0 var(--sonar-color); }
  100% { box-shadow: 0 0 0 15px var(--sonar-color-fade); }
}


/* 6. Animations */
@keyframes hologram-scan {
  0% { top: 0; opacity: 0; }
  50% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.terminal-fade-enter-active, .terminal-fade-leave-active {
  transition: all 0.3s ease;
}

.terminal-fade-enter, .terminal-fade-leave-to {
  opacity: 0;
  transform: scale(0.95);
}

/* 7. Item Level Indicators (Common to Inventory/Craft) */
.level-bars {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 2px;
  z-index: 30;
}

.level-bar {
  width: 4px;
  height: 8px;
  background: #ffffff;
  box-shadow: 0 0 8px #fff, 0 0 12px rgba(56, 189, 248, 0.6);
  border-radius: 1px;
}

/* 8. Standardized Mission Colors */
:root {
  --mission-attack: #ff3e3e;
  --mission-transport: #4ade80;
  --mission-espionage: #fcd34d;
  --mission-colonize: #818cf8;
  --mission-deploy: #00f2ff;
}

.mission-bg-attack { background-color: var(--mission-attack) !important; color: #fff !important; }
.mission-bg-transport { background-color: var(--mission-transport) !important; color: #fff !important; }
.mission-bg-espionage { background-color: var(--mission-espionage) !important; color: #fff !important; }
.mission-bg-colonize { background-color: var(--mission-colonize) !important; color: #fff !important; }
.mission-bg-deploy { background-color: var(--mission-deploy) !important; color: #fff !important; }

.mission-text-attack { color: var(--mission-attack) !important; }
.mission-text-transport { color: var(--mission-transport) !important; }
.mission-text-espionage { color: var(--mission-espionage) !important; }
.mission-text-colonize { color: var(--mission-colonize) !important; }
.mission-text-deploy { color: var(--mission-deploy) !important; }
.mission-text-event { color: #d946ef !important; }

.mission-border-attack { border-color: rgba(255, 62, 62, 0.4) !important; background-color: rgba(255, 62, 62, 0.1) !important; }
.mission-border-transport { border-color: rgba(74, 222, 128, 0.4) !important; background-color: rgba(74, 222, 128, 0.1) !important; }
.mission-border-espionage { border-color: rgba(252, 211, 77, 0.4) !important; background-color: rgba(252, 211, 77, 0.1) !important; }
.mission-border-colonize { border-color: rgba(129, 140, 248, 0.4) !important; background-color: rgba(129, 140, 248, 0.1) !important; }
.mission-border-deploy { border-color: rgba(0, 242, 255, 0.4) !important; background-color: rgba(0, 242, 255, 0.1) !important; }
.mission-border-event { border-color: rgba(217, 70, 239, 0.4) !important; background-color: rgba(217, 70, 239, 0.1) !important; }

/* 9. Standardized Item Description & Technical Info */
.item-description-root {
  background: rgba(0, 0, 0, 0.2);
  border-left: 2px solid var(--sci-blue-glow);
  padding: 0.75rem 1rem;
  border-radius: 0 4px 4px 0;
  margin-top: 1rem;
}

.item-description-lore {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  margin-bottom: 0.5rem;
  display: block;
}

.item-description-tech {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sci-blue);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
}

.item-description-tech .material-symbols-outlined {
  font-size: 12px;
}

/* 10. Modern Requirement HUD Styles */
.requirement-row {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.requirement-row:hover {
  background: rgba(56, 189, 248, 0.08) !important;
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(4px);
}

.requirement-row:active {
  transform: scale(0.98) translateX(4px);
}

.requirement-action-hint {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.requirement-row:hover .requirement-action-hint {
  opacity: 1;
  transform: translateX(0);
}

.progress-segment {
  height: 3px;
  border-radius: 9999px;
  transition: all 0.5s ease;
}

.grayscale {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
}

/* --- Layered 3D Keyboard Navigation Buttons --- */
.nav-btn-3d {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  /* The wall color is the background of the base */
  background-color: rgb(15, 23, 42); 
  transition: all 150ms ease-in-out;
  /* Only floor shadow, NO 3D depth shadow */
  box-shadow: 0 8px 10px rgba(0,0,0,0.6); 
  height: 100%;
  /* To ensure the face translation works properly */
  display: block;
}

.nav-btn-3d-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  font-weight: bold;
  color: #94a3b8; /* slate-400 */
  background-color: #1e293b; /* slate-800 */
  transition: all 150ms ease-in-out;
  /* The physical height offset */
  transform: translateY(-5px);
  /* Glossy arcade effect */
  background-image: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.3) 100%);
  border-top: 1px solid rgba(255,255,255,0.15);
  border-left: 1px solid rgba(255,255,255,0.05);
}

/* Hover effects (only if not pressed) */
.nav-btn-3d:hover:not(.active) .nav-btn-3d-face {
  color: #ffffff;
  filter: brightness(1.1);
  transform: translateY(-6px);
}

.nav-btn-3d:hover:not(.active) {
  /* Floor shadow grows, base stays fixed */
  box-shadow: 0 10px 12px rgba(0,0,0,0.6);
}

/* Active/Pressed State (Physical Click) */
.nav-btn-3d:active .nav-btn-3d-face,
.nav-btn-3d.active .nav-btn-3d-face {
  transform: translateY(0);
}
.nav-btn-3d:active,
.nav-btn-3d.active {
  /* Floor shadow shrinks, base stays fixed */
  box-shadow: 0 2px 2px rgba(0,0,0,0.5);
}

/* Blue Variant: Lit and Fully Pressed */
.nav-btn-3d.active-blue.active .nav-btn-3d-face {
  background-color: #1e293b; /* keep base color */
  color: #00bfff; /* Bright blue text */
  text-shadow: 0 0 10px rgba(0, 191, 255, 0.8); /* Text glow */
}

/* Yellow Variant: Lit and Fully Pressed */
.nav-btn-3d.active-yellow.active .nav-btn-3d-face {
  background-color: #1e293b; /* keep base color */
  color: #facc15; /* Bright yellow text */
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.8); /* Text glow */
}



