@font-face {
  font-family: "Monocraft";
  src: url("monocraft.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-family: "Monocraft", monospace, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: #2b1d14;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  -webkit-font-smoothing: none;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.3)), url("bg.svg");
  background-repeat: repeat;
  background-size: 96px 96px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  padding: 16px;
}

a {
  color: #ffff55;
  text-decoration: underline;
}

a:hover {
  color: #ffffff;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Header & Navigation */
.site-header {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto 24px auto;
}

.nav-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Stone Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #6f6f6f;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  text-decoration: none;
  border: 2px solid #000000;
  box-shadow: inset 2px 2px 0 #9e9e9e, inset -2px -2px 0 #3f3f3f;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
}

.btn:hover {
  background-color: #7d7d7d;
  color: #ffffa0;
}

.btn:active {
  box-shadow: inset 2px 2px 0 #3f3f3f, inset -2px -2px 0 #9e9e9e;
  background-color: #616161;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.25rem;
  min-width: 180px;
}

.big-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0;
}

/* Panels */
.panel {
  background-color: rgba(0,0,0,.6);
  border: 2px solid #000000;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.14);
  padding: 16px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  margin-bottom: 24px;
}

.panel-title {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 12px;
  text-shadow: 2px 2px 0 #3f3f3f;
}

.panel-subtitle {
  color: #aaaaaa;
  font-size: 0.85rem;
  margin-top: -8px;
  margin-bottom: 12px;
  text-shadow: none;
}

.panel-empty-msg {
  color: #aaaaaa;
  font-style: italic;
  padding: 8px 0;
  text-shadow: none;
}

.section-title {
  font-size: 1.3rem;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  margin: 28px 0 14px 0;
}

/* Slots */
.slot {
  background-color: rgba(0,0,0,.55);
  border: 2px solid rgba(255,255,255,.14);
  box-shadow: none;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  padding: 8px 12px;
}

/* Main Layout */
#app {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* Start Page: Server List Entry */
.server-panel {
  padding: 12px 16px;
}

.server-entry {
  display: flex;
  align-items: center;
  gap: 16px;
}

.server-icon {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 2px solid #000000;
  background-color: #000000;
  flex-shrink: 0;
}

.server-details {
  flex: 1;
  min-width: 0;
}

.server-name {
  font-size: 1.15rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  margin-bottom: 4px;
}

.server-motd {
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
  text-shadow: 1px 1px 0 #111111;
}

.server-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.server-players-count {
  font-size: 0.95rem;
  color: #aaaaaa;
  text-shadow: none;
}

/* Signal Bars */
.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  padding: 2px;
}

.signal-bar {
  width: 4px;
  background-color: #55ff55;
  border: 1px solid #000000;
}

.signal-bar:nth-child(1) { height: 6px; }
.signal-bar:nth-child(2) { height: 10px; }
.signal-bar:nth-child(3) { height: 14px; }
.signal-bar:nth-child(4) { height: 18px; }
.signal-bar:nth-child(5) { height: 22px; }

.signal-bars.offline .signal-bar {
  background-color: #555555;
}

.signal-bars.offline {
  position: relative;
}

.signal-bars.offline::after {
  content: "✕";
  position: absolute;
  top: -2px;
  right: -2px;
  color: #ff5555;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000000;
}

/* Online Players List / Cards */
.online-list, .all-players-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.player-card:hover {
  filter: brightness(1.15);
}

.player-head {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
}

.player-name {
  color: #ffffff;
  font-size: 1rem;
  word-break: break-all;
}

/* Events List */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
}

/* Advancement Toast */
.event-advancement {
  background: rgba(33, 33, 33, 0.95);
  border: 2px solid #555555;
  box-shadow: inset 2px 2px 0 #888888, inset -2px -2px 0 #111111;
}

.toast-header {
  color: #ffff55;
  font-size: 0.85rem;
  text-shadow: 1px 1px 0 #3f3f3f;
  margin-bottom: 2px;
}

