/* Games common styles — shared across all games, themed via custom properties */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--accent, #60efff);
  outline-offset: 2px;
}

body {
  font-family: "Ubuntu", sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--body-glow);
  pointer-events: none;
  z-index: -1;
}

#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: var(--bg-opacity, 0.5);
}

.game-container {
  background: var(--container-bg, rgba(10, 10, 30, 0.7));
  backdrop-filter: blur(15px);
  border-radius: 30px;
  padding: 30px;
  box-shadow:
    0 0 60px rgba(var(--accent-rgb), 0.1),
    0 0 100px rgba(var(--accent-rgb), 0.1),
    inset 0 0 60px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(var(--accent-rgb), 0.15);
  position: relative;
  overflow: hidden;

  --game-width: min(var(--game-max-width, 900px), 90vw, 65vh * 1.3333);
  width: calc(var(--game-width) + 60px);
  max-width: 95vw;
  max-height: 98vh;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.header,
.score-board,
.canvas-wrapper,
.controls,
.footer {
  width: 100%;
}

.header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-wrapper {
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.title {
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--title-gradient);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(var(--accent-rgb), 0.5);
  letter-spacing: 8px;
  line-height: 1;
}

.game-icon {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.5));
  animation: iconFloat 3s ease-in-out infinite;
}

.game-icon svg,
.game-icon img {
  height: 100%;
  width: auto;
  display: block;
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(5deg);
  }
}

.header-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.header-btn:active {
  transform: scale(0.95);
}

.header-btn svg,
.header-btn img.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.score-board {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 25px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
  border-radius: 15px;
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  position: relative;
  z-index: 1;
}

.score-board::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.score-item {
  text-align: center;
  position: relative;
}

.score-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
  margin-bottom: 5px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.score-value {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5);
  transition: all 0.3s ease;
}

.canvas-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.8),
    inset 0 0 40px rgba(0, 0, 0, 0.8);
  border: 3px solid rgba(var(--accent-rgb), 0.2);
  background: var(--canvas-bg, #020205);
  aspect-ratio: var(--canvas-aspect, 4 / 3);
}

.canvas-wrapper::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--border-glow-gradient);
  background-size: 400% 400%;
  border-radius: 15px;
  z-index: -1;
  animation: borderGlow 4s ease infinite;
  opacity: 0.4;
}

@keyframes borderGlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.controls {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn {
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn svg,
.btn img.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(
    45deg,
    var(--accent),
    var(--accent-light, var(--accent))
  );
  color: #0a0a1a;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(var(--accent-rgb), 0.5);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.btn-secondary:active {
  transform: translateY(1px);
}

.btn.active {
  background: linear-gradient(
    45deg,
    var(--accent),
    var(--accent-light, var(--accent))
  );
  color: #0a0a1a;
  border-color: transparent;
}

.btn:focus-visible,
.header-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.instructions {
  margin-top: 15px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

.instructions span {
  color: var(--accent);
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: 5px;
  margin: 0 2px;
}

.footer {
  margin-top: 15px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Game Over overlay */
.game-over-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.game-over-content {
  background: linear-gradient(135deg, #0a0a1a, #1a1a3e);
  padding: 50px;
  border-radius: 30px;
  text-align: center;
  border: 3px solid rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 0 60px rgba(var(--accent-rgb), 0.3);
  animation: gameOverAppear 0.5s ease;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes gameOverAppear {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.game-over-title {
  font-size: 3rem;
  font-weight: 700;
  background: var(--game-over-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.5);
  letter-spacing: 5px;
}

.final-score {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 30px;
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 500px;
}

.stat-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  margin-bottom: 5px;
}

.stat-value {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
}

/* Enhanced Game Over - Breakdown */
.game-over-breakdown {
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-item.highlight {
  background: rgba(var(--accent-rgb), 0.1);
  padding: 10px;
  border-radius: 6px;
  margin: 5px -5px 0;
}

.breakdown-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.breakdown-value {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.game-over-analysis {
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
  padding: 12px 15px;
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  line-height: 1.5;
  display: none;
}

.restart-btn-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

/* Settings overlay */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(10px);
}

.settings-content {
  background: linear-gradient(135deg, #0a0a1a, #1a1a3e);
  padding: 40px;
  border-radius: 25px;
  border: 2px solid rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 0 50px rgba(var(--accent-rgb), 0.2);
  max-width: 400px;
  width: 90%;
}

.settings-title {
  font-size: 2rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.settings-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-label {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.setting-value {
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  transition: all 0.3s ease;
  user-select: none;
}

.setting-value:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

/* Mobile controls base */
.mobile-controls {
  display: none;
  margin-top: 15px;
  gap: 20px;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

.mobile-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-touch-callout: none;
}

.mobile-btn svg,
.mobile-btn img.icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
  pointer-events: none;
}

.mobile-btn.pressed {
  background: rgba(var(--accent-rgb), 0.4);
  transform: scale(0.9);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5);
  border-color: var(--accent);
}

/* Achievement toast notification */
.achievement-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #1a1a3e, #0a0a1a);
  border: 2px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 3000;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(var(--accent-rgb), 0.15);
  pointer-events: none;
}

.achievement-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.ach-toast-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.ach-toast-icon .ach-svg-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  display: inline-block;
}

.ach-toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ach-toast-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}

.ach-toast-name {
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .game-container {
    padding: 15px;
    margin: 10px;
    width: 100%;
    --game-width: 100%;
  }
  .title {
    font-size: 1.8rem;
    letter-spacing: 4px;
  }
  .mobile-controls {
    display: flex;
  }
  .score-board {
    padding: 12px 15px;
  }
  .score-value {
    font-size: 1.2rem;
  }
  .achievement-toast {
    top: 10px;
    right: 10px;
    left: 10px;
    transform: translateY(-120%);
  }
  .achievement-toast.show {
    transform: translateY(0);
  }
}

/* ============================================
   ENHANCED UI STYLES
   ============================================ */

/* Enhanced button styles with Material Design ripple */
.btn {
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
  z-index: 0;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
  z-index: 1;
}

.btn:hover::after {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.5);
}

.btn-secondary:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.3);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

/* Enhanced score board with animations */
.score-board {
  position: relative;
  overflow: hidden;
}

.score-board::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--accent-rgb), 0.1),
    transparent
  );
  animation: scoreShine 3s ease-in-out infinite;
}

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

