* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #000; overflow: hidden; }
[hidden] { display: none !important; }

/* Menú: 4 cuadrados grandes */
#menu {
  height: 100%; display: grid; place-content: center;
  grid-template-columns: repeat(2, min(42vh, 42vw)); gap: min(3vh, 3vw);
  background: #111;
}
.tile {
  aspect-ratio: 1; border: 0; border-radius: 18px; cursor: pointer;
  font: 800 min(6vh, 6vw)/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff; transition: transform .12s, filter .12s;
}
.tile:hover { transform: scale(1.03); filter: brightness(1.1); }
.tile[data-mode="walama"]   { background: #8bc34a; }
.tile[data-mode="gandalf"]  { background: #607d8b; }
.tile[data-mode="updating"] { background: #2b2b2b; }
.tile[data-mode="hacked"]   { background: #b71c1c; }

.screen { position: fixed; inset: 0; background: #000; cursor: none; }

/* Video sincronizado */
#video { width: 100%; height: 100%; object-fit: contain; background: #000; }
#waiting { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid #333; border-top-color: #aaa; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* macOS update */
#updating { display: grid; place-items: center; }
.mac { display: flex; flex-direction: column; align-items: center; transform: translateY(2vh); }
.apple { width: 82px; height: 100px; color: #fff; margin-bottom: 64px; }
.bar { width: 224px; height: 6px; border-radius: 3px; background: #3c3c3c; overflow: hidden; }
.fill { height: 100%; width: 7%; background: #ececec; border-radius: 3px; }
.remaining {
  margin-top: 16px; color: #e0e0e0; letter-spacing: .1px;
  font: 400 13px -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

/* Hacked */
#hacked { color: #33ff66; font: 12px/1.35 Menlo, Monaco, Consolas, monospace; }
.console { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 10px; gap: 10px; }
.hk-head {
  display: flex; justify-content: space-between; padding: 8px 12px;
  border: 1px solid #1d6b33; background: #031a09; letter-spacing: 1px;
}
.hk-head b { color: #b6ffc8; }
.hk-grid { flex: 1; display: grid; gap: 10px; grid-template: 1fr 1fr / 1.2fr 1fr 1fr; min-height: 0; }
.panel { border: 1px solid #1d6b33; background: #020d05; padding: 8px; overflow: hidden; position: relative; min-height: 0; }
.panel h3 { font-size: 11px; color: #7dffa0; border-bottom: 1px solid #1d6b33; padding-bottom: 4px; margin-bottom: 6px; letter-spacing: 1px; }
.panel pre { white-space: pre; overflow: hidden; height: calc(100% - 24px); font: inherit; }
.panel canvas { width: 100%; height: calc(100% - 24px); display: block; }
.op { margin-bottom: 10px; }
.op .track { height: 8px; border: 1px solid #1d6b33; margin-top: 3px; }
.op .track div { height: 100%; background: #33ff66; width: 0; }
.err { color: #ff4d4d; }
.warn { color: #ffd84d; }

.ransom {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(60, 0, 0, .55); animation: flash .25s 3;
}
@keyframes flash { 50% { background: rgba(255, 0, 0, .5); } }
.ransom-box {
  width: min(1000px, 94vw); max-height: 94vh; overflow: hidden;
  background: #8b0000; color: #fff; border: 2px solid #ff3b3b; padding: 18px 22px;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 0 60px #f00;
}
.skull-wrap { text-align: center; margin: -6px 0 4px; }
.skull { display: inline-block; text-align: left; color: #fff; font: 11px/1.1 Menlo, monospace; }
.ransom-box h1 { text-align: center; font-size: 28px; margin-bottom: 14px; }
.ransom-cols { display: grid; grid-template-columns: 230px 1fr; gap: 18px; }
.ransom-timers { background: #5a0000; border: 1px solid #ff6b6b; padding: 12px; text-align: center; }
.ransom-timers p { font-size: 13px; color: #ffd84d; }
.ransom-timers .date { color: #fff; font-size: 12px; margin-bottom: 6px; }
.countdown { font: 700 26px Menlo, monospace !important; color: #fff !important; margin-bottom: 8px; }
.ransom-timers hr { border: 0; border-top: 1px solid #ff6b6b; margin: 10px 0; }
.ransom-text { background: #fff; color: #111; padding: 12px 14px; max-height: 330px; overflow: hidden; }
.ransom-text h2 { font-size: 15px; color: #8b0000; margin: 6px 0 4px; }
.ransom-text p { font-size: 13px; }
.files-count { margin-top: 8px; color: #8b0000; }
.btc {
  margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #5a0000; border: 1px solid #ff6b6b; padding: 10px 14px;
}
.btc-logo { background: #f7931a; color: #fff; font-weight: 800; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; font-size: 18px; }
.btc code { background: #fff; color: #000; padding: 6px 10px; font: 600 16px Menlo, monospace; letter-spacing: .5px; }
.ransom-buttons { display: flex; gap: 12px; margin-top: 12px; justify-content: flex-end; }
.ransom-buttons span { background: #fff; color: #8b0000; font-weight: 700; padding: 8px 22px; border: 1px solid #ccc; }
