* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  user-select: none;
}

canvas {
  display: block;
}

.hidden {
  display: none !important;
}

/* ---------- Balken ---------- */
#bars {
  position: fixed;
  top: 18px;
  left: 18px;
  pointer-events: none;
}

#level {
  font-size: 14px;
  color: #e8d9a8;
  letter-spacing: 2px;
  text-shadow: 0 1px 3px #000;
  margin-bottom: 4px;
}

.bar {
  position: relative;
  height: 14px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(232, 217, 168, 0.55);
  margin-bottom: 5px;
  overflow: hidden;
  transition: width 0.4s;
}

.bar.thin {
  height: 8px;
}

.bar .fill,
.bar .lag {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}

#hp-fill {
  background: linear-gradient(#d3363f, #8f1820);
}

#st-fill {
  background: linear-gradient(#5fbf4a, #2f7a24);
}

/* Hoe ver je bent tot je volgende level (vult zich door vijanden te verslaan) */
#xp-bar {
  width: 16vw;
  height: 5px;
}

#xp-fill {
  background: linear-gradient(#ffe08a, #c9932e);
  transition: width 0.3s;
}

.bar .lag {
  background: #e8c56a;
}

#hp-text {
  position: absolute;
  right: 6px;
  top: -1px;
  font-size: 11px;
  text-shadow: 0 1px 2px #000;
}

/* ---------- Minimap ---------- */
#minimap {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 170px;
  height: 170px;
  pointer-events: none;
  opacity: 0.92;
}

/* ---------- Uitrusting en krachten ---------- */
#equip {
  position: fixed;
  left: 18px;
  bottom: 18px;
  font-size: 15px;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}

#equip > div {
  margin-top: 4px;
}

#powers {
  display: flex;
  gap: 6px;
  margin-top: 10px !important;
}

.power {
  position: relative;
  min-width: 64px;
  padding: 6px 8px;
  border: 1px solid rgba(232, 217, 168, 0.6);
  background: rgba(0, 0, 0, 0.55);
  text-align: center;
  font-size: 11px;
}

.power b {
  display: block;
  font-size: 15px;
  color: #ffd76a;
}

.power.cooling {
  opacity: 0.45;
}

.power.active {
  border-color: #ff8a2b;
  box-shadow: 0 0 12px #ff8a2b;
}

.power i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.4);
}

/* ---------- Munten ---------- */
#runes-box {
  position: fixed;
  right: 22px;
  bottom: 20px;
  font-size: 24px;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}

#runes-box .coin {
  color: #ffd700;
  margin: 0 8px;
}

#runes-gain {
  color: #ffe9a0;
  font-size: 18px;
}

/* ---------- Boss ---------- */
#boss {
  position: fixed;
  left: 50%;
  bottom: 70px;
  width: min(760px, 80vw);
  transform: translateX(-50%);
  pointer-events: none;
}

#boss-name {
  font-size: 20px;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px #000;
  letter-spacing: 1px;
}

.boss-bar {
  height: 12px;
}

#boss-fill {
  background: linear-gradient(#b0202a, #6a0f15);
}

/* Elden Ring-stijl (Sky): een brede, dunne balk helemaal onderin, met een grote naam in hoofdletters */
#boss.elden {
  bottom: 46px;
  width: min(1100px, 70vw); /* (niet over je flesjes en wapen linksonder) */
}

#boss.elden #boss-name {
  font-family: 'Trajan Pro', 'Cinzel', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  font-size: clamp(14px, 1.7vw, 22px);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #f1ead6;
  margin-bottom: 6px;
  text-shadow: 0 0 6px #000, 0 1px 2px #000;
}

#boss.elden .boss-bar {
  height: 6px;
  border: 1px solid rgba(200, 185, 140, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
}

#boss.elden #boss-fill {
  background: linear-gradient(#a3141c, #5a080d);
}

/* Sky's flits: het hele scherm even wit (skyFighter.js zet de doorzichtigheid) */
#sky-flits {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

/* ---------- Teksten in beeld ---------- */
#prompt {
  position: fixed;
  left: 50%;
  bottom: 150px;
  transform: translateX(-50%);
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(232, 217, 168, 0.5);
  font-size: 18px;
  white-space: nowrap;
  pointer-events: none;
}

#prompt b {
  color: #ffd76a;
}