.score-item {
  position: relative;
  padding: 5px 10px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.score-item:hover {
  background: rgba(var(--accent-rgb), 0.1);
  transform: translateY(-2px);
}

.score-value {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-value.pulse {
  animation: scorePulse 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scorePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
    text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.8);
  }
  100% {
    transform: scale(1);
  }
}

/* Enhanced overlays with fade and scale */
.game-over-overlay {
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.game-over-content {
  animation: overlayScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes overlayScaleIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.game-over-content h2 {
  animation: titleSlideDown 0.6s ease 0.2s both;
}

@keyframes titleSlideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.game-over-content .stats-grid {
  animation: statsFadeIn 0.5s ease 0.4s both;
}

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

.game-over-content .btn-group {
  animation: buttonsSlideUp 0.5s ease 0.6s both;
}

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

/* Enhanced header with tooltip */
.header-btn {
  position: relative;
}

.header-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    bottom 0.3s ease;
}

.header-btn:hover::after {
  opacity: 1;
  bottom: -45px;
}

/* Canvas wrapper enhanced glow */
.canvas-wrapper {
  position: relative;
  transition: all 0.3s ease;
}

.canvas-wrapper:hover {
  box-shadow:
    0 0 60px rgba(0, 0, 0, 0.9),
    0 0 80px rgba(var(--accent-rgb), 0.2),
    inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.canvas-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(var(--accent-rgb), 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.canvas-wrapper:hover::after {
  opacity: 1;
}

/* Loading skeleton for score board */
.score-value.loading {
  position: relative;
  color: transparent !important;
}

.score-value.loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 20px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  background-size: 200% 100%;
  border-radius: 5px;
  animation: skeletonLoading 1.5s ease-in-out infinite;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Mobile controls enhanced */
.mobile-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.mobile-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.4s,
    height 0.4s;
}

.mobile-btn:active::before {
  width: 100px;
  height: 100px;
}

.mobile-btn:active {
  transform: scale(0.9);
}

/* Progress bar for level */
.level-progress {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.level-progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-light, var(--accent))
  );
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.level-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
  0%,
  100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

/* High score indicator */
.high-score-indicator {
  position: absolute;
  top: -10px;
  right: 10px;
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #0a0a1a;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: highScoreBounce 1s ease infinite;
}

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

/* Floating particles effect for game container */
.game-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(var(--accent-rgb), 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(var(--accent-rgb), 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
  animation: containerGlow 8s ease-in-out infinite;
}

@keyframes containerGlow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Enhanced instructions */
.instructions {
  position: relative;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

.instructions span {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.instructions span:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.4);
}

/* Footer enhanced */
.footer {
  position: relative;
  transition: all 0.3s ease;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer:hover::before {
  opacity: 1;
}

.footer a {
  position: relative;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.footer a:hover::after {
  width: 100%;
}

/* Settings overlay enhanced */
.settings-overlay {
  animation: overlayFadeIn 0.3s ease;
}

.settings-content {
  animation: overlayScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.setting-row {
  transition: all 0.3s ease;
}

.setting-row:hover {
  background: rgba(var(--accent-rgb), 0.05);
  transform: translateX(5px);
}

/* Pause overlay enhanced */
.pause-overlay {
  animation: overlayFadeIn 0.3s ease;
}

.pause-content {
  animation: overlayScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pause-content h2 {
  animation: titleSlideDown 0.6s ease 0.2s both;
}

.pause-content .btn-group {
  animation: buttonsSlideUp 0.5s ease 0.4s both;
}
