/* style.css */

:root {
  --bg: #020000;
  --fine: #00ff66;
  --fine-glow: rgba(0, 255, 102, 0.4);
  --caution: #ffcc00;
  --caution-glow: rgba(255, 204, 0, 0.4);
  --danger: #ff0033;
  --danger-glow: rgba(255, 0, 51, 0.4);
  --dead: #4a0000;
  --dead-glow: rgba(74, 0, 0, 0.4);

  --umb-red: #d30000;
  --umb-dark: rgba(10, 0, 0, 0.85);

  --theme-color: var(--fine);
  --theme-glow: var(--fine-glow);

  --font-mono: "Share Tech Mono", monospace;
  --font-ui: "Rajdhani", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #000;
  color: #e0e0e0;
  font-family: var(--font-ui);
  overflow-x: hidden;
}

/* ==========================================
   EFEITOS CRT E ANIMAÇÕES GLOBAIS
========================================== */
.crt-fisheye {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    transparent 50%,
    rgba(0, 0, 0, 0.6) 100%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

.crt-scanlines {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0.15) 50%, transparent 50%);
  background-size: 100% 4px;
}

.crt-sweep-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 10vh;
  z-index: 9996;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.06),
    transparent
  );
  animation: sweep-line 8s infinite linear;
}

.crt-noise {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: static-noise 0.1s infinite;
}

@keyframes sweep-line {
  0% {
    transform: translateY(-100vh);
  }
  100% {
    transform: translateY(100vh);
  }
}

@keyframes static-noise {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(1%, 1%);
  }
}

/* ==========================================
   TELA DE BOOT (INICIALIZAÇÃO)
========================================== */
.crt-boot-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.crt-boot-line {
  width: 0%;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 20px 5px #fff;
  animation:
    crt-on-line 0.4s ease-out forwards,
    crt-on-expand 0.3s 0.5s ease-out forwards;
}

@keyframes crt-on-line {
  0% {
    width: 0%;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 1;
  }
}

@keyframes crt-on-expand {
  0% {
    height: 2px;
    opacity: 1;
    filter: brightness(10);
  }
  100% {
    height: 100vh;
    opacity: 0;
    filter: brightness(1);
  }
}

#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  color: #a0a0a0;
  padding: 30px 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  overflow-y: auto;
  pointer-events: auto;
}

#boot-screen::-webkit-scrollbar {
  display: none;
}

.boot-logo-img {
  width: 55px;
  margin-bottom: 20px;
  filter: invert(1) brightness(0.8);
  display: block;
}

#boot-text-container {
  line-height: 1.6;
  white-space: pre-wrap;
  display: inline;
}

.boot-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #fff;
  animation: blink 0.8s infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

#boot-input-trap {
  opacity: 0;
  position: absolute;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
}

/* ==========================================
   TELA DE CARREGAMENTO (UI)
========================================== */
#ui-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: #000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s;
}

.loading-content {
  width: 300px;
  text-align: center;
}

@keyframes spin-animation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin-logo {
  animation: spin-animation 3s linear infinite;
}

.loading-bar-bg {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--umb-red);
  box-shadow: 0 0 10px var(--umb-red);
  transition: width 0.4s;
}

.loading-msg {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ==========================================
   SISTEMA PRINCIPAL (ÁREA DE TRABALHO)
========================================== */
#system-wrapper {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(255, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  overflow-y: auto;
  overflow-x: hidden;
}

#system-wrapper.active {
  opacity: 1;
  visibility: visible;
}

#system-wrapper::-webkit-scrollbar {
  display: none;
}

.bg-terminal {
  position: absolute;
  top: 65px;
  left: 25px;
  bottom: 20px;
  width: 450px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.bg-terminal-header {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: bold;
  color: #ff5555;
  margin-bottom: 12px;
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(255, 85, 85, 0.3);
  padding-bottom: 5px;
  width: fit-content;
}

/* ==========================================
   BARRA SUPERIOR (TOPBAR)
========================================== */
.os-topbar {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  background: rgba(5, 0, 0, 0.9);
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--umb-red);
  letter-spacing: 2px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.8);
  z-index: 20;
  position: sticky;
  top: 0;
  flex-shrink: 0;
}