/* Death Chat Line */
.event-death {
  background: rgba(0, 0, 0, 0.65);
  border-left: 3px solid #ff5555;
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-desc {
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

.event-label {
  color: #55ff55;
  font-weight: bold;
}

.event-time {
  color: #aaaaaa;
  font-size: 0.8rem;
  margin-left: 8px;
  white-space: nowrap;
}

/* Stats Page: Counter Tiles */
.counter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.counter-tile {
  text-align: center;
  margin-bottom: 0;
}

.counter-label {
  font-size: 0.95rem;
  color: #aaaaaa;
  margin-bottom: 8px;
}

.counter-value {
  font-size: 1.3rem;
  font-weight: bold;
  padding: 10px;
}

/* Fact Box */
.fact-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fact-text {
  font-size: 1.1rem;
  line-height: 1.4;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  padding: 8px 0;
}

/* Leaderboards Grid */
.leaderboards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.inventory-window {
  margin-bottom: 0;
}

.leaderboard-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255,255,255,.07);
  border: 2px solid rgba(255,255,255,.12);
  box-shadow: none;
  padding: 4px 8px;
}

.slot-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 0;
  flex-shrink: 0;
}

.slot-rank.rank-1 {
  background-color: #e5b83b;
  box-shadow: inset 2px 2px 0 #ffe082, inset -2px -2px 0 #946914;
  color: #3a2500;
  text-shadow: none;
}

.slot-rank.rank-2 {
  background-color: #c0c0c0;
  box-shadow: inset 2px 2px 0 #ffffff, inset -2px -2px 0 #707070;
  color: #222222;
  text-shadow: none;
}

.slot-rank.rank-3 {
  background-color: #cd7f32;
  box-shadow: inset 2px 2px 0 #e6a066, inset -2px -2px 0 #6e3a10;
  color: #2b1300;
  text-shadow: none;
}

.leaderboard-row .player-link {
  flex: 1;
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-row .player-link:hover {
  text-decoration: underline;
  color: #ffff55;
}

.leaderboard-row .player-val {
  font-weight: bold;
  white-space: nowrap;
}

/* Player Page */
.player-profile-panel {
  display: flex;
  align-items: center;
  gap: 24px;
}

.player-body-img {
  width: 140px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(4px 4px 0 #000000);
  flex-shrink: 0;
}

.player-profile-info {
  flex: 1;
}

.player-title {
  font-size: 1.8rem;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.85rem;
  border: 2px solid #000000;
  margin-bottom: 12px;
}

.badge-online {
  background-color: #2a7e2a;
  color: #ffffff;
  box-shadow: inset 1px 1px 0 #55ff55, inset -1px -1px 0 #1b4d1b;
}

.badge-offline {
  background-color: #555555;
  color: #aaaaaa;
  box-shadow: inset 1px 1px 0 #888888, inset -1px -1px 0 #333333;
}

.player-meta {
  font-size: 0.95rem;
  color: #dddddd;
  margin-bottom: 4px;
}

/* Player Stats Grids */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px;
}

.stat-label {
  font-size: 0.85rem;
  color: #aaaaaa;
}

.stat-val {
  font-size: 1.25rem;
  font-weight: bold;
  color: #ffffff;
}

.stat-rank {
  font-size: 0.8rem;
  color: #ffff55;
}

/* Player Favorites */
.favs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.fav-panel {
  margin-bottom: 0;
}

.fav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fav-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  padding: 4px 8px;
}

.fav-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-count {
  font-weight: bold;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  max-width: 1000px;
  width: 100%;
  margin: 32px auto 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 2px solid #553b26;
  font-size: 0.85rem;
  color: #aaaaaa;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.empty-msg {
  color: #aaaaaa;
  font-style: italic;
  padding: 12px 0;
}

/* Section Header Row with Action Button */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px 0;
}

.section-header-row .section-title {
  margin: 0;
}

