:root {
  /* example of a standard key: "W" Key on the KB */
  --standard-key-size: 5rem; /* width & height */
}

/* ------------------ BACKGROUND ------------------ */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a, #0f0f0f);
  background-attachment: fixed;
}

/* ------------------ HEADER ------------------ */

.back-button-container {
  max-width: 122rem;
  margin: 0 auto;
  padding: 2rem 3.2rem 0rem 0rem;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 3rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background-color: #2a2a2a;
  border: 0.2rem solid #00ffff;
  border-radius: 0.8rem;
  padding: 1.2rem 2rem;
  color: #00ffff;
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.back-button:hover {
  background-color: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 1.5rem rgba(0, 255, 255, 0.3);
  transform: translateY(-0.2rem);
}

.back-button:active {
  transform: translateY(0);
  background-color: rgba(0, 255, 255, 0.2);
}

.back-arrow {
  font-size: 2rem;
  font-weight: 800;
}

.back-text {
  font-size: 1.6rem;
  font-weight: 600;
}

.intro {
  max-width: 122rem;
  margin: 0 auto;
  padding: 4rem 3.2rem 6rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(10, 10, 10, 0.9));
  border-radius: 2rem;
  border: 1px solid rgba(0, 255, 255, 0.2);
  box-shadow: 
    0 0 3rem rgba(0, 255, 255, 0.1),
    inset 0 0 2rem rgba(0, 255, 255, 0.05);
  margin-top: 2rem;
}

/* Modern Hero Section */
.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  min-height: 60vh;
  position: relative;
}

.hero-content {
  z-index: 2;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(0, 0, 0, 0.95));
  border: 2px solid #00ffff;
  border-radius: 0.8rem;
  padding: 1rem 2rem;
  margin-bottom: 2.4rem;
  backdrop-filter: blur(10px);
  animation: badgeFloat 3s ease-in-out infinite, neonPulse 2s ease-in-out infinite;
  box-shadow: 
    0 0 3rem rgba(0, 255, 255, 0.8),
    0 0 6rem rgba(0, 255, 255, 0.4),
    inset 0 0 1rem rgba(0, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.hero-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.4), transparent);
  animation: scanLine 3s ease-in-out infinite;
}

.badge-icon {
  font-size: 1.6rem;
  animation: iconPulse 2s ease-in-out infinite;
}

.badge-text {
  color: #00ffff;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 1rem rgba(0, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 6.4rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 2.4rem;
  position: relative;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}

.title-line-1 {
  display: block;
  background: linear-gradient(135deg, #00ffff, #00bfff, #0080ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleSlideIn 1s ease-out, neonGlow 2s ease-in-out infinite;
  text-shadow: 
    0 0 2rem rgba(0, 255, 255, 0.8),
    0 0 4rem rgba(0, 255, 255, 0.4),
    0 0 6rem rgba(0, 255, 255, 0.2);
  position: relative;
}

.title-line-1::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
  animation: titleScan 4s ease-in-out infinite;
}

.title-line-2 {
  display: block;
  background: linear-gradient(135deg, #00ffff, #00ff80, #00ff40);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleSlideIn 1s ease-out 0.2s both, neonGlow 2s ease-in-out infinite 1s;
  text-shadow: 
    0 0 2rem rgba(0, 255, 255, 0.8),
    0 0 4rem rgba(0, 255, 255, 0.4),
    0 0 6rem rgba(0, 255, 255, 0.2);
  position: relative;
}

.title-line-2::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
  animation: titleScan 4s ease-in-out infinite 2s;
}

.hero-description {
  font-size: 1.8rem;
  line-height: 1.6;
  color: #00ffff;
  margin-bottom: 3.2rem;
  max-width: 50rem;
  animation: fadeInUp 1s ease-out 0.4s both;
  text-shadow: 0 0 1rem rgba(0, 255, 255, 0.5);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.hero-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 50rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 1.6rem;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 0, 0, 0.95));
  border: 2px solid #00ffff;
  border-radius: 0.8rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease-out 0.6s both, neonPulse 3s ease-in-out infinite;
  box-shadow: 
    0 0 2rem rgba(0, 255, 255, 0.6),
    0 0 4rem rgba(0, 255, 255, 0.3),
    inset 0 0 1rem rgba(0, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
  animation: scanLine 4s ease-in-out infinite;
}

