/* ============================================================================
   POWDER DAY — Crisp Pixelated Bayer-Dithered Fullscreen Canvas Styling
   ============================================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0c1328;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  user-select: none;
  touch-action: none;
}

.pd-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1124;
}

#powder-canvas {
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  cursor: crosshair;
}

#powder-gl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  z-index: 2;
}

#powder-overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 5;
}

.hidden {
  display: none !important;
}

.pd-pill-accent {
  background: rgba(34, 88, 168, 0.72);
  border-color: rgba(162, 214, 255, 0.55);
}

.pd-pill-accent:hover {
  background: rgba(48, 114, 212, 0.9);
}

.pd-pill-slalom {
  background: rgba(178, 44, 48, 0.74);
  border-color: rgba(255, 198, 168, 0.55);
}

.pd-pill-slalom:hover {
  background: rgba(212, 56, 62, 0.9);
}

.pd-pill-mp {
  background: rgba(26, 128, 108, 0.78);
  border-color: rgba(154, 245, 224, 0.55);
}

.pd-pill-mp:hover {
  background: rgba(34, 162, 136, 0.94);
}

.pd-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(7, 12, 26, 0.62);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pd-modal-card {
  width: min(470px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: rgba(13, 21, 44, 0.92);
  border: 1px solid rgba(176, 218, 255, 0.34);
  border-radius: 16px;
  padding: 18px 20px;
  color: #edf5ff;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55);
}

.pd-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: #ffe8a3;
  margin-bottom: 10px;
}

.pd-icon-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #edf5ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.pd-mp-status {
  font-size: 12px;
  color: #9ff0d6;
  background: rgba(24, 52, 72, 0.52);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 12px;
}

.pd-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.pd-form-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #a9c4e8;
}

.pd-form-row input {
  background: rgba(7, 13, 28, 0.85);
  color: #ffffff;
  border: 1px solid rgba(170, 208, 255, 0.35);
  border-radius: 8px;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  user-select: text;
}

.pd-form-row input:focus {
  border-color: #7ee8ff;
}

.pd-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.pd-section-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #93b0d9;
  margin: 10px 0 6px;
}

.pd-rooms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pd-room-chip {
  background: rgba(25, 42, 78, 0.72);
  color: #dbeafe;
  border: 1px solid rgba(154, 198, 255, 0.32);
  border-radius: 999px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pd-room-chip.active {
  background: rgba(30, 148, 122, 0.85);
  border-color: #9ef5dc;
  color: #ffffff;
}

.pd-lb-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  background: rgba(7, 13, 28, 0.55);
  border-radius: 8px;
  padding: 8px 10px;
}

.pd-lb-row {
  color: #e6f0ff;
}

.pd-lb-empty {
  color: #88a4cc;
  font-style: italic;
}

.pd-mp-tip {
  margin-top: 10px;
  font-size: 11px;
  color: #8eaad1;
}

.pd-hud-bar {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100vw - 24px);
}

.pd-pill {
  background: rgba(14, 21, 43, 0.56);
  backdrop-filter: blur(6px);
  color: #e8f1ff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 11px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.pd-pill:hover {
  background: rgba(28, 41, 78, 0.8);
  transform: translateY(-1px);
}

.pd-hints {
  position: fixed;
  bottom: 12px;
  left: 14px;
  z-index: 20;
  font-size: 11px;
  color: rgba(235, 244, 255, 0.65);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.pd-boot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d152c;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
  z-index: 50;
  transition: opacity 0.35s ease;
}

.pd-boot.hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 640px) {
  .pd-hints { display: none; }
  .pd-pill { font-size: 11px; padding: 5px 9px; }
}