/* Playtime Stacked Bar Chart */
.playtime-panel {
  position: relative;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-bottom: 16px;
  padding: 6px 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid #000000;
  display: inline-block;
  flex-shrink: 0;
}

.legend-label {
  color: #ffffff;
  font-size: 0.9rem;
  text-shadow: 2px 2px 0 #3f3f3f;
}

.chart-wrapper {
  width: 100%;
  overflow-x: auto;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 500px;
}

.chart-hit-col {
  cursor: pointer;
}

.chart-hit-col:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  padding: 8px 12px;
  transform: translateX(-50%);
  font-size: 0.85rem;
  background: rgba(0,0,0,.85);
  border: 2px solid rgba(255,255,255,.2);
  min-width: 160px;
}

.tooltip-date {
  font-weight: bold;
  margin-bottom: 4px;
  color: #ffff55;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #dddddd;
  font-size: 0.8rem;
}

.tooltip-total {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,.2);
  font-weight: bold;
  color: #ffffff;
}

.chart-details {
  margin-top: 16px;
}

.chart-details summary {
  display: inline-flex;
  cursor: pointer;
  list-style: none;
  margin-bottom: 8px;
}

.chart-details summary::-webkit-details-marker {
  display: none;
}

.chart-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.85rem;
}

.chart-table th, .chart-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.chart-table th {
  color: #aaaaaa;
  text-shadow: none;
}

.chart-table .table-total {
  font-weight: bold;
  color: #ffff55;
}

/* Firsts List */
.firsts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.first-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.first-row .event-label {
  color: #55ff55;
  font-weight: bold;
  white-space: nowrap;
}

.first-row .player-link {
  flex: 1;
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.first-row .player-link:hover {
  text-decoration: underline;
  color: #ffff55;
}

.firsts-show-all {
  margin-top: 12px;
  align-self: flex-start;
}

/* Advancements on Player Page */
.progress-header {
  font-size: 0.95rem;
  color: #aaaaaa;
  margin-bottom: 8px;
  text-shadow: none;
}

.progress-bar-slot {
  height: 18px;
  padding: 2px;
  margin-bottom: 16px;
  position: relative;
  background: rgba(0,0,0,.6);
}

.progress-bar-fill {
  height: 100%;
  background-color: #80ff20;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.3);
}

.adv-category {
  margin-bottom: 8px;
  padding: 0;
}

.adv-summary {
  cursor: pointer;
  padding: 8px 12px;
  font-weight: bold;
  color: #ffffff;
  user-select: none;
}

.adv-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px 12px 12px;
}

.adv-item {
  padding: 6px 10px;
  border-left: 3px solid #80ff20;
  background: rgba(255,255,255,.05);
}

.adv-item.adv-item-dimmed {
  opacity: 0.45;
  border-left: 3px solid #555555;
}

.adv-item-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.adv-title {
  font-weight: bold;
  color: #ffffff;
}

.adv-desc {
  font-size: 0.8rem;
  color: #aaaaaa;
  margin-top: 2px;
  text-shadow: none;
}

/* Last Death */
.death-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.death-location-text {
  font-size: 1rem;
  color: #ffffff;
  font-weight: bold;
}

.death-map-link {
  text-decoration: none;
}

/* Activity Grid (Last 7 Days) */
.activity-grid-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: auto;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-day-label {
  width: 90px;
  font-size: 0.8rem;
  color: #aaaaaa;
  text-shadow: none;
  flex-shrink: 0;
}

.activity-cells {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  flex: 1;
  min-width: 360px;
}

.activity-cell {
  aspect-ratio: 1;
  min-width: 12px;
  min-height: 12px;
  border: 1px solid rgba(0,0,0,.5);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  cursor: pointer;
}

.activity-cell:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.player-compare-btn {
  margin-top: 8px;
  display: inline-flex;
  align-self: flex-start;
}

/* Compare Page */
.compare-panel {
  margin-bottom: 24px;
}

