/* -----------------------------
   Honeycomb 95 Base Layout
----------------------------- */

.hive-page {
  min-height: 100vh;
  padding: 24px;
}

.hive-window {
  max-width: 1100px;
  margin: 0 auto;
}

.window-card {
  border: 2px solid #000;
  background: #c0c0c0;
  box-shadow: 4px 4px 0 #000;
}

.window-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: navy;
  color: white;
  padding: 4px 8px;
  font-weight: bold;
  font-family: "MS Sans Serif", Arial, sans-serif;
}

.window-buttons {
  letter-spacing: 4px;
}

.window-body {
  padding: 16px;
}

.hive-intro {
  max-width: 760px;
}

.hive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.hive-board-panel {
  overflow-x: auto;
  border: 2px inset #fff;
  background: #808080;
  padding: 20px;

  display: flex;
  justify-content: center;
}

.hive-row {
  display: none;
}

.hive-board {
  position: relative;
  min-width: 0;
  padding: 0;
}

.hive-tile.tile-empty.claimed {
  background: #8c8c8c;
  clip-path: polygon(
    25% 0%,
    75% 0%,
    100% 50%,
    75% 100%,
    25% 100%,
    0% 50%
  );
}

.hive-tile {
  position: absolute;
  width: 58px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  font-family: "MS Sans Serif", Arial, sans-serif;

  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  touch-action: manipulation;
  clip-path: none;
}

.hive-tile:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.hive-tile:disabled {
  cursor: default;
}

.hive-tile.unclaimed {
  background: transparent;
}

.hive-tile.claimed {
  background: transparent;
}

.hive-tile-icon.unclaimed-icon {
  width: 56px;
  height: 56px;
  opacity: 0.72;
  filter: grayscale(15%) brightness(1.08);
}

.hive-tile-icon.claimed-icon {
  width: 34px;
  height: 34px;
  opacity: 1;
}

.hive-tile.tile-honey,
.hive-tile.tile-wax,
.hive-tile.tile-bee,
.hive-tile.tile-bloom,
.hive-tile.tile-queen,
.hive-tile.tile-smoke,
.hive-tile.tile-empty {
  background: transparent;
}

.hive-tile.tile-empty .hive-tile-icon.claimed-icon {
  width: 50px;
  height: 50px;
}

.hive-sidebar {
  display: grid;
  gap: 16px;
}

.mini-window {
  box-shadow: 3px 3px 0 #000;
}

.hive-scores {
  padding-left: 22px;
  margin: 0;
}

.hive-scores li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.hive-legend {
  margin: 0;
  padding-left: 18px;
}

.hive-legend li {
  margin-bottom: 6px;
}

.icon-legend {
  list-style: none;
  padding-left: 0;
}

.icon-legend li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.icon-legend img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}

.empty-tile-legend {
  width: 34px;
  height: 38px;
  position: relative;
  display: inline-block;
  background: #777;
  clip-path: polygon(
    25% 0%,
    75% 0%,
    100% 50%,
    75% 100%,
    25% 100%,
    0% 50%
  );
}

.hive-footer-link {
  margin-top: 18px;
}

.champions-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.champion-card {
  background: #f5f5f5;
  border: 2px solid #888;
  padding: 14px;
}

.champion-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.champion-card h2 {
  margin-bottom: 2px;
}

.champion-subtitle {
  margin: 0;
  color: #555;
  font-size: 12px;
  font-weight: 700;
}

.champion-score {
  background: #fff2bc;
  border: 2px inset #fff;
  padding: 8px 10px;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.champion-standings {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.champion-standings li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dotted #888;
  padding-top: 6px;
}

.mobile-scroll-hint {
  display: none;
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

/* -----------------------------
   Honeycomb 95 Mobile Optimization
   Desktop layout intentionally stays mostly untouched.
----------------------------- */

@media (max-width: 900px) {
  .hive-page {
    max-width: 100%;
    padding: 8px;
  }

  .mobile-scroll-hint {
    display: block;
  }

  .hive-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hive-window {
    width: 100%;
  }

  .hive-board-panel {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }

  .hive-board {
    width: max-content;
    min-width: 620px;
  }

  .hive-sidebar {
    display: grid;
    gap: 12px;
    min-width: 0;
  }

  .mini-window {
    width: 100%;
  }

  .hive-intro {
    font-size: 15px;
  }

  .hive-row {
    height: 44px;
  }

  .hive-tile {
    width: 52px;
    height: 46px;
  }

  .hive-tile-icon.claimed-icon {
    width: 30px;
    height: 30px;
  }

  .hive-tile-icon.unclaimed-icon {
    width: 50px;
    height: 50px;
  }

  .icon-legend li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
  }

  .icon-legend img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 520px) {
  .hive-page {
    padding: 5px;
  }

  .hive-board-panel {
    padding: 8px;
  }

  .hive-board {
    min-width: 560px;
  }

  .hive-row {
    height: 40px;
  }

  .hive-tile {
    width: 46px;
    height: 40px;
    margin-right: 3px;
  }

  .hive-tile-icon.claimed-icon {
    width: 26px;
    height: 26px;
  }

  .hive-tile-icon.unclaimed-icon {
    width: 44px;
    height: 44px;
  }

  .hive-tile.tile-empty .hive-tile-icon.claimed-icon {
    width: 40px;
    height: 40px;
  }

  .hive-tile.unclaimed {
    background: transparent;
    border-color: transparent;
  }

  .hive-tile.claimed {
    background: transparent;
  }

  #hiveStatus {
    font-size: 13px;
  }

  .hive-scores li {
    font-size: 14px;
  }

  .hive-page .window-titlebar {
    font-size: 13px;
  }

  .champion-card header,
  .champion-standings li {
    display: grid;
    gap: 6px;
  }

  .champion-score {
    width: fit-content;
  }
}