/* Op de draak: klein en helemaal onderin, dan zie je jezelf en de draak goed */
#prompt.ride {
  bottom: 12px;
  padding: 5px 12px;
  font-size: 14px;
}

#toast {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 26px;
  background: rgba(0, 0, 0, 0.7);
  border-top: 1px solid #e8d9a8;
  border-bottom: 1px solid #e8d9a8;
  font-size: 20px;
  text-align: center;
  pointer-events: none;
}

#region {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 34px;
  letter-spacing: 6px;
  color: #f1e6c4;
  text-shadow: 0 2px 10px #000;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

#banner {
  position: fixed;
  left: 0;
  right: 0;
  top: 40%;
  padding: 26px 0;
  text-align: center;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.75) 20%, rgba(0, 0, 0, 0.75) 80%, transparent);
  pointer-events: none;
}

#banner-text {
  font-size: clamp(32px, 6vw, 64px);
  letter-spacing: 6px;
}

#banner-sub {
  margin-top: 8px;
  font-size: 18px;
  color: #ddd;
  letter-spacing: 2px;
}

.banner-gold #banner-text {
  color: #f3d27a;
  text-shadow: 0 0 18px rgba(243, 210, 122, 0.6);
}

.banner-death #banner-text {
  color: #b51a1a;
  text-shadow: 0 0 20px rgba(181, 26, 26, 0.6);
}

.banner-power #banner-text {
  color: #9be7ff;
  text-shadow: 0 0 18px rgba(155, 231, 255, 0.6);
}

/* Rames: paars, en groen als hij uit de dood is opgestaan */
.banner-rames #banner-text {
  color: #c79bff;
  text-shadow: 0 0 22px rgba(155, 77, 255, 0.85);
}

.banner-herrezen #banner-text {
  color: #8dffa0;
  text-shadow: 0 0 22px rgba(93, 255, 122, 0.85);
}

/* ---------- Rames (rames.js): duisternis rond het beeld op het Knekelhof, en de flits van de bliksem ---------- */
#rames-dark {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 30%, rgba(24, 6, 44, 0.75) 75%, rgba(4, 0, 10, 0.96) 100%);
}

#rames-flash {
  position: fixed;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  background: #e9d6ff;
  animation: rames-flash 0.6s ease-out forwards;
}

@keyframes rames-flash {
  from { opacity: 0.9; }
  to { opacity: 0; }
}

/* ---------- Menu ---------- */
#menu {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

#menu-panel {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px 26px;
  background: rgba(15, 12, 8, 0.94);
  border: 1px solid #a8925a;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

#menu-panel h2 {
  text-align: center;
  color: #f3d27a;
  letter-spacing: 3px;
  margin-bottom: 14px;
  font-weight: normal;
}

#menu-panel h3 {
  color: #c9b98a;
  font-weight: normal;
  margin: 14px 0 6px;
  border-bottom: 1px solid rgba(201, 185, 138, 0.3);
}

#menu-body button {
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 185, 138, 0.35);
  color: #f1e6c4;
  font: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

#menu-body button:hover:not(:disabled) {
  background: rgba(243, 210, 122, 0.15);
  border-color: #f3d27a;
}

#menu-body button:disabled {
  opacity: 0.4;
  cursor: default;
}

#menu-body button small {
  display: block;
  color: #b8ad90;
  font-size: 13px;
  margin-top: 2px;
}

#menu-body button.equipped {
  border-color: #f3d27a;
}

#menu-body button em.bad {
  color: #e36a5a;
}

#menu-body button em {
  float: right;
  margin-top: -32px;
  color: #f3d27a;
  font-size: 13px;
}

#menu-body button.danger {
  color: #ff8a8a;
  border-color: rgba(255, 138, 138, 0.4);
  margin-top: 18px;
}

.menu-info {
  margin: 6px 0;
  color: #c9b98a;
}

.menu-info .ok {
  color: #8dff9a;
}

.menu-info .bad {
  color: #ff7a7a;
}

/* Het vakje voor de admin-code (Enter) */
.admin-code {
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #f3d27a;
  color: #f1e6c4;
  font: inherit;
  font-size: 22px;
  letter-spacing: 6px;
  text-align: center;
  outline: none;
}

.power-row {
  display: grid;
  grid-template-columns: 110px 130px 1fr;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.power-row b {
  color: #ffd76a;
}

.power-row small {
  color: #b8ad90;
}

.power-row.locked {
  opacity: 0.55;
}

/* ---------- Startscherm ---------- */
#lock-hint {
  z-index: 30;
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  background: radial-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.85));
  text-align: center;
}