.feature-item:nth-child(2) {
  animation-delay: 0.8s;
}

.feature-item:nth-child(3) {
  animation-delay: 1s;
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 24rem;
}

.feature-item:hover {
  transform: translateY(-0.4rem) scale(1.05);
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 0, 0, 0.98));
  border-color: #00ffff;
  box-shadow: 
    0 0 4rem rgba(0, 255, 255, 1),
    0 0 8rem rgba(0, 255, 255, 0.6),
    0 0 12rem rgba(0, 255, 255, 0.3),
    inset 0 0 2rem rgba(0, 255, 255, 0.2);
}

.feature-icon {
  font-size: 2rem;
  animation: iconBounce 2s ease-in-out infinite;
}

.feature-item:nth-child(2) .feature-icon {
  animation-delay: 0.5s;
}

.feature-item:nth-child(3) .feature-icon {
  animation-delay: 1s;
}

.feature-text {
  color: #00ffff;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 0 1rem rgba(0, 255, 255, 0.8);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 35rem;
  width: 100%;
}

.floating-keyboard {
  position: relative;
  width: 25rem;
  height: 10rem;
  animation: keyboardFloat 4s ease-in-out infinite;
}

.keyboard-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30rem;
  height: 15rem;
  background: radial-gradient(ellipse, rgba(0, 255, 255, 0.8), transparent 70%);
  border-radius: 2rem;
  animation: glowPulse 3s ease-in-out infinite, neonPulse 2s ease-in-out infinite;
  box-shadow: 
    0 0 6rem rgba(0, 255, 255, 1),
    0 0 12rem rgba(0, 255, 255, 0.6),
    0 0 18rem rgba(0, 255, 255, 0.3);
}

.keyboard-outline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 25rem;
  height: 10rem;
  border: 3px solid #00ffff;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(0, 0, 0, 0.95));
  backdrop-filter: blur(10px);
  animation: outlineGlow 2s ease-in-out infinite alternate, neonPulse 3s ease-in-out infinite;
  box-shadow: 
    0 0 3rem rgba(0, 255, 255, 1),
    0 0 6rem rgba(0, 255, 255, 0.6),
    0 0 9rem rgba(0, 255, 255, 0.3),
    inset 0 0 2rem rgba(0, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.keyboard-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.4), transparent);
  animation: scanLine 5s ease-in-out infinite;
}

/* Animations */
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.5rem); }
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes titleSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-3rem);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(2rem);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.3rem); }
}

@keyframes keyboardFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-1rem) rotate(1deg); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes outlineGlow {
  0% { box-shadow: 0 0 2rem rgba(0, 255, 255, 0.3); }
  100% { box-shadow: 0 0 4rem rgba(0, 255, 255, 0.6); }
}

@keyframes neonPulse {
  0%, 100% { 
    filter: brightness(1) drop-shadow(0 0 1rem rgba(0, 255, 255, 0.8));
  }
  50% { 
    filter: brightness(1.2) drop-shadow(0 0 2rem rgba(0, 255, 255, 1));
  }
}

@keyframes scanLine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

@keyframes neonGlow {
  0%, 100% { 
    text-shadow: 
      0 0 2rem rgba(0, 255, 255, 0.8),
      0 0 4rem rgba(0, 255, 255, 0.4),
      0 0 6rem rgba(0, 255, 255, 0.2);
  }
  50% { 
    text-shadow: 
      0 0 3rem rgba(0, 255, 255, 1),
      0 0 6rem rgba(0, 255, 255, 0.6),
      0 0 9rem rgba(0, 255, 255, 0.3);
  }
}

