/* Dig for files: the dedigger game page. */
:root {
  --bg: #151515;
  --text: #f1ece0;
  --muted: #b9b0a0;
  --accent: #CF4327;
  --light: #EAE2C2;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
}

.play-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #0d0d0d;
}

.play-brand {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
}

.play-header nav a {
  margin-left: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.play-main {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 16px 24px;
}

.play-main h1 {
  margin: 2px 0 8px;
  font-size: 1.15rem;
  text-align: center;
}

.play-hud {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.play-hud b {
  color: var(--text);
}

#hud-lives {
  color: var(--accent);
  letter-spacing: 2px;
}

.play-hud {
  align-items: center;
}

.play-pause {
  border: 1px solid #3d362e;
  border-radius: 6px;
  padding: 2px 8px;
  background: #2a2520;
  color: var(--light);
  font-size: 0.7rem;
  cursor: pointer;
}

.play-lost {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.play-lost a,
.play-footer a {
  color: var(--light);
}

.play-stage {
  position: relative;
  margin: 0 auto;
}

#game {
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  touch-action: none;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  border-radius: 6px;
  background: rgba(13, 13, 13, 0.85);
  text-align: center;
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  color: var(--light);
}

.play-overlay p {
  margin: 0 0 18px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.play-overlay-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.play-overlay .play-share {
  background: #107a6e;
}

.play-overlay .play-share[hidden] {
  display: none;
}

.play-share-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.play-share-links[hidden] {
  display: none;
}

.play-share-links a {
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  text-decoration: none;
}

.play-share-links [data-net="x"] {
  background: #000;
  box-shadow: inset 0 0 0 1px #555;
}

.play-share-links [data-net="bluesky"] {
  background: #0b62cf;
}

.play-share-links [data-net="facebook"] {
  background: #1565d8;
}

.play-share-links [data-net="telegram"] {
  background: #1f6fae;
}

.play-share-links [data-net="whatsapp"] {
  background: #107a6e;
}

.play-overlay button,
.play-light {
  border: 0;
  border-radius: 6px;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  font: bold 1rem Verdana, Geneva, sans-serif;
  cursor: pointer;
}

.play-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.play-dpad {
  display: grid;
  grid-template-columns: repeat(3, 54px);
  grid-template-rows: repeat(3, 54px);
  gap: 4px;
}

.play-dpad button {
  border: 1px solid #3d362e;
  border-radius: 10px;
  background: #2a2520;
  color: var(--light);
  font-size: 1.2rem;
  touch-action: none;
}

.play-dpad button.is-on {
  background: #4a4137;
}

.play-dpad [data-dir="up"] {
  grid-column: 2;
  grid-row: 1;
}

.play-dpad [data-dir="left"] {
  grid-column: 1;
  grid-row: 2;
}

.play-dpad [data-dir="right"] {
  grid-column: 3;
  grid-row: 2;
}

.play-dpad [data-dir="down"] {
  grid-column: 2;
  grid-row: 3;
}

.play-light {
  width: 96px;
  height: 96px;
  padding: 0;
  border-radius: 50%;
  touch-action: none;
}

.play-light.is-on {
  background: #e0603f;
}

.play-help {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.play-pause[hidden] {
  display: none;
}

.play-pause.is-off {
  color: #6f665a;
  text-decoration: line-through;
}

.play-score-form {
  width: 100%;
  max-width: 280px;
  margin: 0 0 16px;
}

.play-score-form[hidden] {
  display: none;
}

.play-score-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--light);
}

.play-score-row {
  display: flex;
  gap: 8px;
}

.play-score-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #3d362e;
  border-radius: 6px;
  background: #0d0d0d;
  color: var(--text);
  font: 1rem Verdana, Geneva, sans-serif;
}

.play-overlay .play-score-row button {
  padding: 8px 14px;
}

.play-overlay .play-score-msg {
  min-height: 1.2em;
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.play-top {
  margin-top: 20px;
}

.play-top h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  text-align: center;
}

.play-top table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.play-top th,
.play-top td {
  padding: 6px 8px;
  border-bottom: 1px solid #2a2520;
  text-align: left;
}

.play-top th {
  font-weight: normal;
  color: var(--muted);
}

.play-top th:nth-child(n+3),
.play-top td:nth-child(n+3) {
  text-align: right;
}

.play-top td[colspan] {
  color: var(--muted);
  text-align: center;
}

.play-top tr.is-you td {
  background: #2a2520;
  color: var(--light);
  font-weight: bold;
}

.play-top-note {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* Ad units, as in css/dedigger-extra.css: a labeled box under the top 10 and
 * a 160x600 column beside the game on wide screens. js/ddg-commercial.js only
 * loads a unit whose box is visible. */
.ddg-ad {
  position: relative;
  max-width: 640px;
  margin: 28px auto 0;
  padding: 1.25rem 0.25rem 0.75rem;
  border: 1px dashed #b5a98a;
  border-radius: 4px;
  background: #faf8f1;
}

.ddg-ad-label {
  position: absolute;
  top: -0.65rem;
  left: 0.75rem;
  padding: 0 0.4rem;
  background: #faf8f1;
  color: #574730;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ddg-ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.ddg-ad-slot iframe {
  flex: none;
  display: block;
  border: 0;
}

.ddg-rail {
  display: none;
}

@media (min-width: 900px) {
  .ddg-rail {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: 178px;
  }

  .ddg-rail-left {
    left: auto;
    right: 100%;
  }

  .ddg-ad.ddg-ad-rail {
    position: sticky;
    top: 1.5rem;
    margin: 0.75rem 0 0;
    padding: 1.25rem 8px 8px;
  }
}

.play-footer {
  padding: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.play-credits {
  max-width: 448px;
  margin: 12px auto 0;
  text-align: left;
}

.play-credits summary {
  cursor: pointer;
  text-align: center;
}

.play-credits p,
.play-credits ul {
  margin: 8px 0 0;
  line-height: 1.5;
}

.play-credits ul {
  padding-left: 18px;
}

@media (hover: hover) and (pointer: fine) {
  .play-controls {
    display: none;
  }
}

@media (pointer: coarse) {
  .play-help {
    display: none;
  }
}