.os-topbar img {
  height: 22px;
  filter: grayscale(1) sepia(1) hue-rotate(330deg) saturate(5) brightness(0.8);
  margin-right: 10px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

#os-mute-btn {
  cursor: pointer;
  font-size: 16px;
  transition:
    color 0.3s,
    text-shadow 0.3s;
  color: var(--fine);
  display: none;
}

#os-mute-btn:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

#os-mute-btn.muted {
  color: #666 !important;
  text-shadow: none !important;
}

.topbar-clock {
  color: #fff;
  font-weight: bold;
  letter-spacing: 3px;
}

/* ==========================================
   GESTÃO DE JANELAS (WINDOWS)
========================================== */
.desktop-workspace {
  width: min(95vw, 1400px);
  height: calc(100vh - 45px - 40px);
  margin: 20px auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 25px;
  z-index: 10;
  position: relative;
}

.os-window {
  background: var(--umb-dark);
  border: 1px solid rgba(255, 0, 0, 0.15);
  border-radius: 4px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.8),
    inset 0 0 20px rgba(255, 0, 0, 0.02);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.os-window::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 0, 0, 0.015) 50%, transparent 50%) 0 0 /
    100% 4px;
}

.window-header {
  flex-shrink: 0;
  min-height: 35px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.1), transparent);
  border-bottom: 1px solid rgba(255, 0, 0, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ff5555;
  letter-spacing: 1px;
  z-index: 1;
}

.window-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prompt {
  color: #666;
}

.window-btns {
  flex-shrink: 0;
  color: #888;
  font-weight: bold;
  letter-spacing: 3px;
  white-space: nowrap;
}

.window-body {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
}

.window-body::-webkit-scrollbar {
  display: none;
}

.window-hud {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.9),
    0 0 20px var(--theme-glow),
    inset 0 0 30px rgba(0, 0, 0, 0.8);
  transition: box-shadow 0.5s ease;
}

.window-hud .window-header {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.window-map {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.window-video {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

/* ==========================================
   ELEMENTOS DO HUD E INFORMAÇÕES PESSOAIS
========================================== */
.hud-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 15px;
}

.mini-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #777;
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.name {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.status-block {
  text-align: right;
}

.status-text {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 6px;
  color: var(--theme-color);
  text-shadow: 0 0 20px var(--theme-glow);
  position: relative;
  transition:
    color 0.5s ease,
    text-shadow 0.5s ease;
}

.status-text.glitch {
  animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

@keyframes glitch-anim {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 1px);
  }
  40% {
    transform: translate(-1px, -1px);
  }
  60% {
    transform: translate(2px, 1px);
  }
  80% {
    transform: translate(1px, -1px);
  }
  100% {
    transform: translate(0);
  }
}

.hud-body {
  display: flex;
  gap: 30px;
  margin-top: 25px;
  flex: 1;
}

.photo-wrapper {
  position: relative;
  width: 180px;
  height: 240px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
}

.photo-area {
  width: 100%;
  height: 100%;
  background: url("https://i.imgur.com/txdI5jg.png") center 50% / 100% no-repeat;
  filter: grayscale(80%) contrast(120%) brightness(0.7);
}

.photo-scanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--theme-color);
  box-shadow: 0 0 15px 5px var(--theme-glow);
  animation: scan 3s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes scan {
  0% {
    top: 0%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 98%;
    opacity: 0;
  }
}

.intel-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.classified-banner {
  background: repeating-linear-gradient(
    45deg,
    rgba(200, 0, 0, 0.15),
    rgba(200, 0, 0, 0.15) 10px,
    transparent 10px,
    transparent 20px
  );
  border: 1px solid rgba(255, 0, 0, 0.3);
  padding: 8px 15px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ff4444;
  letter-spacing: 3px;
  text-align: center;
}

.intel-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
  padding-bottom: 8px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.intel-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  font-size: 14px;
  margin-bottom: 20px;
}

