/* 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;
}

.press-start {
  font-family: 'Press Start 2P', cursive;
}

.hidden {
  display: none;
}

.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;
}


/* ===== GENERAL GAME LOOK ===== */

.content {
  margin-top: 10px;
}

.game-card {
  border-radius: 14px;
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

.dark-mode .game-card {
  background: #121421;
  border-color: #90caf9;
  box-shadow: 0 0 24px rgba(129, 212, 250, 0.7);
}

.game-heading {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.game-subtitle {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 16px;
}

.game-instructions {
  margin-top: 4px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.game-btn.btn {
  font-family: 'Press Start 2P', system-ui;
  text-transform: none;
  letter-spacing: 0.08em;
  padding: 8px 18px;
  background-color: #2196f3 !important;
  color: #ffffff !important;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.dark-mode .game-btn.btn {
  background-color: #90caf9 !important;
  color: #000000 !important;
}

/* ===== REACTION POPUP ===== */

.reaction-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: background-color 0.5s ease;
}

.dark-mode .reaction-overlay {
  background: rgba(0, 0, 0, 0.85);
}

.reaction-popup {
  padding: 40px 60px;
  font-size: 1.8rem;
  border-radius: 16px;
  background: #f5f5f5;
  color: #212121;
  box-shadow: 0 0 30px rgba(129, 212, 250, 0.9);
}

.dark-mode .reaction-popup {
  background: #141627;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(129, 212, 250, 0.9);
}

.reaction-popup.reaction-ready {
  background-color: #d32f2f !important;
  color: #ffffff !important;
}

.reaction-text {
  font-weight: 600;
  font-family: 'Press Start 2P', system-ui;
  letter-spacing: 0.1em;
}

/* ===== CLICK SPEED: BOX + WAVES ===== */

.click-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  /* fixed size */
  height: 110px;
  /* fixed size */
  padding: 0;
  border-radius: 10px;
  border: 2px solid #2196f3;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  font-family: 'Press Start 2P', system-ui;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  overflow: hidden;
  background: rgba(21, 101, 192, 0.1);
  box-shadow: 0 0 15px rgba(33, 150, 243, 0.6);
  text-align: center;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

.dark-mode .click-box {
  background: rgba(21, 101, 192, 0.35);
  border-color: #90caf9;
}


/* Ripple "wave" effect */
.click-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: clickRipple 0.5s ease-out;
  background: rgba(144, 202, 249, 0.65);
  opacity: 0.9;
  pointer-events: none;
}

@keyframes clickRipple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ===== TYPING DISPLAY ===== */

.typing-display {
  border-radius: 8px;
  padding: 15px;
  min-height: 120px;
  white-space: pre-wrap;
  font-family: 'Times New Roman', serif;
  font-size: 1.2rem;
  font-style: normal;
  margin-bottom: 20px;
  background: rgba(232, 234, 246, 0.9);
  border: 1px solid #9fa8da;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

.dark-mode .typing-display {
  background: rgba(26, 35, 126, 0.8);
  border-color: #7986cb;
}

.correct-char {
  color: #00e676;
  /* neon green */
}

.incorrect-char {
  color: #ff5252;
  /* bright red */
}

.test-result {
  margin-top: 15px;
  font-weight: 500;
}

#typingInput {
  transition: background-color 0.5s ease, color 0.5s ease;
  background-color: #ffffff !important;
  color: #000000 !important;
  border-bottom: 1px solid #90caf9 !important;
  box-shadow: 0 1px 0 0 #90caf9 !important;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 1rem;
  font-family: 'Press Start 2P', system-ui;
}

.dark-mode #typingInput {
  background-color: #121421 !important;
  color: #ffffff !important;
  border-bottom: 1px solid #90caf9 !important;
  box-shadow: 0 1px 0 0 #90caf9 !important;
}

.dark-mode label {
  color: #ffffff !important;
}

/* ===== DARK MODE: DROPDOWNS / INPUTS VISIBILITY ===== */

.dark-mode body,
.dark-mode .content {
  color: #e0e0e0;
}

/* Materialize select input text */
.dark-mode .select-dropdown {
  color: #ffffff !important;
  background-color: #121421 !important;
  border-bottom: 1px solid #90caf9 !important;
}

/* Materialize dropdown menu list */
.dropdown-content {
  transition: background-color 0.5s ease;
}

.dark-mode .dropdown-content {
  background-color: #121421 !important;
}

.dark-mode .dropdown-content li>span {
  color: #ffffff !important;
}

.dark-mode .dropdown-content li:hover>span,
.dark-mode .dropdown-content li.active>span {
  background-color: #1e293b !important;
}

/* Standard text inputs */
.dark-mode input[type="text"],
.dark-mode input[type="number"],
.dark-mode input[type="search"] {
  color: #ffffff;
}

.dark-mode .input-field label {
  color: #b0bec5;
}

.dark-mode input[type="text"]:focus+label {
  color: #90caf9 !important;
}

.dark-mode input[type="text"]:focus {
  border-bottom: 1px solid #90caf9 !important;
  box-shadow: 0 1px 0 0 #90caf9 !important;
}