canvas.deepar {
  border: 0px none;
  background-color: black;
  display: block;
  margin: auto;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  max-width: 100%;
  max-height: 100%;
}

body {
  margin: 0px;
  padding: 0px;
  font-family: sans-serif;
}

#loading-screen,
#permission-denied-screen,
#permission-denied-background {
  background-color: rgb(17 24 39 / 1);
  background-image: url("./images/gradient.svg"), url("./images/bg-grid-dark.svg");
  background-repeat: no-repeat, repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Centrado específico para pantalla de permisos denegados */
#permission-denied-screen {
  padding: 2rem;
  box-sizing: border-box;
}

/* Override old permission denied styles for new design */
#permission-denied-screen .permission-denied-text-container {
  position: static;
  transform: none;
  left: auto;
  top: auto;
  width: auto;
}

.fixed-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

/* Carousel */

.carousel {
  position: absolute;
  bottom: 0;
  overflow: hidden;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  width: 100%;
}

.carousel.active {
  cursor: grabbing;
}

.carousel-slider {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  top: 0;
  left: 0;
  width: fit-content;
  height: inherit;
  transition: left 0.3s ease;
  will-change: transform;
}

.carousel.active .inner {
  transition: none;
}

.carousel-center {
  width: 84px;
  height: 84px;
  border: 8px solid #fff;
  border-radius: 50%;
  z-index: 100;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
  -webkit-user-select: none;
}

.carousel-slider .slide {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-left: 10px;
  margin-right: 10px;
}

.carousel-slider .slide.active {
  margin-left: 24px;
  margin-right: 24px;
  width: 80px;
  height: 80px;
}

.slide {
  overflow: hidden;
  border: 2px solid white;
  -webkit-touch-callout: none; /* Safari Touch */
  -webkit-user-select: none; /* Webkit */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Edge*/
  user-select: none; /* Future-proof*/
}
.slide.active {
  background-color: #010c43;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Loading spinner */

.lds-ring {
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #fff;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #fff transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Loading screen */

@keyframes bounce {
  0%,
  100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}
.animate-bounce {
  animation: bounce 1s infinite;
}

#loading-progress-bar {
  width: 0%;
  background: rgb(0 98 209 / 1);
  height: 100%;
  transition: width 5s ease-out;
}

/* Permission denied screen */

.permission-denied-text-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.permission-denied-text {
  width: 400px;
  max-width: 95%;
  font-size: 16px;
  line-height: 1.2;
  color: #fff;
}

.permission-denied-button {
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 4px;
  background-color: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: none;
  display: inline-block;
  text-decoration: none;
  width: fit-content;

  &:hover {
    background-color: #eaeaea;
  }
}

/* ===== GAMING STYLES FOR NEW SCREENS ===== */

/* Gaming Background */
.gaming-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1c3d 0%, #2d1b69 25%, #1e3a8a 50%, #1a1c3d 100%);
  overflow: hidden;
}