.intel-grid .label {
  color: #666;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.intel-grid .val {
  color: #d0d0d0;
  font-weight: 500;
}

.threat-val {
  color: #ff3333 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.intel-notes {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #999;
  line-height: 1.6;
  padding: 15px;
  background: rgba(0, 0, 0, 0.4);
  border-left: 2px solid var(--umb-red);
  border-radius: 0 4px 4px 0;
  flex: 1;
}

/* ==========================================
   BOTÕES E REDES SOCIAIS
========================================== */
.social-bar {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  position: relative;
  z-index: 100;
}

.social-bar a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: #888;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-bar a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.icon-btn {
  position: relative;
}

.icon-tooltip {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #000 !important;
  color: #fff;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: bold;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.8);
  z-index: 999;
  border: 1px solid #444;
}

.icon-btn:hover .icon-tooltip {
  opacity: 1;
}

/* ==========================================
   SINAIS VITAIS (ECG / BPM)
========================================== */
.vitals-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 30px;
}

.bpm-display {
  min-width: 120px;
  text-align: center;
}

.bpm-value {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--theme-color);
  text-shadow: 0 0 20px var(--theme-glow);
  transition:
    color 0.5s,
    text-shadow 0.5s;
}

.bpm-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #666;
  letter-spacing: 4px;
  margin-top: 5px;
}

.ecg-container {
  flex: 1;
  height: 100px;
  position: relative;
  background: #020202;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 1);
  overflow: hidden;
}

.ecg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--theme-glow) 1px, transparent 1px),
    linear-gradient(90deg, var(--theme-glow) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size:
    40px 40px,
    40px 40px,
    8px 8px,
    8px 8px;
  transition: background-image 0.5s ease;
}

canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================
   LOGS DO TERMINAL
========================================== */
.term-logs-container {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: rgba(255, 100, 100, 0.8);
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}

.log-line {
  word-break: break-all;
  margin-bottom: 2px;
}

.log-time {
  color: #666;
  margin-right: 8px;
}

.log-err {
  color: #ff3333;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.log-ok {
  color: var(--fine);
}

/* ==========================================
   VÍDEO THUMBNAIL CCTV (RACCOON CITY)
========================================== */
.video-thumb-container {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 1);
  background: #000;
}

.cctv-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: grayscale(0.85) sepia(0.6) hue-rotate(70deg) contrast(1.4)
    brightness(0.8);
  opacity: 0.8;
  z-index: 1;
  transition: filter 0.3s;
}

.video-thumb-container:hover .cctv-bg {
  filter: grayscale(0.5) sepia(0.3) hue-rotate(70deg) contrast(1.2)
    brightness(0.5);
}

.cctv-ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 12px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

.cctv-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.cctv-rec {
  color: #ff3333;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.cctv-dot {
  width: 8px;
  height: 8px;
  background: #ff3333;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff3333;
  animation: cctv-blink 1s infinite;
}

@keyframes cctv-blink {
  50% {
    opacity: 0;
  }
}

.cctv-glitch-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  z-index: 3;
  pointer-events: none;
  animation: cctv-scan-anim 5s infinite linear;
}

@keyframes cctv-scan-anim {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(800%);
  }
}

.video-thumb-hover {
  position: absolute;
  inset: 0;
  background: rgba(5, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.video-thumb-container:hover .video-thumb-hover {
  opacity: 1;
}

.video-thumb-text {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fine);
  letter-spacing: 2px;
  font-weight: bold;
  border: 1px solid var(--fine);
  padding: 10px 20px;
  border-radius: 2px;
  background: rgba(0, 255, 102, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.3);
  text-shadow: 0 0 5px var(--fine);
}

.video-overlay-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(rgba(0, 255, 102, 0.03) 50%, transparent 50%);
  background-size: 100% 4px;
}

