/* General Styles */
html,
body {
  height: 100%;
  width: 100%;
  background-color: #dedede;
  color: black;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  transition: background-color 0.5s ease, color 0.5s ease;
}

header {
  width: 100%;
  height: 100px;
  padding: 10px 0;
  background-color: #c8c8c8;
  position: fixed;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.header-divider {
  width: 100%;
  height: 2px;
  background-color: #7d7d7d;
  position: fixed;
  top: 100px;
  z-index: 9;
}

.link {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
}

.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.5s ease, color 0.5s ease;
}

#darkModeToggle {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

main {
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

main .content {
  width: 100%;
  max-width: 800px;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: background-color 0.5s ease, color 0.5s ease;
}

.darkLightText {
  color: #646464;
}

/* Common & Simple Styles */
.orbitron {
  font-family: 'Orbitron', sans-serif;
}

.hidden {
  display: none !important;
}

.center {
  align-self: center;
  text-align: center;
  align-items: center;
  vertical-align: middle;
}

.rounded {
  border-radius: 20px;
}

.scrollable {
  overflow-y: auto;
}

.divider {
  width: 100%;
  height: 2px;
  background-color: #7d7d7d;
  margin: 30px 0;
}

/* Dark Mode Styles */
html.dark-mode,
body.dark-mode {
  background-color: #1e1e1e;
  color: white;
}

header.dark-mode {
  background-color: #282828;
  color: white;
}

main .content.dark-mode {
  background-color: #323232;
  color: white;
}

.header-divider.dark-mode {
  background-color: #afafaf;
}

.divider.dark-mode {
  background-color: #afafaf;
}

html.dark-mode #leaderboard.collection {
  background-color: #2b2b2b;
  border: 1px solid #555;
}

html.dark-mode #leaderboard.collection .collection-item {
  background-color: #2b2b2b;
  color: #ffffff;
  border-bottom: 1px solid #555;
}

/* Make the right-side time text readable in dark mode */
html.dark-mode #leaderboard.collection .collection-item .grey-text {
  color: #cfcfcf !important;
}

/* ---- Game UI ---- */
.big-rank {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 1px;
  margin: 16px 0 8px 0;
}

.small-board {
  max-width: 520px;
  margin: 0 auto;
}

.status-text {
  font-size: 18px;
  margin: 8px 0 10px;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

.overlay-inner {
  text-align: center;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.overlay-message {
  font-size: 56px;
  font-weight: 900;
  color: white;
  margin-bottom: 8px;
}

.overlay-subtext {
  font-size: 16px;
  color: #e0e0e0;
  margin-bottom: 8px;
}

.overlay-hint {
  font-size: 14px;
  color: #f0f0f0;
  opacity: 0.6;
}

.overlay.click-state .overlay-inner {
  animation: pulse 0.9s ease-out infinite;
}

/* Neon red "CLICK!" state for overlay card */
.overlay.click-state .overlay-inner {
  background: rgba(255, 23, 68, 0.2);
  /* translucent red glass */
  border: 2px solid #ff1744;
  /* neon red edge */
  box-shadow:
    0 0 12px rgba(255, 23, 68, 0.7),
    0 0 24px rgba(255, 23, 68, 0.6),
    0 0 48px rgba(255, 23, 68, 0.5);
}

.overlay.click-state .overlay-message {
  color: #ff1744;
  /* neon red text */
  font-size: 72px;
  /* bigger for emphasis */
  letter-spacing: 2px;
  text-shadow:
    0 0 6px rgba(255, 23, 68, 0.8),
    0 0 14px rgba(255, 23, 68, 0.7);
}

/* Hide sub/hint in click state so the card only says CLICK! */
.overlay.click-state .overlay-subtext,
.overlay.click-state .overlay-hint {
  display: none;
}

/* --- CLICK particles --- */
.click-particle {
  position: absolute;
  border-radius: 50%;
  background: #ff1744;
  box-shadow:
    0 0 6px rgba(255, 23, 68, 0.9),
    0 0 14px rgba(255, 23, 68, 0.7),
    0 0 26px rgba(255, 23, 68, 0.5);
  pointer-events: none;
  z-index: 2;
}

/* --- Neon rank styles for placementDisplay (.big-rank) --- */
.rank-gold {
  color: #ffea00;
  text-shadow:
    0 0 6px rgba(255, 234, 0, 0.9),
    0 0 16px rgba(255, 234, 0, 0.7),
    0 0 28px rgba(255, 234, 0, 0.55);
}

.rank-pink {
  color: #ff3ea5;
  text-shadow:
    0 0 6px rgba(255, 62, 165, 0.9),
    0 0 16px rgba(255, 62, 165, 0.7),
    0 0 28px rgba(255, 62, 165, 0.55);
}

.rank-blue {
  color: #00e5ff;
  text-shadow:
    0 0 6px rgba(0, 229, 255, 0.9),
    0 0 16px rgba(0, 229, 255, 0.7),
    0 0 28px rgba(0, 229, 255, 0.55);
}

.rank-purple {
  color: #b388ff;
  text-shadow:
    0 0 6px rgba(179, 136, 255, 0.9),
    0 0 16px rgba(179, 136, 255, 0.7),
    0 0 28px rgba(179, 136, 255, 0.55);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  }

  60% {
    transform: scale(1.02);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  }
}