.gaming-background.error-bg {
  background: linear-gradient(135deg, #3d1a1a 0%, #691b2d 25%, #8a1e1e 50%, #3d1a1a 100%);
}

/* Particles Animation */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 40px 70px, #60a5fa, transparent),
    radial-gradient(1px 1px at 90px 40px, #3b82f6, transparent),
    radial-gradient(1px 1px at 130px 80px, #fff, transparent),
    radial-gradient(2px 2px at 160px 30px, #60a5fa, transparent);
  background-repeat: repeat;
  background-size: 200px 150px;
  animation: particlesFloat 20s linear infinite;
  opacity: 0.6;
}

.particles.error-particles {
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ff6b6b, transparent),
    radial-gradient(2px 2px at 40px 70px, #ff8e8e, transparent),
    radial-gradient(1px 1px at 90px 40px, #ff5555, transparent),
    radial-gradient(1px 1px at 130px 80px, #ff6b6b, transparent),
    radial-gradient(2px 2px at 160px 30px, #ff8e8e, transparent);
}

@keyframes particlesFloat {
  0% { transform: translateY(0px) translateX(0px); }
  33% { transform: translateY(-20px) translateX(10px); }
  66% { transform: translateY(-10px) translateX(-10px); }
  100% { transform: translateY(0px) translateX(0px); }
}

/* Grid Pattern */
.grid-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 10s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Loading Content */
.loading-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

/* Character Container */
.character-container {
  position: relative;
  margin-bottom: 2rem;
}

.loading-character-img, .error-character-img {
  width: 200px;
  height: auto;
  z-index: 2;
  position: relative;
  animation: characterBounce 2s ease-in-out infinite;
}

.error-character-img {
  animation: characterShake 1s ease-in-out infinite;
}

@keyframes characterBounce {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes characterShake {
  0%, 100% { transform: translateX(0px); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Character Glow */
.character-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 2s ease-in-out infinite;
}

.character-glow.error-glow {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, transparent 70%);
}

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

/* Game Title */
.game-title {
  color: #fff;
  font-family: 'Arial Black', sans-serif;
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
}

.title-main {
  display: block;
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 8px;
  background: linear-gradient(45deg, #60a5fa, #3b82f6, #1e40af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

.title-sub {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: #94a3b8;
  margin-top: 0.5rem;
}

@keyframes titleGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

/* Loading Text */
.loading-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: #e2e8f0;
  font-size: 1.2rem;
  font-weight: 600;
}

.dots {
  display: flex;
  gap: 0.2rem;
}

.dot {
  animation: dotBounce 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Progress Container */
.progress-container {
  width: 100%;
  max-width: 400px;
  margin-bottom: 2rem;
}

.progress-label {
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.progress-bar-gaming {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-bar-bg {
  position: relative;
  flex: 1;
  height: 20px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 10px;
  border: 2px solid #334155;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #06b6d4);
  border-radius: 8px;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.progress-percentage {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 40px;
}

/* Powered By */
.powered-by {
  margin-top: 2rem;
  opacity: 0.7;
}

.powered-by img {
  max-width: 140px;
  height: auto;
}

/* ===== ERROR SCREEN STYLES ===== */

.error-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - 4rem);
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

.error-character {
  margin-bottom: 1rem;
}

.error-message {
  margin-bottom: 2rem;
}

.error-title {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
  font-family: 'Arial Black', sans-serif;
}

.error-description {
  color: #e2e8f0;
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0;
}

/* Speech Bubble */
.speech-bubble {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: bubbleBounce 2s ease-in-out infinite;
}

.bubble-content {
  color: #1f2937;
  font-weight: 600;
  font-size: 1.1rem;
}

.bubble-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 15px solid #fff;
}

@keyframes bubbleBounce {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
}

/* Help Steps */
.help-steps {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #3b82f6, #60a5fa);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.step-text {
  color: #e2e8f0;
  font-weight: 600;
  text-align: center;
  font-size: 0.9rem;
}

/* Error Actions */
.error-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.retry-button {
  background: linear-gradient(45deg, #10b981, #34d399);
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.help-button {
  background: linear-gradient(45deg, #6366f1, #8b5cf6);
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
}

.help-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .loading-character-img, .error-character-img {
    width: 120px;
  }
  
  .title-main {
    font-size: 2.2rem;
    letter-spacing: 3px;
  }
  
  .title-sub {
    font-size: 0.9rem;
    letter-spacing: 2px;
  }
  
  .error-title {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
  }
  
  .error-description {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .error-character {
    margin-bottom: 0.8rem;
  }
  
  .error-message {
    margin-bottom: 1.5rem;
  }
  
  .speech-bubble {
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    max-width: 90%;
  }
  
  .bubble-content {
    font-size: 1rem;
  }
  
  .help-steps {
    gap: 0.8rem;
    flex-direction: column;
    align-items: center;
  }
  
  .step {
    min-width: auto;
    width: 100%;
    max-width: 200px;
  }
  
  .error-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  
  .retry-button, .help-button {
    width: 100%;
    max-width: 280px;
    padding: 0.7rem 1.5rem;
  }
  
  .error-content {
    padding: 1rem 0.8rem;
    min-height: calc(100vh - 1.6rem);
  }
  
  #permission-denied-screen {
    padding: 0.8rem;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .loading-character-img, .error-character-img {
    width: 100px;
  }
  
  .title-main {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }
  
  .error-title {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
  }
  
  .error-description {
    font-size: 0.9rem;
  }
  
  .speech-bubble {
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
  }
  
  .bubble-content {
    font-size: 0.9rem;
  }
  
  .step-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .step-text {
    font-size: 0.8rem;
  }
  
  .retry-button, .help-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .error-content {
    padding: 0.8rem 0.5rem;
  }
  
  #permission-denied-screen {
    padding: 0.5rem;
  }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .error-content {
    min-height: calc(100vh - 1rem);
    justify-content: flex-start;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .loading-character-img, .error-character-img {
    width: 80px;
  }
  
  .error-title {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
  }
  
  .error-description {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .speech-bubble {
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.8rem;
  }
  
  .bubble-content {
    font-size: 0.8rem;
  }
  
  .help-steps {
    flex-direction: row;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .step {
    max-width: 80px;
  }
  
  .step-number {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
  
  .step-text {
    font-size: 0.7rem;
  }
  
  .error-actions {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .retry-button, .help-button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    max-width: 140px;
  }
}

/* Ensure content doesn't overflow */
@media (max-height: 600px) {
  .error-content {
    justify-content: flex-start;
    min-height: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  .error-character {
    margin-bottom: 0.5rem;
  }
  
  .error-message {
    margin-bottom: 1rem;
  }
  
  .speech-bubble {
    margin-bottom: 1rem;
  }
}

/* ===== ACCESSIBILITY STYLES ===== */

/* Accessibility trigger button */
#accessibility-trigger {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(59, 130, 246, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

#accessibility-trigger:hover {
  background: rgba(59, 130, 246, 1);
  transform: scale(1.1);
}

#accessibility-trigger:focus {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

/* Accessibility panel */
#accessibility-panel {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 300px;
  background: rgba(17, 24, 39, 0.95);
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 0;
  z-index: 9998;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.accessibility-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(45deg, #3b82f6, #60a5fa);
  border-radius: 10px 10px 0 0;
  margin: 0;
}

.accessibility-header h3 {
  color: white;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

#close-accessibility {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

#close-accessibility:hover {
  background: rgba(255, 255, 255, 0.2);
}

#close-accessibility:focus {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.accessibility-options {
  padding: 1rem;
}

.accessibility-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.accessibility-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}

.accessibility-btn:focus {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.accessibility-btn span {
  font-size: 1.2rem;
}

.accessibility-help {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(59, 130, 246, 0.3);
}

.accessibility-help h4 {
  color: #60a5fa;
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
}

.accessibility-help ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.accessibility-help li {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.accessibility-help kbd {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: #60a5fa;
  min-width: 40px;
  text-align: center;
}

/* High contrast mode */
body.high-contrast {
  filter: contrast(150%) brightness(1.2);
}

body.high-contrast .gaming-background {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 25%, #333333 50%, #000000 100%) !important;
}

body.high-contrast .gaming-background.error-bg {
  background: linear-gradient(135deg, #660000 0%, #990000 25%, #cc0000 50%, #660000 100%) !important;
}

body.high-contrast .loading-text,
body.high-contrast .error-description,
body.high-contrast .step-text {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

body.high-contrast .title-main {
  color: #ffffff !important;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9) !important;
}

body.high-contrast button,
body.high-contrast .retry-button,
body.high-contrast .help-button {
  border: 3px solid #ffffff !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

/* Reduced motion mode */
body.reduce-motion * {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

body.reduce-motion .particles {
  animation: none !important;
}

body.reduce-motion .grid-pattern {
  animation: none !important;
}

body.reduce-motion .loading-character-img,
body.reduce-motion .error-character-img {
  animation: none !important;
}

body.reduce-motion .character-glow {
  animation: none !important;
}

body.reduce-motion .progress-shine {
  animation: none !important;
}

body.reduce-motion .speech-bubble {
  animation: none !important;
}

/* Enhanced focus indicators for better visibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
.retry-button:focus,
.help-button:focus,
#start-quiz-btn:focus {
  outline: 3px solid #fbbf24 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.3) !important;
}

/* Make start button more accessible */
#start-quiz-btn {
  position: relative;
}

#start-quiz-btn::after {
  content: 'Presiona Enter o Espacio para jugar';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

#start-quiz-btn:focus::after {
  opacity: 1;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visual feedback for keyboard users */
body.keyboard-navigation .carousel-slider .slide:focus {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

/* Improve contrast for important UI elements */
body.high-contrast #score-timer-bar {
  filter: contrast(200%) brightness(1.3);
}

body.high-contrast .speech-bubble {
  background: #ffffff !important;
  border: 3px solid #000000 !important;
  color: #000000 !important;
}

body.high-contrast .bubble-content {
  color: #000000 !important;
  font-weight: bold !important;
}

/* Mobile accessibility adjustments */
@media (max-width: 768px) {
  #accessibility-trigger {
    width: 45px;
    height: 45px;
    font-size: 20px;
    top: 15px;
    right: 15px;
  }
  
  #accessibility-panel {
    width: calc(100vw - 30px);
    right: 15px;
    left: 15px;
    top: 70px;
  }
  
  .accessibility-help {
    display: none; /* Hide keyboard shortcuts on mobile */
  }
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
  .accessibility-btn {
    min-height: 44px; /* Minimum touch target size */
    padding: 1rem 0.75rem;
  }
  
  #accessibility-trigger {
    min-width: 44px;
    min-height: 44px;
  }
  
  #close-accessibility {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ===== VISUAL FEEDBACK EFFECTS ===== */

/* Celebration particles animation */
@keyframes celebrationParticle {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0);
    opacity: 0;
  }
}

/* Error pulse animation */
@keyframes errorPulse {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Floating score animation */
@keyframes floatingScore {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  20% {
    transform: translateY(-10px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateY(-60px) scale(1);
    opacity: 0;
  }
}

/* Screen flash animation */
@keyframes screenFlash {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Progress trail animation */
@keyframes progressTrail {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200%);
  }
}

/* Ripple expand animation */
@keyframes rippleExpand {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Urgent pulse for timer */
@keyframes urgentPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  }
  50% {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(239, 68, 68, 1);
  }
}

/* Question appear animation enhancement */
.question-appear {
  animation: questionSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes questionSlideIn {
  0% {
    transform: scale(0.7) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Floating score styling */
.floating-score {
  font-family: 'Arial Black', sans-serif;
  letter-spacing: 1px;
}

.floating-score .score-icon {
  font-size: 1.5em;
  filter: drop-shadow(0 0 8px currentColor);
}

.floating-score .score-text {
  filter: drop-shadow(0 0 8px currentColor);
}

/* Enhanced button interactions */
#start-quiz-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.1) drop-shadow(0 0 20px rgba(59, 130, 246, 0.6));
  transition: all 0.3s ease;
}

#start-quiz-btn:active {
  transform: scale(0.98);
  transition: all 0.1s ease;
}

.retry-button:hover,
.help-button:hover {
  transform: translateY(-3px) scale(1.02);
  transition: all 0.3s ease;
}

.retry-button:active,
.help-button:active {
  transform: translateY(-1px) scale(1);
  transition: all 0.1s ease;
}

/* Enhanced progress bar with glow */
.progress-bar-fill {
  position: relative;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShine 2s ease-in-out infinite;
  border-radius: 8px;
}

/* Score pulse effect */
.score-pulse {
  animation: scorePulse 0.6s ease-out;
}

@keyframes scorePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
  }
  100% {
    transform: scale(1);
  }
}

/* Timer warning styles */
.timer-warning {
  animation: urgentPulse 0.5s ease-in-out infinite;
  color: #ef4444 !important;
}

/* Character interaction feedback */
.character-interaction {
  animation: characterInteraction 0.3s ease-out;
}

@keyframes characterInteraction {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
    filter: brightness(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Question highlight effect */
.question-highlight {
  animation: questionHighlight 0.8s ease-in-out;
}

@keyframes questionHighlight {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.6));
  }
}

/* Success streak effect */
.success-streak {
  position: relative;
}

.success-streak::after {
  content: '🔥';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 20px;
  animation: streakFlame 1s ease-in-out infinite;
}

@keyframes streakFlame {
  0%, 100% {
    transform: scale(1) rotate(-5deg);
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
}

/* Combo multiplier effect */
.combo-multiplier {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  font-weight: bold;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
  z-index: 1600;
  animation: comboAppear 2s ease-out forwards;
  pointer-events: none;
}

@keyframes comboAppear {
  0% {
    transform: translateX(-50%) scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: translateX(-50%) scale(1.3) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(1) rotate(0deg);
    opacity: 0;
  }
}

/* Volume control styling */
.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.volume-control label {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  min-width: 60px;
}

.volume-control input[type="range"] {
  flex: 1;
  height: 6px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.volume-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.volume-control input[type="range"]:focus {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

#volume-value {
  color: #60a5fa;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 35px;
  text-align: right;
}

/* Mobile optimizations for effects */
@media (max-width: 768px) {
  .floating-score {
    font-size: 1.5rem;
  }
  
  .combo-multiplier {
    font-size: 2rem;
    top: 15%;
  }
  
  .celebration-particle {
    width: 6px !important;
    height: 6px !important;
  }
  
  .volume-control {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
  }
  
  .volume-control label {
    min-width: auto;
    text-align: center;
  }
}

/* DataQ Integration Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input focus styles */
#player-nickname:focus {
  outline: none;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Button disabled states */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Responsive adjustments for DataQ panel */
@media (max-width: 480px) {
  #dataq-panel {
    bottom: 10vh !important;
    padding: 20px !important;
    min-width: 280px !important;
  }
  
  #dataq-panel button {
    min-width: 120px !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
  }
  
  #player-nickname {
    font-size: 0.9rem !important;
    padding: 10px !important;
  }
}