/* ==========================================
   MODAL MODO CINEMA
========================================== */
#cinema-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(8px);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#cinema-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cinema-wrapper {
  position: relative;
  width: 85vw;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow:
    0 0 80px rgba(0, 0, 0, 1),
    0 0 0 1px var(--fine);
  border-radius: 8px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#cinema-overlay.active .cinema-wrapper {
  transform: scale(1);
}

.cinema-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 5;
}

.cinema-close-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  z-index: 10060;
  font-size: 35px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.cinema-close-btn:hover {
  color: var(--danger);
  transform: scale(1.1);
  text-shadow: 0 0 15px var(--danger);
}

/* ==========================================
   MY ANIMELIST (MAL) INTEGRAÇÃO
========================================== */
.mal-container {
  width: 100%;
  height: 100%;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  scrollbar-width: none;
}

.mal-container::-webkit-scrollbar {
  display: none;
}

.mal-list-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fine);
  letter-spacing: 4px;
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px dashed rgba(0, 255, 102, 0.3);
  flex-shrink: 0;
}

.mal-item {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(15, 0, 0, 0.8);
  border: 1px solid rgba(255, 0, 0, 0.25);
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  height: 120px;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.mal-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 0, 0, 0.85);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.mal-item:hover .mal-item-overlay {
  opacity: 1;
}

.mal-overlay-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fine);
  letter-spacing: 2px;
  font-weight: bold;
  border: 1px solid var(--fine);
  padding: 8px 16px;
  border-radius: 2px;
  background: rgba(0, 255, 102, 0.05);
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.2);
}

.mal-overlay-text i {
  margin-right: 8px;
}

.mal-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--umb-red);
  box-shadow: 0 0 12px var(--danger-glow);
}

.mal-item:hover {
  border-color: var(--fine);
  box-shadow: 0 6px 20px rgba(0, 255, 102, 0.2);
  transform: translateX(4px);
}

.mal-item:hover::before {
  background: var(--fine);
  box-shadow: 0 0 12px var(--fine-glow);
}

.mal-cover-wrapper {
  width: 60px;
  height: 88px;
  flex-shrink: 0;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: radial-gradient(
    circle at 20% 20%,
    rgba(255, 255, 255, 0.05),
    transparent 55%
  );
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.85);
}

.mal-cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--caution);
  font-size: 16px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 8px,
    transparent 8px,
    transparent 16px
  );
}

.mal-cover-placeholder i {
  animation: spin 1s linear infinite;
}

.mal-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mal-cover-img.loaded {
  opacity: 1;
}

.mal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  height: 100%;
  position: relative;
  z-index: 1;
}

.mal-title {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
  line-height: 1.2;
  margin-bottom: 6px;
}

.mal-title i {
  margin-right: 6px;
}

.mal-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.mal-badge {
  padding: 3px 6px;
  border-radius: 2px;
  border: 1px solid rgba(0, 255, 102, 0.4);
  color: var(--fine);
  background: rgba(0, 255, 102, 0.08);
  font-weight: bold;
}

.mal-badge-loading {
  border-color: rgba(255, 204, 0, 0.4);
  color: var(--caution);
  background: rgba(255, 204, 0, 0.08);
  animation: blink 1.4s infinite;
}

.mal-ep-count {
  color: #aaa;
  font-weight: 600;
}

.mal-progress-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 6px;
}

.mal-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--fine);
  box-shadow: 0 0 10px var(--fine);
  border-radius: 2px;
  transition:
    width 1.2s cubic-bezier(0.2, 1, 0.3, 1),
    background 0.5s ease;
}

.mal-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #777;
  letter-spacing: 1px;
}