.compare-selectors-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0 28px 0;
}

.compare-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.compare-head {
  width: 48px;
  height: 48px;
}

.compare-vs {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffff55;
  text-shadow: 2px 2px 0 #3f3f3f;
}

.compare-select {
  min-width: 160px;
  text-align: center;
  cursor: pointer;
}

.compare-select option {
  background-color: #333333;
  color: #ffffff;
}

.compare-table-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
}

.compare-label {
  color: #ffffff;
  font-size: 0.95rem;
}

.compare-val {
  font-size: 0.95rem;
  color: #cccccc;
  text-align: right;
  white-space: nowrap;
}

.compare-val.winner {
  color: #ffffff;
}

.compare-val.winner strong {
  color: #ffffff;
  font-weight: bold;
}

/* Mobile & Responsiveness */
@media (max-width: 639px) {
  body {
    padding: 16px;
  }

  .server-entry {
    flex-direction: column;
    align-items: flex-start;
  }

  .server-status-col {
    align-items: flex-start;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
  }

  .player-profile-panel {
    flex-direction: column;
    text-align: center;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .counter-tile {
    padding: 10px;
  }

  .counter-value {
    font-size: 1.15rem;
    padding: 6px;
  }

  .leaderboards-grid,
  .stats-grid,
  .favs-grid,
  .online-list,
  .all-players-list {
    grid-template-columns: 1fr;
  }

  .big-buttons {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
  }

  .compare-row {
    grid-template-columns: 1.5fr 1fr 1fr;
    font-size: 0.85rem;
    padding: 6px 8px;
  }

  .compare-selectors-row {
    flex-direction: column;
    gap: 16px;
  }

  .activity-day-label {
    width: 60px;
    font-size: 0.75rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================
   Rekorde, Heatmap, Badges, Orte, Zeitleiste
   ============================================================= */

:root {
  --accent: #55ff55;
  --accent-gold: #ffff55;
  --slot-bg: rgba(0, 0, 0, 0.55);
  --panel-bg: rgba(0, 0, 0, 0.6);
}

/* Rekorde */
.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.record-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
}

.record-title {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 0;
}

.record-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent-gold);
  text-align: center;
  padding: 8px 12px;
}

.record-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.record-player-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.record-player {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-player:hover {
  text-decoration: underline;
  color: var(--accent-gold);
}

.record-date {
  font-size: 0.8rem;
  color: #dddddd;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Heatmap ("Wann ist was los?") */
.heatmap-panel {
  margin-bottom: 24px;
}

.heat-grid {
  display: grid;
  grid-template-columns: auto repeat(24, minmax(0, 1fr));
  gap: 2px;
  align-items: center;
  margin: 14px 0 10px 0;
  width: 100%;
}

.heat-label {
  user-select: none;
}

.heat-corner {
  height: 100%;
}

.heat-hour-label {
  grid-column: span 3;
  font-size: 0.7rem;
  color: #dddddd;
  text-align: left;
  padding-left: 1px;
}

.heat-weekday-label {
  font-size: 0.75rem;
  color: #dddddd;
  text-align: right;
  padding-right: 6px;
  white-space: nowrap;
}

.heat-cell {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.heat-cell:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.heat-0 {
  background-color: rgba(255, 255, 255, 0.06);
}

.heat-1 {
  background-color: rgba(85, 255, 85, 0.28);
}

.heat-2 {
  background-color: rgba(85, 255, 85, 0.52);
}

.heat-3 {
  background-color: rgba(85, 255, 85, 0.76);
}

.heat-4 {
  background-color: var(--accent);
}

.heatmap-peak {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: bold;
  margin-top: 10px;
  text-shadow: 2px 2px 0 #3f3f3f;
}

.heatmap-hint {
  font-size: 0.8rem;
  color: #dddddd;
  margin-top: 4px;
  font-style: italic;
}

/* Abzeichen (Badges on Player Page) */
.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  background-color: var(--slot-bg);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1), inset -1px -1px 0 rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--accent-gold);
  text-shadow: 1px 1px 0 #3f3f3f;
  cursor: help;
  user-select: none;
}