@keyframes titleScan {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Scroll Down Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.scroll-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scroll-arrow:hover {
  transform: translateY(-0.5rem);
}

.scroll-text {
  color: #00ffff;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  text-shadow: 0 0 1rem rgba(0, 255, 255, 0.8);
  animation: textPulse 2s ease-in-out infinite;
}

.scroll-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid #00ffff;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 0, 0, 0.9));
  box-shadow: 
    0 0 1.5rem rgba(0, 255, 255, 0.6),
    inset 0 0 0.5rem rgba(0, 255, 255, 0.1);
  animation: scrollBounce 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.scroll-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
  animation: scanLine 3s ease-in-out infinite;
}

.arrow-down {
  color: #00ffff;
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 0 0 0.5rem rgba(0, 255, 255, 0.8);
  animation: arrowBounce 1.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes textPulse {
  0%, 100% { 
    opacity: 0.8;
    text-shadow: 0 0 1rem rgba(0, 255, 255, 0.8);
  }
  50% { 
    opacity: 1;
    text-shadow: 0 0 2rem rgba(0, 255, 255, 1);
  }
}

@keyframes scrollBounce {
  0%, 100% { 
    transform: translateY(0);
    box-shadow: 
      0 0 1.5rem rgba(0, 255, 255, 0.6),
      inset 0 0 0.5rem rgba(0, 255, 255, 0.1);
  }
  50% { 
    transform: translateY(-0.5rem);
    box-shadow: 
      0 0 2rem rgba(0, 255, 255, 0.8),
      inset 0 0 0.8rem rgba(0, 255, 255, 0.2);
  }
}

@keyframes arrowBounce {
  0%, 100% { 
    transform: translateY(0);
  }
  50% { 
    transform: translateY(-0.3rem);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }
  
  .hero-title {
    font-size: 4.8rem;
  }
  
  .hero-features {
    justify-content: center;
  }
  
  .floating-keyboard {
    width: 25rem;
    height: 10rem;
  }
}

/* ------------------ KEY HISTORY SECTION ------------------ */

.key-history-section {
  max-width: 122rem;
  margin: 2rem auto;
  padding: 2.4rem 3.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(10, 10, 10, 0.8));
  border-radius: 1.5rem;
  border: 1px solid rgba(0, 255, 255, 0.2);
  box-shadow: 
    0 0 2rem rgba(0, 255, 255, 0.1),
    inset 0 0 1rem rgba(0, 255, 255, 0.05);
}

.key-history-bar {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.95));
  border-radius: 0.8rem;
  padding: 1.2rem 2.4rem;
  width: 100%;
  max-width: 100rem;
  box-shadow: 
    0 0 2rem rgba(0, 255, 255, 0.3),
    inset 0 0 1rem rgba(0, 255, 255, 0.1);
  border: 2px solid rgba(0, 255, 255, 0.4);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.key-history-text {
  color: #00ffff;
  font-family: 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
  word-spacing: 0.3rem;
  display: inline-block;
  white-space: nowrap;
  min-width: 100%;
  text-shadow: 0 0 1rem rgba(0, 255, 255, 0.8);
}

.key-history-item {
  display: inline-block;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 0, 0, 0.9));
  border: 2px solid #00ffff;
  border-radius: 0.4rem;
  padding: 0.4rem 0.8rem;
  margin: 0 0.2rem;
  color: #00ffff;
  font-family: 'Courier New', monospace;
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  min-width: 2.4rem;
  box-shadow: 
    0 0 1rem rgba(0, 255, 255, 0.6),
    0 0 2rem rgba(0, 255, 255, 0.3),
    inset 0 0 0.5rem rgba(0, 255, 255, 0.1);
  transition: all 0.2s ease;
  text-shadow: 0 0 0.5rem rgba(0, 255, 255, 0.8);
}

.key-history-item:hover {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 0, 0, 0.95));
  box-shadow: 
    0 0 2rem rgba(0, 255, 255, 0.8),
    0 0 4rem rgba(0, 255, 255, 0.4),
    inset 0 0 1rem rgba(0, 255, 255, 0.2);
  transform: translateY(-0.1rem) scale(1.05);
}