.mal-loading {
  text-align: center;
  font-family: var(--font-mono);
  color: var(--fine);
  margin-top: 40px;
  animation: blink 1s infinite;
  font-size: 12px;
  letter-spacing: 2px;
}

/* ==========================================
   MEDIA QUERIES (RESPONSIVIDADE)
========================================== */
@media (max-width: 950px) {
  html,
  body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  #system-wrapper {
    min-height: 100vh;
    height: auto;
    padding-bottom: 40px;
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .bg-terminal {
    position: fixed;
    width: calc(100% - 30px);
    left: 15px;
    top: 60px;
    bottom: 20px;
    height: auto;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }

  .bg-terminal .term-logs-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
  }

  .os-topbar {
    position: sticky;
    top: 0;
    padding: 0 15px;
    height: 50px;
    font-size: 10px;
    z-index: 100;
  }

  .desktop-workspace {
    display: flex;
    flex-direction: column;
    width: 92%;
    height: auto;
    margin: 20px auto;
    gap: 20px;
    position: relative;
    z-index: 10;
  }

  .os-window {
    border-radius: 8px;
    min-height: 380px;
  }

  .window-header {
    padding: 10px 15px;
  }

  .window-body {
    padding: 20px;
  }

  .window-map {
    height: 450px;
    flex-shrink: 0;
  }

  .window-video {
    height: 260px;
    flex-shrink: 0;
  }

  .cinema-wrapper {
    width: 95vw;
  }

  .cinema-close-btn {
    top: 15px;
    right: 20px;
    font-size: 28px;
  }

  .hud-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    border: none;
    padding-bottom: 0;
  }

  .name {
    font-size: 36px;
  }

  .status-block {
    text-align: center;
  }

  .status-text {
    font-size: 40px;
  }

  .hud-body {
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    gap: 20px;
  }

  .photo-wrapper {
    width: 140px;
    height: 190px;
  }

  .intel-area {
    width: 100%;
  }

  .intel-title {
    text-align: center;
  }

  .intel-grid {
    grid-template-columns: 1fr;
    gap: 5px;
    text-align: center;
  }

  .intel-grid .label {
    margin-bottom: -2px;
    margin-top: 10px;
  }

  .intel-notes {
    text-align: center;
    border-left: none;
    border-top: 2px solid var(--umb-red);
    border-radius: 0 0 4px 4px;
    padding: 15px 10px;
  }

  .social-bar {
    justify-content: center;
  }

  .vitals-section {
    flex-direction: column;
    gap: 15px;
    padding-top: 15px;
  }

  .bpm-display {
    min-width: 0;
  }

  .ecg-container {
    width: 100%;
    height: 100px;
  }

  /* Rodapé Legal - Mobile */
  .window-legal {
    width: 92%;
    margin: 0 auto 30px auto;
    min-height: auto;
  }

  .legal-body {
    flex-direction: column !important;
    text-align: center !important;
    padding: 15px 12px !important;
    gap: 10px;
  }

  .legal-text {
    font-size: 8px;
    line-height: 1.8;
    letter-spacing: 0.5px;
    color: #555;
  }

  .legal-text br {
    display: none;
  }

  .legal-logo {
    display: none;
  }
}

/* ==========================================
   RODAPÉ (FOOTER / DMCA)
========================================== */
.window-legal {
  width: min(95vw, 1400px);
  margin: 0 auto 30px auto;
  min-height: auto;
  flex-shrink: 0;
}

.legal-body {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px !important;
  gap: 20px;
  overflow: hidden;
}

.legal-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #888;
  line-height: 1.7;
  letter-spacing: 1px;
}

.legal-warning {
  color: var(--caution);
  font-weight: bold;
  text-shadow: 0 0 8px var(--caution-glow);
}

.capcom-highlight {
  color: #fff;
  font-weight: bold;
}

.legal-text a {
  color: var(--fine);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.legal-text a:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--fine-glow);
}

.legal-logo {
  width: 35px;
  filter: grayscale(1) opacity(0.2);
}
