/* ===== Floating Button ===== */
#accessibility-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #771E44;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  font-size: 26px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
}
#accessibility-toggle:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #005fa3, #003f7d);
}

/* ===== Accessibility Panel ===== */
#accessibility-panel {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 350px;
  max-height: 75vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  animation: slideUp 0.4s ease forwards;
}

#accessibility-panel.active {
  display: flex;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Header ===== */
#accessibility-panel-header {
  background:#771E44;
  color: #fff;
  text-align: center;
  padding: 14px;
  font-weight: 600;
  font-size: 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#accessibility-panel-header span {
  flex: 1;
}
#accessibility-panel-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* ===== Grid Body ===== */
#accessibility-panel-body {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  overflow-y: auto;
  flex: 1;
}

.access-item {
  background: #f5f6fa;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.access-item:hover {
  background: #771E44;
  color: #fff;
  transform: translateY(-3px);
}
.access-item i {
  font-size: 22px;
  color: #005fa3;
  margin-bottom: 8px;
}
.access-item:hover i {
  color: #fff;
}
.access-item span {
  font-size: 0.85em;
  display: block;
  line-height: 1.3;
}

/* ===== Reset Button ===== */
.reset-btn {
  background:#771E44;
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 1em;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  width: 100%;
  border-top: 1px solid #eee;
  transition: background 0.3s;
}
.reset-btn:hover {
  background: #000;
}

/* Scrollbar */
#accessibility-panel-body::-webkit-scrollbar {
  width: 6px;
}
#accessibility-panel-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 480px) {
  #accessibility-panel {
    width: 90%;
    right: 5%;
    bottom: 90px;
  }
}

/* Accessibility Effects */
.large-text { font-size: 20px !important; }
.small-text { font-size: 14px !important; }
.line-height { line-height: 2 !important; }
.highlight-links a {
  background-color: yellow !important;
  color: black !important;
  padding: 2px 4px;
}
.text-spacing { letter-spacing: 2px; word-spacing: 4px; }
.dyslexia {
  font-family: 'Comic Sans MS', 'OpenDyslexic', Arial, sans-serif !important;
}
.hide-images img { display: none !important; }
.dark-mode {
  background-color: #111 !important;
  color: #eee !important;
}
.invert-colors { filter: invert(100%) !important; }