.reset-button {
  background-color: #404040;
  color: #ffffff;
  border: 0.2rem solid #606060;
  border-radius: 0.6rem;
  padding: 1.2rem 2.4rem;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 8rem;
}

.reset-button:hover {
  background-color: #505050;
  border-color: #707070;
  transform: translateY(-0.1rem);
  box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2);
}

.reset-button:active {
  transform: translateY(0);
  box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.2);
}

/* ------------------ MOUSE TESTING SECTION ------------------ */

/* ------------------ MOUSE VISUAL CENTER ------------------ */

.mouse-visual-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 3rem;
  margin: 2rem auto;
  max-width: 30rem;
}


.mouse-position-display {
  background-color: #1a1a1a;
  border: 0.2rem solid #404040;
  border-radius: 0.6rem;
  padding: 1.2rem 2rem;
  min-width: 20rem;
}

.mouse-coords {
  color: #00ff00;
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 600;
}

/* ------------------ SCROLL DETECTION BUTTONS ------------------ */

.scroll-detection {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.scroll-btn {
  background-color: #2a2a2a;
  border: 0.3rem solid #00ffff;
  border-radius: 0.8rem;
  padding: 1.2rem 1.6rem;
  color: #00ffff;
  font-size: 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-btn:hover {
  background-color: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 1rem rgba(0, 255, 255, 0.3);
  transform: translateY(-0.2rem);
}

.scroll-btn.clicked {
  background-color: #00ffff !important;
  color: #000000 !important;
  box-shadow: 0 0 1.5rem rgba(0, 255, 255, 0.6) !important;
  animation: scrollClickPulse 0.3s ease;
}

.scroll-arrow {
  font-size: 2.4rem;
  font-weight: 800;
}

@keyframes scrollClickPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ------------------ VISUAL MOUSE DIAGRAM ------------------ */

.mouse-visual-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mouse-diagram {
  position: relative;
  width: 18rem;
  height: 10rem;
  background-color: #2a2a2a;
  border: 0.3rem solid #00ffff;
  border-radius: 2rem 2rem 1rem 1rem;
  cursor: pointer;
}

.mouse-body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #2a2a2a;
  border-radius: 2rem 2rem 1rem 1rem;
  z-index: 1;
}

.mouse-button {
  position: absolute;
  top: 0.5rem;
  height: 3.5rem;
  width: 7rem;
  background-color: #404040;
  border: 0.2rem solid #00ffff;
  border-radius: 1rem 1rem 0.5rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.left-mouse-btn {
  left: 0.5rem;
}

.right-mouse-btn {
  right: 0.5rem;
}

.mouse-wheel {
  position: absolute;
  top: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.8rem;
  height: 2.5rem;
  background-color: #404040;
  border: 0.2rem solid #00ffff;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
}

.mouse-btn-label {
  color: #00ffff;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

.wheel-label {
  color: #00ffff;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* Mouse button hover effects */
.mouse-button:hover {
  background-color: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 1rem rgba(0, 255, 255, 0.3);
  transform: translateY(-0.2rem);
}

.mouse-wheel:hover {
  background-color: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 1rem rgba(0, 255, 255, 0.3);
  transform: translateX(-50%) translateY(-0.2rem);
}

/* Mouse button click/marked states - SOLID CYAN FILL */
.mouse-button.clicked,
.left-mouse-btn.clicked,
.right-mouse-btn.clicked {
  background-color: #00ffff !important;
  border-color: #00ffff !important;
  box-shadow: 0 0 1rem rgba(0, 255, 255, 0.5) !important;
  animation: mouseClickPulse 0.3s ease;
}

.mouse-wheel.clicked {
  background-color: #00ffff !important;
  border-color: #00ffff !important;
  box-shadow: 0 0 1rem rgba(0, 255, 255, 0.5) !important;
  animation: mouseClickPulse 0.3s ease;
}

.mouse-button.clicked .mouse-btn-label,
.left-mouse-btn.clicked .mouse-btn-label,
.right-mouse-btn.clicked .mouse-btn-label {
  color: #000000 !important;
  font-weight: 700 !important;
}

.mouse-wheel.clicked .wheel-label {
  color: #000000 !important;
  font-weight: 700 !important;
}

@keyframes mouseClickPulse {
  0% { 
    transform: scale(1);
    box-shadow: 0 0 1rem rgba(0, 255, 255, 0.4);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 0 3rem rgba(0, 255, 255, 1);
  }
  100% { 
    transform: scale(1.05);
    box-shadow: 0 0 2rem rgba(0, 255, 255, 0.8);
  }
}



.title span {
  background-image: var(--color-bg-title);

  /* Use the text as a mask for the background. */
  /* This will show the gradient as a text color rather than element bg. */
  background-clip: text;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
}

.theme-and-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 120rem;
  margin: 0 auto 2.4rem;
  transition: all 0.25s;
}

.toggle-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.toggle-section span {
  font-size: 2.4rem;
  cursor: pointer;
}

/* slider styling */

.slider-container {
  width: 80%;
  margin: 1.6rem auto;
  text-align: center;
}

.slider {
  width: 100%;
  transform: translateY(1.8rem);
}

/* Styling the track */
input[type='range']::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #555555, #f1f3f5);
}

/* Styling the thumb */
input[type='range']::-webkit-slider-thumb {
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #555; /* Thumb color */
  cursor: pointer;
  -webkit-appearance: none;
  transition: all 0.3s ease; /* Smooth transition */
  transform: translateY(-0.4rem);
}

/* Highlighting the thumb on hover */
input[type='range']::-webkit-slider-thumb:hover {
  box-shadow: 0 0 10px rgb(84, 84, 84, 0.4); /* Add a subtle box-shadow on hover */
  transform: translateY(-0.4rem) scale(1.2);
}

.slider-value {
  font-size: 2.4em;
  padding: 4px 8px;
  border-radius: 4px;
  color: #555; /* Match the thumb color */
  background: #fff; /* Background color for the value */
  box-shadow: 0 0 10px rgb(84, 84, 84, 0.1); /* Add a subtle box-shadow to the value */
}

.theme-section {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 2rem;
}

.theme-section > div {
  display: flex;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.theme-color {
  width: 25%;
}

/* retro theme */
.retro div:nth-child(1) {
  background-color: #3c3e4a;
}

.retro div:nth-child(2) {
  background-color: #f8f9fa;
}

.retro div:nth-child(3) {
  background-color: #a4a9b0;
}

.retro div:nth-child(4) {
  background-color: #2f3674;
}

/* navy-blue */
.navy-blue div:nth-child(1) {
  background-color: #2a309c;
}

.navy-blue div:nth-child(2) {
  background-color: #3d489b;
}

.navy-blue div:nth-child(3) {
  background-color: #a4a9b0;
}

.navy-blue div:nth-child(4) {
  background-color: #2f3674;
}

/* ------------------ KEYBOARD SECTION ------------------ */

.keyboard {
  display: grid;
  margin: 0 auto;
  padding: 0.8rem;
  border-radius: 0.4rem;
  background-color: var(--color-keyboard);
  box-shadow: 0 0.4rem 0 0.6rem var(--color-keyboard-border),
    0 1.2rem 3.2rem rgba(0, 0, 0, 0.1);

  /* force GPU acceleration to reduce
   potential subrendering issues */
  transform: translateZ(0);

  transition: all 0.2s;
}

.full-size {
  grid-template-columns: 215fr 2fr 45fr 1fr 60fr;
  max-width: 122rem;
}

.tkl {
  /* whitespace in the tkl layout increased 
  to 7fr for better region seperation */
  grid-template-columns: 215fr 7fr 45fr;
  max-width: 100rem;
}

.seventy-five-percent {
  grid-template-columns: 79rem 0 16.5rem;
  max-width: 86rem;
}

.key {
  width: 100%;
  height: var(--standard-key-size);
  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: var(--key-border-radius);
  font-size: 1.2rem;
  font-weight: 700;

  color: var(--color-keycaps-legends);
  background-color: var(--color-keycaps-bg);
  box-shadow: var(--box-shadow-keycaps);
  cursor: pointer;

  transition: all 0.075;
}

.key--accent-color {
  color: var(--color-keycaps-legends-accent);
  background-color: var(--color-keycaps-bg-accent);
  box-shadow: var(--box-shadow-keycaps-accent);
}

/* making specificity higher by adding .key */
.key.key--pressed {
  color: var(--color-keycaps-legends-pressed);
  background-color: var(--color-keycaps-bg-pressed);
  box-shadow: var(--box-shadow-keycaps-pressed);
}

/* key pressing simulation class is for using in js */
.key:hover,
.key--accent-color:hover,
.key--pressed:hover,
.key-pressing-simulation {
  transform: scale(0.98);
  box-shadow: var(--box-shadow-keycaps-hover);
}

.key--accent-color:hover {
  box-shadow: var(--box-shadow-keycaps-accent-hover);
}

.key--pressed:hover,
.key-pressing-simulation {
  box-shadow: var(--box-shadow-keycaps-pressed-hover);
}

.key.key-pressing-simulation {
  color: var(--color-keycaps-legends-pressing);
}

/* __________________________________
   ||||||||||||||||||||||||||||||||||
   |||| GENERAL KB LAYOUT STYLES ||||
   ||||||||||||||||||||||||||||||||||
*/

.region {
  padding: 0.5rem;
  gap: 0.25rem;
}

/* contains "ESC" & Function (F1-F12) */
.function {
  display: grid;
  grid-template-columns: 2fr 2fr repeat(4, 2fr) 1fr repeat(4, 2fr) 1fr repeat(
      4,
      2fr
    );
}

/* contains Top-Located Control (Prt Sc|Scr lck|Pause) keys  */
.system-control {
  grid-column: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* contains Modifiers/Control (Ctrl|Alt|etc.) & Alpha (A-Z) keys */
.typewriter {
  grid-row: 2;
  display: grid;
}

.first-row,
.second-row,
.third-row,
.fourth-row,
.fifth-row {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
}

.first-row {
  grid-template-columns: repeat(13, 1fr) 2fr;
}

.second-row {
  grid-template-columns: 1.5fr repeat(12, 1fr) 1.5fr;
}

.third-row {
  grid-template-columns: 1.79fr repeat(11, 1fr) 2.29fr;
}

.fourth-row {
  grid-template-columns: 2.29fr repeat(10, 1fr) 2.79fr;
}

.fifth-row {
  grid-template-columns: repeat(3, 1.29fr) 6.36fr repeat(4, 1.29fr);
}

/* contains Navigation (PgUp|PgDn|etc.) & Arrow keys */
.navigation {
  grid-column: 3;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
}

/* contains Media Control Keys */
.media-control {
  grid-column: 5;
  grid-row: 1;
  
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

/* contains Numpad Keys */
.numpad {
  grid-column: 5;
  grid-row: 2;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
}

/* _______________________________
   |||||||||||||||||||||||||||||||
   |||| KEY SPECIFIC STYLES ||||||
   |||||||||||||||||||||||||||||||
*/

/**************************/
/* TYPEWRITER REGION KEYS */
/**************************/

/* styling keys with sublegends */
.key--sublegend {
  display: grid;
  grid-template-rows: 1fr auto auto 1fr;
  padding-top: 0.8rem;
  gap: 0.1rem;
}

.key--sublegend span:nth-child(odd),
.key--sublegend span:nth-child(even) {
  width: 100%;
  text-align: center;
  grid-row: 1;
}

.key--sublegend span:nth-child(even) {
  grid-row: 2;
}

/* styling enter key as return sign  */
.enter span {
  transform: translateY(-0.25rem);
  font-size: 2.8rem;
}

/* windows and context menu icons */
.metaleft svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: var(--color-keycaps-legends);
}

.metaleft .key--accent svg {
  fill: var(--color-keycaps-legends-accent);
}

.metaleft.key--pressed svg {
  fill: var(--color-keycaps-legends-pressed);
}

.metaleft.key-pressing-simulation svg {
  fill: var(--color-keycaps-legends-pressing);
}

.metaright svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: var(--color-keycaps-legends);
}

.metaright .key--accent svg {
  fill: var(--color-keycaps-legends-accent);
}

.metaright.key--pressed svg {
  fill: var(--color-keycaps-legends-pressed);
}

.metalright.key-pressing-simulation svg {
  fill: var(--color-keycaps-legends-pressing);
}

.contextmenu svg {
  width: 2rem;
  height: 2rem;
  stroke: var(--color-keycaps-legends);
  fill: none;
}

.contextmenu .key--accent svg {
  stroke: var(--color-keycaps-legends-accent);
}

.contextmenu.key--pressed svg {
  stroke: var(--color-keycaps-legends-pressed);
}

.contextmenu.key-pressing-simulation svg {
  stroke: var(--color-keycaps-legends-pressing);
}

/* spacebar legend */
.space span {
  transform: translateY(-1.6rem);
  font-size: 1.6rem;
}

/* side keys text aligning */
.backquote,
.tab,
.capslock,
.shiftleft,
.controlleft {
  justify-content: left;
  padding-left: 1.6rem;
}

.backspace,
.enter,
.shiftright,
.controlright {
  justify-content: right;
  padding-right: 1.6rem;
}

/**************************/
/* NAVIGATION REGION KEYS */
/**************************/

.arrowup {
  grid-column: 2;
  grid-row: 4;
}

.arrowleft,
.arrowdown,
.arrowright {
  grid-row: 5;
}

.arrowup svg,
.arrowleft svg,
.arrowdown svg,
.arrowright svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: var(--color-keycaps-legends);
}

.arrowup.key--pressed svg,
.arrowleft.key--pressed svg,
.arrowdown.key--pressed svg,
.arrowright.key--pressed svg {
  fill: var(--color-keycaps-legends-pressed);
}

.arrowup.key-pressing-simulation svg,
.arrowleft.key-pressing-simulation svg,
.arrowdown.key-pressing-simulation svg,
.arrowright.key-pressing-simulation svg {
  fill: var(--color-keycaps-legends-pressing);
}

/**********************/
/* NUMPAD REGION KEYS */
/**********************/

.numpadadd {
  grid-column: 4;
  grid-row: 2 / span 2;
  height: 100%;
}

.numpadenter {
  grid-column: 4;
  grid-row: 4 / span 2;
  height: 100%;
}
.numpad0 {
  grid-column: 1 / span 2;
}

/* Media Control Key Styles */
.knob {
  border-radius: 50% !important;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* _____________________________________
   |||||||||||||||||||||||||||||||||||||
   |||| Changing Layout Animation ||||||
   |||||||||||||||||||||||||||||||||||||
*/

.numpad {
  transition: all 0.15s;
}

/* simply using display:none; doesn't work because 
then we can't use transitions anymore

STEPS FOR REMOVING NUMPAD FROM FULL-SIZE KEYBOARD: */
.hidden--step1 {
  /* 1) Hide it visually */
  opacity: 0;
  /* 2) Make it inaccessible to mouse and keyboard */
  pointer-events: none;
  /* 3) Hide it from screen readers */
  visibility: hidden;

  transition: all 0.15;
}

.hidden--step2 {
  width: 0;
  padding: 0;
}

/* ------------------ FOOTER ------------------ */

.footer {
  flex-grow: 1; /* Allow the footer to grow and fill the remaining space */

  display: flex;
  justify-content: center;
  align-items: end;
  padding: 3.2rem 0 2.4rem; /* Add padding for spacing */
}

.footer-text {
  font-size: 1.6rem;
}

.footer-text svg {
  width: 2.4rem;
  height: 2.4rem;
  transform: translateY(0.5rem);
  fill: var(--color-primary);
}
