/* ============================================
   $DNS — DON'T SELL game
   ============================================ */

.brand-link {
  text-decoration: none;
  color: inherit;
}

.game-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

/* ============================================
   HUD
   ============================================ */
.hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hud-box {
  background: var(--xp-gray);
  padding: 10px 14px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  border-right: 3px solid #404040;
  border-bottom: 3px solid #404040;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.hud-label {
  font-family: var(--pixel);
  font-size: 10px;
  color: #000;
  letter-spacing: 1.5px;
}

.hud-value {
  font-family: var(--pixel);
  font-size: 22px;
  color: var(--xp-blue);
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

#price.up { color: #0a8a0a; }
#price.down { color: var(--xp-red); }

/* ============================================
   CHART WINDOW
   ============================================ */
.chart-window {
  background: var(--xp-gray);
  padding: 0;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  border-right: 3px solid #404040;
  border-bottom: 3px solid #404040;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.4);
}

.chart-titlebar {
  background: linear-gradient(180deg, var(--xp-blue-light) 0%, var(--xp-blue) 50%, var(--xp-blue-dark) 100%);
  color: #fff;
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-shadow: 1px 1px 0 #000;
  border-bottom: 2px solid #000;
}

.chart-dots {
  display: flex;
  gap: 4px;
}

.dot {
  width: 16px;
  height: 16px;
  background: var(--xp-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-family: var(--pixel);
  font-size: 9px;
  line-height: 1;
}

.dot-close {
  background: var(--xp-red);
  color: #fff;
}

#chart {
  display: block;
  width: 100%;
  height: 220px;
  background: #000;
  image-rendering: pixelated;
}

/* ============================================
   DIALOG (start, popups, gameover)
   ============================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 80, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.overlay.hidden { display: none; }

.dialog {
  background: var(--xp-gray);
  width: 100%;
  max-width: 540px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  border-right: 3px solid #404040;
  border-bottom: 3px solid #404040;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.6);
  padding: 0;
}

.dialog-titlebar {
  background: linear-gradient(180deg, var(--xp-blue-light) 0%, var(--xp-blue) 50%, var(--xp-blue-dark) 100%);
  color: #fff;
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 7px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-shadow: 1px 1px 0 #000;
  border-bottom: 2px solid #000;
}

.dialog-titlebar-error {
  background: linear-gradient(180deg, #ff5050 0%, var(--xp-red) 50%, #800000 100%);
}

.dialog-body {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialog-headline {
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--xp-blue);
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.gameover-headline {
  color: var(--xp-red);
}

.dialog-text {
  font-family: var(--terminal);
  font-size: 20px;
  color: #000;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.dialog-text b {
  color: var(--xp-red);
}

.dialog-actions {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}

/* ============================================
   XP BUTTONS
   ============================================ */
.xp-btn {
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: 2px;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 3px 3px 0 #000;
  text-shadow: 1px 1px 0 #000;
  transition: transform 0.04s linear;
  color: #fff;
}

.xp-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 #000;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.xp-btn-hold {
  background: var(--xp-blue);
  border-top-color: var(--xp-blue-light);
  border-left-color: var(--xp-blue-light);
  border-right-color: var(--xp-blue-dark);
  border-bottom-color: var(--xp-blue-dark);
}
.xp-btn-hold:hover { background: var(--xp-blue-light); }

.xp-btn-sell {
  background: var(--xp-red);
  border-top-color: #ff8080;
  border-left-color: #ff8080;
  border-right-color: #800000;
  border-bottom-color: #800000;
  animation: shake-sell 0.4s ease-in-out infinite;
}
.xp-btn-sell:hover { background: #ff5050; }

@keyframes shake-sell {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, -1px); }
}

/* ============================================
   POPUPS
   ============================================ */
#popupArea {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.popup {
  position: absolute;
  width: 340px;
  background: var(--xp-gray);
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  border-right: 3px solid #404040;
  border-bottom: 3px solid #404040;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.5);
  pointer-events: auto;
  animation: popup-in 0.15s ease-out;
}

@keyframes popup-in {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.popup-titlebar {
  background: linear-gradient(180deg, #ff5050 0%, var(--xp-red) 50%, #800000 100%);
  color: #fff;
  font-family: var(--pixel);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-shadow: 1px 1px 0 #000;
  border-bottom: 2px solid #000;
}

.popup-body {
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popup-icon-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.popup-icon {
  width: 32px;
  height: 32px;
  background: var(--xp-red);
  color: #fff;
  font-family: var(--pixel);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px solid #ff8080;
  border-left: 2px solid #ff8080;
  border-right: 2px solid #800000;
  border-bottom: 2px solid #800000;
  flex-shrink: 0;
  text-shadow: 1px 1px 0 #000;
}

.popup-msg {
  font-family: var(--terminal);
  font-size: 18px;
  color: #000;
  line-height: 1.15;
  flex: 1;
}

.popup-timer-bar {
  height: 10px;
  background: #fff;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  overflow: hidden;
}

.popup-timer-fill {
  height: 100%;
  background: var(--xp-red);
  width: 100%;
  transform-origin: left center;
  animation: timer-shrink linear forwards;
}

@keyframes timer-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.popup-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.popup-actions .xp-btn {
  font-size: 11px;
  padding: 9px 16px;
  letter-spacing: 1.5px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 700px) {
  .game-content {
    padding: 18px 14px;
  }
  .hud { grid-template-columns: 1fr 1fr; }
  .hud-box:last-child { grid-column: span 2; }
  .hud-value { font-size: 18px; }
  .popup { width: 92vw; max-width: 340px; }
  .dialog-headline { font-size: 13px; }
  .dialog-text { font-size: 16px; }
}
