:root {
  --dp-red: #d61f2c;
  --dp-dark-red: #7a0e15;
  --dp-black: #0d0d10;
  --dp-panel: rgba(14, 13, 16, 0.94);
  --dp-bone: #f5f1e8;
  --dp-eye-white: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Arial Black', 'Helvetica Neue', Impact, sans-serif;
  color: var(--dp-bone);
}

body {
  background: url("./bg.jpg") no-repeat center center fixed;
  background-size: cover;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: url("./bg.jpg"),
  z-index: 0;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: rgba(8,8,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--dp-red);
  box-shadow: 0 2px 18px rgba(214,31,44,0.6);
}

.brand {
  background: var(--dp-red);
  color: #fff;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 12px;
  transform: skew(-8deg);
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 #000, 0 0 14px rgba(214,31,44,.8);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.brand span {
  background: #000;
  color: var(--dp-chimi);
  padding: 0 6px;
  margin-left: 4px;
  border: 1px solid var(--dp-chimi);
}
.brand:hover { filter: brightness(1.15); }

.topbar-launchers { display: flex; gap: 8px; flex-wrap: wrap; }

.launcher-btn, .dock-btn {
  font-family: inherit;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--dp-red);
  background: #000;
  border: 2px solid var(--dp-red);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.launcher-btn:hover, .dock-btn:hover {
  color: #000;
  background: var(--dp-red);
  box-shadow: 0 0 12px rgba(214,31,44,0.9);
  transform: translateY(-1px);
}
.launcher-btn.quiz-btn, .dock-btn.quiz-dock { color: var(--dp-red); }
.launcher-btn.quiz-btn:hover, .dock-btn.quiz-dock:hover { background: var(--dp-red); color: #000; }
.launcher-btn.rng-btn, .dock-btn.rng-dock { color: var(--dp-red); }
.launcher-btn.rng-btn:hover, .dock-btn.rng-dock:hover { background: var(--dp-red); color: #000;  }
.launcher-btn.heroes-btn { border-color: #888; }
.launcher-btn.heroes-btn:hover { background: #333; box-shadow: 0 0 12px }

.clock-container {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: rgba(214,31,44,0.22);
  border: 1px solid rgba(214,31,44,0.7);
  padding: 4px 12px;
  border-radius: 16px;
  text-shadow: 0 0 8px rgba(214,31,44,0.9);
  white-space: nowrap;
}

.desktop {
  position: fixed;
  inset: 56px 0 64px 0;
  z-index: 1;
}

.window {
  position: absolute;
  width: min(540px, 94vw);
  max-height: calc(100% - 20px);
  display: flex;
  flex-direction: column;
  background: var(--dp-panel);
  border: 2px solid var(--dp-red);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.65), 0 0 24px rgba(214,31,44,0.35);
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: move;
  user-select: none;
  background: #1a0d0f;
  color: #fff;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #000;
  touch-action: none;
}

.window-header.quiz-header {
  background: #1a1405;
}

.window-header.rng-header {
  background: #1a0d05;
}

.window-title { font-weight: 900; text-shadow: 2px 2px 0 #000; }

.window-controls { display: flex; gap: 8px; }

.win-btn {
  width: 30px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #fff;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}
.win-btn:hover { background: #000; }
.win-btn.close:hover { background: #ff0000; box-shadow: 0 0 10px #ff0000; }
.win-btn.minimize:hover { background: #444; }

.window-body { padding: 16px; font-family: Arial, Helvetica, sans-serif; overflow-y: auto; }
.window-body h3 { margin-top: 0; }

.hero-heading {
  color: var(--dp-red);
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000, 0 0 14px rgba(255,204,51,0.4);
  margin-bottom: 4px;
}
.subtitle { color: #d9cfae; margin-top: 0; }
.deadpool-red { color: var(--dp-red); }

.hero-img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  display: block;
  background: #000;
  border: 2px solid var(--dp-red);
  border-radius: 8px;
  margin: 12px 0;
}


.hero-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-list li {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 10px;
  border-radius: 6px;
}

.quiz-window { border-color: var(--dp-red); box-shadow: 0 12px 40px rgba(0,0,0,.65), 0 0 24px rgba(255,204,51,.3); }
.quiz-top { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; color: var(--dp-red); margin-bottom: 8px; }
.quiz-bar { height: 8px; background: #222; border-radius: 8px; overflow: hidden; margin-bottom: 12px; border: 1px solid #444; }
.quiz-bar-fill { height: 100%; width: 0%; background: var(--dp-red); transition: width .3s; }
.quiz-options { display: grid; gap: 8px; margin-top: 12px; }
.quiz-opt {
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #444;
  background: #1c1a16;
  color: var(--dp-bone);
  cursor: pointer;
  transition: all .12s;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--dp-chimi); transform: translateY(-1px); }
.quiz-opt:disabled { cursor: default; opacity: .95; }
.quiz-opt.correct { background: #1d4d1d; border-color: #3dff5e; color: #d8ffdc; }
.quiz-opt.wrong { background: #5c1414; border-color: var(--dp-red); color: #ffd7d7; }
.quiz-opt.dim { opacity: .55; }
.quiz-feedback { min-height: 24px; font-style: italic; color: var(--dp-chimi); }
.quiz-actions { display: flex; gap: 8px; margin-top: 8px; }

.action-btn {
  font-family: inherit;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 13px;
  background: var(--dp-red);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
}
.action-btn:disabled { opacity: .4; cursor: not-allowed; }
.action-btn:not(:disabled):hover { filter: brightness(1.15); box-shadow: 0 0 12px rgba(214,31,44,.8); }
.action-btn.ghost { background: transparent; border-color: #666; color: #ccc; }
.action-btn.ghost:hover { border-color: #fff; color: #fff; box-shadow: none; }
.action-btn.big-spin { background: var(--dp-red); border-color: var(--dp-chimi); flex: 1; }

.rng-window { border-color: var(--dp-red); box-shadow: 0 12px 40px rgba(0,0,0,.65), 0 0 24px rgba(255,140,26,.35); width: min(560px, 94vw); }
.reels { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.reel {
  width: 52px; height: 68px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 38px; font-weight: 900;
  background: linear-gradient(180deg, #000, #241206);
  border: 2px solid var(--dp-red);
  border-radius: 10px;
  color: var(--dp-red);
  text-shadow: 0 0 12px rgba(255,204,51,.8);
}
.reel.locked { border-color: var(--dp-red); color: #fff; text-shadow: 0 0 12px var(--dp-red); animation: pop .25s ease; }
.reel.spinning { animation: wobble .12s infinite alternate; }
@keyframes wobble { from { transform: translateY(-2px); } to { transform: translateY(2px); } }
.rng-stats { display: flex; justify-content: space-between; font-weight: 900; margin-bottom: 6px; }
#rng-ep { color: var(--dp-red); text-shadow: 0 0 10px rgba(255,204,51,.6); }
#rng-rolls { color: #aaa; }
.rng-comment { min-height: 22px; font-style: italic; color: var(--dp-red); }
.rng-badges { margin-bottom: 10px; min-height: 28px; }
.history-title { margin: 12px 0 6px; color: var(--dp-red); text-transform: uppercase; font-size: 13px; }
.rng-history { margin: 0; padding-left: 22px; max-height: 120px; overflow-y: auto; font-family: 'Courier New', monospace; font-size: 13px; }
.rng-history li { margin-bottom: 2px; }

.dock {
  position: fixed;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: 96vw;
  background: rgba(8,8,10,0.85);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(214,31,44,0.8);
  padding: 8px 12px;
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}

@media (max-width: 720px) {
  .topbar-launchers { display: none; }
  .window { width: 94vw; }
  .reel { width: 40px; height: 56px; font-size: 30px; }
}
