/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#board {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #f5f5f0;
  cursor: crosshair;
}

#board.stamped {
  cursor: default;
}

.stamp {
  position: absolute;
  font-size: 28px;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}

.stamp--new {
  animation: stamp-drop 0.5s linear;
}

@keyframes stamp-drop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.8) rotate(-8deg);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.85) rotate(2deg);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15) rotate(-1deg);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.95) rotate(0.5deg);
  }
  85% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.03) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

#visitor-counter {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  border-radius: 20px;
  pointer-events: none;
  user-select: none;
}

.visitor-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#stats-panel {
  position: fixed;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  z-index: 10;
  pointer-events: auto;
  min-width: 160px;
}

#stats-panel .stats-header {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

#stats-panel .stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#stats-panel .stats-label {
  opacity: 0.7;
}

#stats-panel .stats-value {
  font-weight: 600;
}

#stats-panel .stats-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 8px 0;
}

#stats-panel .stats-top-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
  margin-bottom: 4px;
}

#stats-panel .stats-top-country {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 1px 0;
}

#stats-panel .stats-top-country .stats-count {
  margin-left: auto;
  font-weight: 600;
  opacity: 0.8;
}

@media (max-width: 480px) {
  #stats-panel {
    font-size: 12px;
    padding: 10px 14px;
    bottom: 8px;
    left: 8px;
    min-width: 140px;
  }
}