.badge-chip:hover {
  filter: brightness(1.2);
  border-color: var(--accent-gold);
}

.badge-empty {
  padding: 0;
}

/* Orte (Places) */
.orte-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.place-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}

.place-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.place-name {
  font-size: 1.15rem;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 0;
}

.place-dim {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: bold;
  text-shadow: 1px 1px 0 #111111;
}

.place-coords {
  font-size: 0.95rem;
  font-weight: bold;
  color: #ffffff;
  padding: 6px 10px;
}

.place-note {
  font-size: 0.9rem;
  color: #eeeeee;
  line-height: 1.4;
}

.place-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.place-copy-btn,
.place-map-btn {
  font-size: 0.85rem;
  padding: 6px 12px;
}

/* Zeitleiste (Timeline) */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}

.timeline-auto {
  opacity: 0.8;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-title {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 0;
}

.timeline-date {
  font-size: 0.85rem;
  color: #dddddd;
  white-space: nowrap;
}

.timeline-text {
  font-size: 0.95rem;
  color: #eeeeee;
  line-height: 1.4;
}

/* Mobile Adjustments */
@media (max-width: 639px) {
  .heat-grid {
    gap: 1px;
  }

  .heat-hour-label {
    font-size: 0.6rem;
  }

  .heat-weekday-label {
    font-size: 0.65rem;
    padding-right: 3px;
  }

  .records-grid,
  .orte-list {
    grid-template-columns: 1fr;
  }
}

/* Villager */
.vl-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.vl-on {
  border-color: #55ff55 !important;
  color: #55ff55 !important;
}

.vl-big {
  font-size: 1.4rem;
  color: #ffffff;
  margin: 0 0 4px;
}

.vl-sub {
  color: #cccccc;
  text-shadow: none;
  font-size: 0.9rem;
  margin: 4px 0 12px;
}

.vl-header-panel,
.vl-selector-panel {
  margin-bottom: 24px;
}

.vl-idle-panel {
  margin-top: 16px;
  margin-bottom: 24px;
  padding: 12px 16px;
}

.vl-search {
  width: 100%;
  height: 44px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  padding: 0 12px;
  margin: 12px 0;
  box-sizing: border-box;
  outline: none;
}

.vl-search:focus {
  border-color: #ffffff;
}

.vl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: #cccccc;
  text-shadow: none;
}

.vl-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vl-legend-swatch {
  width: 10px;
  height: 10px;
  display: inline-block;
}

.vl-hall {
  margin-bottom: 24px;
}

.vl-hall[hidden],
[hidden] {
  display: none !important;
}

.vl-hall .vl-door {
  text-align: center;
  color: #aaaaaa;
  text-shadow: none;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.14);
  padding: 8px;
  margin: 8px 0;
  font-size: 0.9rem;
}

.vl-aisle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.vl-col h3 {
  font-size: 1.1rem;
  color: #ffffff;
  margin: 8px 0;
}

.vl-row {
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-left: 6px solid #aaaaaa;
  margin: 0 0 4px;
}

.vl-row summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
}

.vl-row summary::-webkit-details-marker {
  display: none;
}

.vl-row summary::marker {
  display: none;
}

.vl-row summary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.vl-row summary img {
  image-rendering: pixelated;
  flex-shrink: 0;
}

.vl-price-box {
  width: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.1rem;
  color: #ffffff;
}