#char-select {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 980px;
}

.char-card {
  width: 140px;
  padding: 8px 8px 10px;
  background: rgba(20, 16, 10, 0.75);
  border: 1px solid rgba(201, 185, 138, 0.35);
  color: #f1e6c4;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.char-card:hover {
  transform: translateY(-3px);
  border-color: #f3d27a;
}

.char-card.selected {
  border-color: #f3d27a;
  box-shadow: 0 0 18px rgba(243, 210, 122, 0.55);
  background: rgba(60, 45, 15, 0.8);
}

.char-card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 6px;
}

.char-card b {
  display: block;
  font-size: 17px;
  color: #f3d27a;
}

.char-card small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #c9bd9c;
  line-height: 1.3;
}

#start-btn {
  margin-top: 6px;
  padding: 12px 54px;
  background: linear-gradient(#e9c86a, #b8902f);
  border: 1px solid #fff2c4;
  color: #2a1d05;
  font: inherit;
  font-size: 22px;
  letter-spacing: 4px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(243, 210, 122, 0.4);
}

#start-btn:hover {
  filter: brightness(1.1);
}

#lock-hint h1 {
  font-size: clamp(40px, 8vw, 84px);
  font-weight: normal;
  letter-spacing: 12px;
  color: #f3d27a;
  text-shadow: 0 0 24px rgba(243, 210, 122, 0.5);
}

#lock-hint p {
  font-size: 22px;
  letter-spacing: 3px;
}

#lock-hint .controls {
  max-width: calc(100vw - 32px);
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.9;
  color: #ddd;
}

#lock-hint .controls b {
  color: #ffd76a;
}

/* ---------- Level kiezen ---------- */
#level-select {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 980px;
}

.level-card {
  min-width: 150px;
  padding: 8px 14px;
  background: rgba(20, 16, 10, 0.75);
  border: 1px solid rgba(201, 185, 138, 0.35);
  color: #f1e6c4;
  font: inherit;
  cursor: pointer;
}

.level-card b {
  display: block;
  font-size: 16px;
  color: #f3d27a;
}

.level-card small {
  font-size: 12px;
  color: #c9bd9c;
}

.level-card.selected {
  border-color: #f3d27a;
  box-shadow: 0 0 14px rgba(243, 210, 122, 0.5);
  background: rgba(60, 45, 15, 0.8);
}

.level-card:disabled {
  opacity: 0.4;
  cursor: default;
}

.level-done {
  margin-bottom: 14px;
  line-height: 1.6;
  color: #f1e6c4;
}

/* ---------- Quests ---------- */
#quests {
  position: fixed;
  top: 200px;
  right: 16px;
  width: 220px;
  pointer-events: none;
  text-shadow: 0 1px 3px #000;
}

.quest {
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid #f3d27a;
}

.quest b {
  display: block;
  font-size: 14px;
  color: #f3d27a;
}

.quest small {
  font-size: 12px;
  color: #eee;
}

.quest.done {
  border-left-color: #7dff9a;
}

.quest.done small {
  color: #9dffb5;
}

/* ---------- Gesprek ---------- */
#dialog {
  z-index: 20;
  position: fixed;
  left: 50%;
  bottom: 90px;
  width: min(640px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 14px 20px 12px;
  background: linear-gradient(rgba(20, 16, 10, 0.92), rgba(10, 8, 5, 0.92));
  border: 1px solid rgba(243, 210, 122, 0.6);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

#dialog-name {
  margin-bottom: 6px;
  font-size: 15px;
  letter-spacing: 2px;
  color: #f3d27a;
  text-transform: uppercase;
}

#dialog-text {
  font-size: 18px;
  line-height: 1.5;
  color: #f4ecd6;
}

#dialog-text b {
  color: #ffd76a;
}

#dialog-hint {
  margin-top: 8px;
  text-align: right;
  font-size: 12px;
  color: #aaa;
}

#dialog-hint b {
  color: #ffd76a;
}

/* ---------- Wereldkaart (T) ---------- */
.world-map {
  display: block;
  width: 100%;
  border: 1px solid rgba(201, 185, 138, 0.5);
  border-radius: 4px;
  background: #2b3326;
}
