/* Accessibility Overlay */
#accessibility-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Daltonic Filters using Backdrop Filter */
#accessibility-overlay.protanopia {
  backdrop-filter: grayscale(0.3) brightness(1.2) saturate(0.8) hue-rotate(-20deg) contrast(1.1);
  -webkit-backdrop-filter: grayscale(0.3) brightness(1.2) saturate(0.8) hue-rotate(-20deg) contrast(1.1);
}

#accessibility-overlay.deuteranopia {
  backdrop-filter: grayscale(0.4) brightness(1.1) saturate(0.7) hue-rotate(40deg) contrast(1.2);
  -webkit-backdrop-filter: grayscale(0.4) brightness(1.1) saturate(0.7) hue-rotate(40deg) contrast(1.2);
}

#accessibility-overlay.tritanopia {
  backdrop-filter: grayscale(0.3) brightness(1.1) saturate(0.6) hue-rotate(180deg) contrast(1.3);
  -webkit-backdrop-filter: grayscale(0.3) brightness(1.1) saturate(0.6) hue-rotate(180deg) contrast(1.3);
}

/* Accessibility Controls Panel */
.accessibility-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  background: rgba(17, 34, 64, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
  z-index: 10000;
  display: none;
  color: #e6f1ff;
  font-family: 'Inter', sans-serif;
  animation: slideIn 0.3s ease-out;
}

.accessibility-panel.visible {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(230, 241, 255, 0.1);
  padding-bottom: 0.5rem;
}

.panel-header h3 {
  font-family: 'Outfit', sans-serif;
  color: #64ffda;
  margin: 0;
  font-size: 1.2rem;
}

.close-panel {
  background: none;
  border: none;
  color: #8892b0;
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.close-panel:hover {
  color: #64ffda;
}

.control-group {
  margin-bottom: 1.5rem;
}

.control-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ccd6f6;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Mode Grid */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-btn {
  background: rgba(2, 12, 27, 0.7);
  border: 1px solid rgba(100, 255, 218, 0.3);
  color: #ccd6f6;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  text-align: center;
}

.mode-btn:hover {
  background: rgba(100, 255, 218, 0.1);
  border-color: #64ffda;
  color: #64ffda;
  transform: translateY(-2px);
}

.mode-btn.active {
  background: rgba(100, 255, 218, 0.2);
  border-color: #64ffda;
  color: #64ffda;
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

/* Range Slider */
input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(230, 241, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #64ffda;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #64ffda;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.value-display {
  font-size: 0.8rem;
  color: #8892b0;
  float: right;
}