.vl-price-box img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.vl-trade-req {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.vl-dim {
  opacity: 0.6;
}

.vl-plus,
.vl-arrow {
  color: #aaaaaa;
  text-shadow: none;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.vl-row-name {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
}

.vl-row-body {
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vl-row-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.vl-row-info .slot {
  display: inline-block;
  padding: 4px 8px;
}

.vl-stock-text {
  color: #cccccc;
  text-shadow: none;
  font-size: 0.9rem;
}

.vl-other-trade {
  font-size: 0.9rem;
  color: #dddddd;
  text-shadow: none;
}

.vl-prof {
  margin-bottom: 8px;
}

.vl-prof summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  padding: 4px 0;
}

.vl-other-villager {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vl-other-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaaaaa;
  text-shadow: none;
  font-size: 0.9rem;
}

.vl-map-btn {
  padding: 2px 6px;
  font-size: 0.8rem;
}

/* Rechner */
.vl-gear-group {
  margin-bottom: 16px;
}

.vl-group-title {
  font-size: 0.95rem;
  color: #cccccc;
  text-shadow: none;
  margin-bottom: 8px;
}

.vl-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vl-tile {
  min-width: 84px;
  min-height: 84px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  box-sizing: border-box;
  text-align: center;
}

.vl-tile:hover {
  background: rgba(255, 255, 255, 0.08);
}

.vl-tile[aria-pressed="true"] {
  border-color: #55ff55;
  color: #55ff55;
}

.vl-tile img {
  image-rendering: pixelated;
}

.vl-total {
  margin: 20px 0;
  padding: 16px;
}

.vl-total-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: baseline;
  margin-bottom: 8px;
}

.vl-total-item {
  font-size: 1.6rem;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vl-total-item img {
  image-rendering: pixelated;
  vertical-align: middle;
}

.vl-total-level-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.vl-level-main {
  white-space: nowrap;
}

.vl-xp-sub {
  display: block;
  font-size: 0.9rem;
  color: #cccccc;
  text-shadow: none;
  white-space: nowrap;
  margin: 0;
}

.vl-item-panel {
  margin-bottom: 16px;
  padding: 16px;
}

.vl-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.vl-item-head h3 {
  font-size: 1.2rem;
  color: #ffffff;
  margin: 0;
}

.vl-item-head img {
  image-rendering: pixelated;
}

.vl-kits-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

.vl-choice-title {
  font-size: 0.9rem;
  color: #aaaaaa;
  text-shadow: none;
  margin: 10px 0 4px;
}

.vl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.vl-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  cursor: pointer;
  color: #ffffff;
  user-select: none;
  box-sizing: border-box;
}

.vl-chip:hover {
  background: rgba(255, 255, 255, 0.08);
}

.vl-chip:has(input:checked) {
  border-color: #55ff55;
}

.vl-chip:focus-within {
  outline: 2px solid #ffffff;
}

.vl-visually-hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.vl-book-list {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
}

.vl-book-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
}

.vl-book-row img {
  image-rendering: pixelated;
  flex-shrink: 0;
}

.vl-book-name {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.vl-book-where {
  color: #aaaaaa;
  text-shadow: none;
  font-size: 0.85rem;
  margin-left: auto;
}

.vl-book-price {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  justify-content: flex-end;
  color: #ffffff;
}

.vl-book-price img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.vl-book-sum {
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  border-bottom: none;
  padding-top: 8px;
  margin-top: 4px;
}

.vl-steps-title {
  font-size: 1rem;
  color: #ffffff;
  margin: 16px 0 8px;
}

.vl-steps {
  margin: 0 0 12px 0;
  padding-left: 2.2em !important;
  list-style: decimal !important;
}

.vl-step {
  padding: 3px 0;
  font-size: 0.95rem;
  color: #eeeeee;
}

.vl-step-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: 100%;
}

.vl-step-text {
  overflow-wrap: normal;
  word-break: normal;
}

.vl-step-cost {
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 639px) {
  .vl-trade-req {
    display: none;
  }

  .vl-aisle {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .vl-total-stats {
    flex-direction: column;
    gap: 8px;
  }

  .vl-book-row {
    flex-wrap: wrap;
  }

  .vl-book-where {
    width: 100%;
    order: 3;
    padding-left: 32px;
    margin-left: 0;
  }
}
