@charset "UTF-8";
.theme-light {
  --bg-primary: #F0F0F0;
  --bg-secondary: #FFFFFF;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border-color: #E0E0E0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
  --overlay-color: rgba(0, 0, 0, 0.3);
  --accent-primary: #E70009;
  --accent-secondary: #1CBFDE;
  --system-menu-bg: rgba(255, 255, 255, 0.95);
  --glass-bg: rgba(240, 240, 240, 0.9);
  --bg-tertiary: #FAFAFA;
  --surface-primary: #FFFFFF;
  --surface-secondary: #F8F8F8;
  --surface-hover: #F0F0F0;
  --text-tertiary: #999999;
  --text-inverse: #FFFFFF;
  --border-light: #F0F0F0;
  --border-strong: #CCCCCC;
  --shadow-strong: rgba(0, 0, 0, 0.2);
  --overlay-light: rgba(0, 0, 0, 0.1);
  --overlay-strong: rgba(0, 0, 0, 0.5);
  --glass-border: rgba(0, 0, 0, 0.06);
  --accent-success: #4CAF50;
  --accent-warning: #FF9800;
  --accent-error: #F44336;
  --accent-info: #2196F3;
  --gradient-primary: linear-gradient(135deg, #E70009 0%, rgb(255, 27, 35.8831168831) 100%);
  --gradient-secondary: linear-gradient(135deg, #1CBFDE 0%, rgb(69.408, 205.676, 231.592) 100%);
  --gradient-background: linear-gradient(135deg, #F0F0F0 0%, #E8E8E8 100%);
  --game-tile-bg: #FFFFFF;
  --game-tile-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --game-tile-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.15);
  --game-tile-overlay: rgba(0, 0, 0, 0.1);
}

.theme-dark {
  --bg-primary: #2D2D2D;
  --bg-secondary: #404040;
  --text-primary: #FFFFFF;
  --text-secondary: #CCCCCC;
  --border-color: #555555;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.4);
  --overlay-color: rgba(0, 0, 0, 0.5);
  --accent-primary: #1CBFDE;
  --accent-secondary: #E70009;
  --system-menu-bg: rgba(45, 45, 45, 0.95);
  --glass-bg: rgba(45, 45, 45, 0.9);
  --bg-tertiary: #353535;
  --surface-primary: #404040;
  --surface-secondary: #353535;
  --surface-hover: #4A4A4A;
  --text-tertiary: #999999;
  --text-inverse: #000000;
  --border-light: #404040;
  --border-strong: #666666;
  --shadow-strong: rgba(0, 0, 0, 0.6);
  --overlay-light: rgba(0, 0, 0, 0.3);
  --overlay-strong: rgba(0, 0, 0, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --accent-success: #4CAF50;
  --accent-warning: #FF9800;
  --accent-error: #F44336;
  --accent-info: #2196F3;
  --gradient-primary: linear-gradient(135deg, #1CBFDE 0%, rgb(69.408, 205.676, 231.592) 100%);
  --gradient-secondary: linear-gradient(135deg, #E70009 0%, rgb(255, 27, 35.8831168831) 100%);
  --gradient-background: linear-gradient(135deg, #2D2D2D 0%, #232526 100%);
  --game-tile-bg: #404040;
  --game-tile-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --game-tile-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.4);
  --game-tile-overlay: rgba(255, 255, 255, 0.1);
}

.theme-light .game-tile__overlay {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}
.theme-light .user-avatar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.theme-light ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}
.theme-light ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}
.theme-light ::selection {
  background: rgba(231, 0, 9, 0.2);
  color: var(--text-primary);
}
.theme-light .switch-home {
  background: var(--gradient-background);
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
}

.theme-dark .game-tile__overlay {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}
.theme-dark .user-avatar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.theme-dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}
.theme-dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}
.theme-dark ::selection {
  background: rgba(28, 191, 222, 0.3);
  color: var(--text-primary);
}
.theme-dark .switch-home {
  background: var(--gradient-background);
}

@media (prefers-contrast: high) {
  .theme-light,
  .theme-dark {
    --border-color: currentColor;
    --accent-primary: #000000;
    --accent-secondary: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.5);
  }
  .theme-light {
    --text-primary: #000000;
    --text-secondary: #333333;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
  }
  .theme-dark {
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --bg-primary: #000000;
    --bg-secondary: #1A1A1A;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.theme-transition {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.themed-border {
  border-color: var(--border-color);
}

.themed-shadow {
  box-shadow: var(--shadow-color);
}

.themed-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.themed-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 4px var(--shadow-color);
  transition: all 0.2s ease;
}
.themed-card:hover {
  box-shadow: 0 6px 20px var(--shadow-hover);
  transform: translateY(-1px);
}

.themed-text-primary {
  color: var(--text-primary);
}

.themed-text-secondary {
  color: var(--text-secondary);
}

.themed-button-primary {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--gradient-primary);
  color: white;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 2px 8px rgba(28, 191, 222, 0.3);
}
.themed-button-primary:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.themed-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(28, 191, 222, 0.4);
}
.themed-button-primary:active {
  transform: translateY(0);
}
.themed-button-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.themed-button-secondary {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: var(--surface-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}
.themed-button-secondary:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.themed-button-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.themed-button-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px);
  }
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.animate-fade-in {
  animation: fade-in 0.3s ease-out 0s both;
}

.animate-slide-up {
  animation: slide-up 0.3s ease-out 0s both;
}

.animate-bounce-in {
  animation: bounce-in 0.6s ease-out 0s both;
}

.animate-pulse {
  animation: pulse 1s ease-in-out infinite;
}

.animate-shake {
  animation: shake 0.3s ease-in-out;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.hover-lift {
  transition: transform 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-2px);
}

.hover-scale {
  transition: transform 0.2s ease;
}
.hover-scale:hover {
  transform: scale(1.05);
}

.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

.animate-delay-4 {
  animation-delay: 0.4s;
}

.animate-delay-5 {
  animation-delay: 0.5s;
}

.animate-delay-6 {
  animation-delay: 0.6s;
}

.animate-delay-7 {
  animation-delay: 0.7s;
}

.animate-delay-8 {
  animation-delay: 0.8s;
}

.animate-delay-9 {
  animation-delay: 0.9s;
}

.animate-delay-10 {
  animation-delay: 1s;
}

.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

.d-inline {
  display: inline !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.d-grid {
  display: grid !important;
}

.flex-row {
  flex-direction: row !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-nowrap {
  flex-wrap: nowrap !important;
}

.justify-start {
  justify-content: flex-start !important;
}

.justify-center {
  justify-content: center !important;
}

.justify-end {
  justify-content: flex-end !important;
}

.justify-between {
  justify-content: space-between !important;
}

.justify-around {
  justify-content: space-around !important;
}

.align-start {
  align-items: flex-start !important;
}

.align-center {
  align-items: center !important;
}

.align-end {
  align-items: flex-end !important;
}

.align-stretch {
  align-items: stretch !important;
}

.flex-1 {
  flex: 1 1 0% !important;
}

.flex-auto {
  flex: 1 1 auto !important;
}

.flex-none {
  flex: none !important;
}

.position-static {
  position: static !important;
}

.position-relative {
  position: relative !important;
}

.position-absolute {
  position: absolute !important;
}

.position-fixed {
  position: fixed !important;
}

.position-sticky {
  position: sticky !important;
}

.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-justify {
  text-align: justify !important;
}

.text-nowrap {
  white-space: nowrap !important;
}

.text-wrap {
  white-space: normal !important;
}

.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-lowercase {
  text-transform: lowercase !important;
}

.text-capitalize {
  text-transform: capitalize !important;
}

.fw-light {
  font-weight: 300 !important;
}

.fw-normal {
  font-weight: 400 !important;
}

.fw-medium {
  font-weight: 500 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.overflow-auto {
  overflow: auto !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

.overflow-visible {
  overflow: visible !important;
}

.overflow-scroll {
  overflow: scroll !important;
}

.overflow-x-auto {
  overflow-x: auto !important;
}

.overflow-x-hidden {
  overflow-x: hidden !important;
}

.overflow-y-auto {
  overflow-y: auto !important;
}

.overflow-y-hidden {
  overflow-y: hidden !important;
}

.border {
  border: 1px solid var(--border-color) !important;
}

.border-0 {
  border: 0 !important;
}

.border-top {
  border-top: 1px solid var(--border-color) !important;
}

.border-bottom {
  border-bottom: 1px solid var(--border-color) !important;
}

.border-left {
  border-left: 1px solid var(--border-color) !important;
}

.border-right {
  border-right: 1px solid var(--border-color) !important;
}

.rounded {
  border-radius: var(--border-radius, 4px) !important;
}

.rounded-0 {
  border-radius: 0 !important;
}

.rounded-sm {
  border-radius: 2px !important;
}

.rounded-lg {
  border-radius: 8px !important;
}

.rounded-full {
  border-radius: 50% !important;
}

.shadow-none {
  box-shadow: none !important;
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.opacity-0 {
  opacity: 0 !important;
}

.opacity-25 {
  opacity: 0.25 !important;
}

.opacity-50 {
  opacity: 0.5 !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

.opacity-100 {
  opacity: 1 !important;
}

.cursor-auto {
  cursor: auto !important;
}

.cursor-default {
  cursor: default !important;
}

.cursor-pointer {
  cursor: pointer !important;
}

.cursor-wait {
  cursor: wait !important;
}

.cursor-text {
  cursor: text !important;
}

.cursor-move {
  cursor: move !important;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}

.select-none {
  user-select: none !important;
}

.select-text {
  user-select: text !important;
}

.select-all {
  user-select: all !important;
}

.select-auto {
  user-select: auto !important;
}

.pointer-events-none {
  pointer-events: none !important;
}

.pointer-events-auto {
  pointer-events: auto !important;
}

.z-0 {
  z-index: 0 !important;
}

.z-10 {
  z-index: 10 !important;
}

.z-20 {
  z-index: 20 !important;
}

.z-30 {
  z-index: 30 !important;
}

.z-40 {
  z-index: 40 !important;
}

.z-50 {
  z-index: 50 !important;
}

.switch-home {
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.switch-home__main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.switch-home--loading .game-grid {
  pointer-events: none;
  opacity: 0.7;
}
.switch-home--error .game-grid {
  opacity: 0.5;
}

.keyboard-hint {
  position: absolute;
  bottom: 9rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.keyboard-hint--visible {
  opacity: 1;
}
.keyboard-hint__keys {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.keyboard-hint__key {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  min-width: 24px;
  text-align: center;
}

.game-detail {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-secondary);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 16px 48px var(--shadow-hover);
  z-index: 1050;
  text-align: center;
  animation: bounceIn 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.game-detail__image {
  width: 200px;
  height: 150px;
  border-radius: 0.75rem;
  margin: 0 auto 1rem;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-primary);
}
.game-detail__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.game-detail__description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.game-detail__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes bounceIn {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.8;
  }
  70% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
@media (min-width: 640px) {
  .switch-home__main {
    padding: 0 1rem;
  }
  .game-grid {
    padding: 4.75rem 1rem 6rem;
    justify-content: flex-start;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    height: calc(100vh - 10.75rem);
  }
  .game-grid .game-tile {
    scroll-snap-align: start;
    width: 100%;
    max-width: 300px;
  }
  .keyboard-hint {
    display: none;
  }
  .game-detail {
    padding: 1.5rem;
    width: 95%;
  }
  .game-detail__image {
    width: 150px;
    height: 113px;
  }
  .game-detail__title {
    font-size: 1.25rem;
  }
  .game-detail__actions {
    flex-direction: column;
  }
}
@media (min-width: 768px) {
  .game-grid {
    justify-content: center;
    flex-wrap: wrap;
    overflow-y: auto;
    scroll-snap-type: none;
  }
  .game-grid .game-tile {
    scroll-snap-align: none;
    margin-bottom: 1rem;
  }
}
@media (min-width: 1024px) {
  .game-grid {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
  }
  .game-grid .game-tile {
    scroll-snap-align: center;
    margin-bottom: 0;
  }
}
.theme-dark .switch-home {
  background: var(--bg-primary);
}
.theme-dark .game-detail,
.theme-dark .error-overlay {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.theme-dark .keyboard-hint__key {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.theme-light .switch-home {
  background: var(--bg-primary);
}
.theme-light .game-detail,
.theme-light .error-overlay {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}
.theme-light .keyboard-hint__key {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.switch-home:focus-within .keyboard-hint {
  opacity: 1;
}

@media print {
  .switch-home {
    height: auto !important;
    overflow: visible !important;
    background: white !important;
  }
  .game-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 1rem !important;
    overflow: visible !important;
    height: auto !important;
    padding: 1rem !important;
  }
  .loading-overlay,
  .error-overlay,
  .game-detail,
  .keyboard-hint {
    display: none !important;
  }
}
.switch-home {
  transform: translateZ(0);
  will-change: auto;
}
.switch-home .game-grid {
  contain: layout style paint;
}
.switch-home .game-grid .game-tile {
  contain: layout style paint;
}

@media (prefers-reduced-motion: reduce) {
  .switch-home,
  .game-grid,
  .game-detail,
  .loading-overlay {
    animation: none !important;
    transition: none !important;
  }
  .game-tile {
    animation: none !important;
  }
}
@media (prefers-contrast: high) {
  .switch-home {
    background: var(--bg-primary) !important;
  }
  .keyboard-hint__key,
  .game-detail,
  .error-overlay {
    border-width: 2px !important;
  }
}
.game-grid {
  display: flex;
  gap: 0.75rem;
  padding: 5rem 1.5rem 6.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
  height: 100vh;
  width: 100%;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.game-grid::-webkit-scrollbar {
  display: none;
}
.game-grid .game-tile {
  scroll-snap-align: center;
  flex-shrink: 0;
}
.game-grid--loaded .game-tile:nth-child(1) {
  animation: slideInFromRight 400ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(2) {
  animation: slideInFromRight 500ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(3) {
  animation: slideInFromRight 600ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(4) {
  animation: slideInFromRight 700ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(5) {
  animation: slideInFromRight 800ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(6) {
  animation: slideInFromRight 900ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(7) {
  animation: slideInFromRight 1000ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(8) {
  animation: slideInFromRight 1100ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(9) {
  animation: slideInFromRight 1200ms ease-out;
  animation-fill-mode: both;
}
.game-grid--loaded .game-tile:nth-child(10) {
  animation: slideInFromRight 1300ms ease-out;
  animation-fill-mode: both;
}
.game-grid--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.game-grid--empty .empty-state {
  text-align: center;
  max-width: 400px;
}

.empty-state__icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}
.empty-state__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.empty-state__description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.empty-state__action .btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--gradient-primary);
  color: white;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 2px 8px rgba(28, 191, 222, 0.3);
}
.empty-state__action .btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.empty-state__action .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(28, 191, 222, 0.4);
}
.empty-state__action .btn:active {
  transform: translateY(0);
}
.empty-state__action .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.loading-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 1050;
}
.loading-overlay__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loading-overlay__text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.error-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  max-width: 400px;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px var(--shadow-hover);
  z-index: 1050;
}
.error-overlay__icon {
  font-size: 3rem;
  color: #FF4444;
}
.error-overlay__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.error-overlay__message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
}
.error-overlay__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.game-tile {
  width: 15rem;
  height: 20rem;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  background-color: var(--game-tile-bg);
  box-shadow: var(--game-tile-shadow);
  border: 1px solid var(--border-light);
  position: relative;
}
.game-tile:hover {
  box-shadow: var(--game-tile-shadow-hover);
  transform: translateY(-2px);
}
.game-tile--selected {
  border: 3px solid var(--accent-primary);
  box-shadow: 0 8px 24px var(--shadow-hover);
  transform: scale(1.05);
}
.game-tile:focus-visible {
  outline: 2px solid #1CBFDE;
  outline-offset: 2px;
}
.game-tile__image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}
.game-tile__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.game-tile__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 0.5rem 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  z-index: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-tile--selected {
  transform: scale(1.05);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 8px 24px var(--shadow-hover);
  z-index: 2;
}
.game-tile--loading .game-tile__image {
  background: var(--bg-secondary);
}
.game-tile--loading .game-tile__image::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.game-tile:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px var(--shadow-hover);
}
.game-tile:hover .game-tile__title {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}
.game-tile:active {
  transform: scale(0.98);
}
.game-tile--new::after {
  content: "NEW";
  position: absolute;
  top: -5px;
  left: -5px;
  background: #FF4444;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 4;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.game-tile--recent .game-tile__title::before {
  content: "●";
  color: #4CAF50;
  margin-right: 0.25rem;
}
.game-tile--favorite .game-tile__title::before {
  content: "♥";
  color: #FF4081;
  margin-right: 0.25rem;
}

.game-grid {
  display: flex;
  gap: 0.75rem;
  padding: 5rem 1.5rem 6.25rem;
  overflow-x: auto;
  align-items: center;
  height: 100vh;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.game-grid::-webkit-scrollbar {
  display: none;
}
.game-grid .game-tile {
  scroll-snap-align: center;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .game-grid {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: auto;
    scroll-snap-type: none;
  }
  .game-grid .game-tile {
    scroll-snap-align: none;
  }
}

.game-tile:focus {
  outline: none;
}
.game-tile:focus-visible {
  z-index: 3;
}
.game-tile:focus-visible:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.game-tile:nth-child(1) {
  animation: slideInRight 350ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(2) {
  animation: slideInRight 400ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(3) {
  animation: slideInRight 450ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(4) {
  animation: slideInRight 500ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(5) {
  animation: slideInRight 550ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(6) {
  animation: slideInRight 600ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(7) {
  animation: slideInRight 650ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(8) {
  animation: slideInRight 700ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(9) {
  animation: slideInRight 750ms ease-out;
  animation-fill-mode: both;
}
.game-tile:nth-child(10) {
  animation: slideInRight 800ms ease-out;
  animation-fill-mode: both;
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.theme-dark .game-tile__image {
  filter: brightness(0.9);
}
.theme-dark .game-tile--selected .game-tile__image {
  filter: brightness(1);
}

.theme-light .game-tile__title {
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.95));
  color: var(--text-primary);
}

.game-tile-skeleton {
  width: 15rem;
  height: 20rem;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  background: var(--bg-secondary);
}
.game-tile-skeleton::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
.top-bar {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 10px var(--shadow-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  height: 3.75rem;
  transition: all 0.3s ease;
}
.top-bar__user-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.top-bar__home-indicator {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.8;
}
.top-bar__status-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.top-bar__time {
  font-variant-numeric: tabular-nums;
  min-width: 50px;
  text-align: center;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-primary);
}
.top-bar__status-icon {
  font-size: 1rem;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}
.top-bar__status-icon:hover {
  opacity: 1;
}

.user-avatar {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--surface-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px var(--shadow-color);
}
.user-avatar:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px var(--shadow-hover);
  background: var(--surface-hover);
}
.user-avatar:active {
  transform: scale(0.95);
}
.user-avatar__image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.battery-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}

.battery-icon {
  position: relative;
  width: 28px;
  height: 14px;
  border: 2px solid var(--text-secondary);
  border-radius: 2px;
  opacity: 0.8;
  transition: all 0.15s ease;
}
.battery-icon:hover {
  opacity: 1;
}
.battery-icon::before {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 3px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 0 1px 1px 0;
}
.battery-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  border-radius: 1px;
  transition: all 0.3s ease;
}
.battery-icon__charging-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  animation: pulse 1.5s ease-in-out infinite;
  z-index: 10;
}
.battery-icon--high::after {
  background: var(--text-primary);
  width: calc(100% - 4px);
}
.battery-icon--medium::after {
  background: var(--text-primary);
  width: calc(60% - 4px);
}
.battery-icon--low::after {
  background: var(--text-primary);
  width: calc(30% - 4px);
}
.battery-icon--critical::after {
  background: var(--text-primary);
  width: calc(15% - 4px);
  animation: pulse 1s ease-in-out infinite;
}
.battery-icon--charging::after {
  background: var(--text-primary);
  width: var(--battery-width, calc(100% - 4px));
  animation: charging-animation 2s ease-in-out infinite;
}

.battery-percentage {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 35px;
  text-align: right;
}

.wifi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  opacity: 0.8;
}
.wifi-icon:hover {
  opacity: 1;
}
.wifi-icon__svg {
  transition: all 0.15s ease;
}
.wifi-icon--disconnected {
  opacity: 0.3;
}
.wifi-icon--disconnected .wifi-icon__svg {
  color: var(--text-secondary);
}
.wifi-icon--weak {
  opacity: 0.5;
}
.wifi-icon--weak .wifi-icon__svg {
  color: var(--text-secondary);
}
.wifi-icon--medium {
  opacity: 0.7;
}
.wifi-icon--medium .wifi-icon__svg {
  color: var(--text-secondary);
}
.wifi-icon--strong {
  opacity: 1;
}
.wifi-icon--strong .wifi-icon__svg {
  color: var(--text-primary);
}

.theme-dark .wifi-icon--disconnected .wifi-icon__svg {
  color: #888888;
}
.theme-dark .wifi-icon--weak .wifi-icon__svg {
  color: #AAAAAA;
}
.theme-dark .wifi-icon--medium .wifi-icon__svg {
  color: #CCCCCC;
}
.theme-dark .wifi-icon--strong .wifi-icon__svg {
  color: #FFFFFF;
}

.theme-light .wifi-icon--disconnected .wifi-icon__svg {
  color: #CCCCCC;
}
.theme-light .wifi-icon--weak .wifi-icon__svg {
  color: #999999;
}
.theme-light .wifi-icon--medium .wifi-icon__svg {
  color: #666666;
}
.theme-light .wifi-icon--strong .wifi-icon__svg {
  color: #333333;
}

.wifi-icon__svg:hover {
  transform: scale(1.1);
}

@media (prefers-contrast: high) {
  .wifi-icon .wifi-icon__svg {
    color: currentColor !important;
  }
  .theme-dark .wifi-icon .wifi-icon__svg {
    color: #FFFFFF !important;
  }
  .theme-light .wifi-icon .wifi-icon__svg {
    color: #000000 !important;
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@keyframes charging-animation {
  0% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.7;
  }
}
.battery-icon {
  --battery-width: 100%;
}

@media (min-width: 640px) {
  .top-bar {
    padding: 0.75rem 1rem;
  }
  .top-bar__user-section {
    gap: 0.5rem;
  }
  .top-bar__status-section {
    gap: 0.75rem;
  }
  .top-bar__home-indicator {
    font-size: 1rem;
  }
  .top-bar__time {
    font-size: 0.875rem;
    min-width: 45px;
  }
  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
  }
  .battery-icon {
    width: 24px;
    height: 12px;
  }
  .battery-icon::before {
    right: -3px;
    top: 2px;
    width: 2px;
    height: 8px;
  }
  .battery-icon__charging-indicator {
    right: -10px;
    font-size: 10px;
  }
  .battery-percentage {
    font-size: 0.75rem;
    min-width: 30px;
  }
  .wifi-icon {
    font-size: 1rem;
  }
}
.theme-dark .user-avatar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.theme-dark .battery-icon {
  border-color: #CCCCCC;
}
.theme-dark .battery-icon::before {
  background: #CCCCCC;
}
.theme-dark .battery-icon::after {
  background: #FFFFFF !important;
}

.theme-light .user-avatar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.theme-light .battery-icon {
  border-color: #666666;
}
.theme-light .battery-icon::before {
  background: #666666;
}
.theme-light .battery-icon::after {
  background: #333333 !important;
}

@media (prefers-reduced-motion: reduce) {
  .battery-icon__charging-indicator, .battery-icon--critical::after, .battery-icon--charging::after {
    animation: none !important;
  }
}
@media (prefers-contrast: high) {
  .battery-icon {
    border-width: 3px;
  }
  .battery-icon::before {
    background: currentColor;
  }
  .battery-icon::after {
    background: currentColor !important;
  }
  .battery-percentage,
  .top-bar__time {
    font-weight: 700;
  }
  .theme-dark .battery-icon::after {
    background: #FFFFFF !important;
  }
  .theme-light .battery-icon::after {
    background: #000000 !important;
  }
}
.nintendo-system-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 1.25rem;
  position: relative;
}
.nintendo-system-menu__bar {
  display: flex;
  align-items: center;
  gap: 0;
  background-color: rgba(45, 45, 45, 0.95);
  border-radius: 50px;
  padding: 0.75rem 1.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}
.nintendo-system-menu__icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 2px;
  opacity: 0.7;
}
.nintendo-system-menu__icon--selected {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
  opacity: 1;
}
.nintendo-system-menu__icon:hover:not(.nintendo-system-menu__icon--selected) {
  transform: scale(1.04);
  opacity: 1;
}
.nintendo-system-menu__icon svg {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}
.nintendo-system-menu__pc-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  opacity: 0.7;
  margin-top: 1.25rem;
  align-self: flex-start;
  margin-left: 1.25rem;
}
.nintendo-system-menu__pc-icon:hover {
  transform: scale(1.05);
  opacity: 1;
}
.nintendo-system-menu__pc-icon svg {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.theme-dark .nintendo-system-menu__bar {
  background-color: rgba(45, 45, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.theme-light .nintendo-system-menu__bar {
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.theme-light .nintendo-system-menu__pc-icon svg {
  color: rgba(0, 0, 0, 0.8) !important;
}

.joycon-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}
.joycon-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.joycon-modal__content {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}
.joycon-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.joycon-modal__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.joycon-modal__close {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
}
.joycon-modal__close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  transform: scale(1.1);
}
.joycon-modal__body {
  padding: 1.5rem;
}
.joycon-modal__status {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
}
.joycon-modal__status h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.joycon-modal__status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.joycon-modal__status-item {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary);
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
}
.joycon-modal__status-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.joycon-modal__status-value {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}
.joycon-modal__status-value--connected {
  background: rgba(0, 255, 0, 0.1);
  color: #00ff00;
  border: 1px solid rgba(0, 255, 0, 0.3);
}
.joycon-modal__status-value--disconnected {
  background: rgba(128, 128, 128, 0.1);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.joycon-modal__instructions {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
}
.joycon-modal__instructions h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.joycon-modal__instructions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.joycon-modal__instruction-item {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary);
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
}
.joycon-modal__instruction-button {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid var(--border-color);
}
.joycon-modal__instruction-action {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

@keyframes modalSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@media (min-width: 640px) {
  .nintendo-system-menu {
    padding: 1rem;
  }
  .nintendo-system-menu__bar {
    padding: 0.5rem 1rem;
  }
  .nintendo-system-menu__icon {
    width: 40px;
    height: 40px;
    margin: 0 1px;
  }
  .nintendo-system-menu__icon svg {
    width: 18px;
    height: 18px;
  }
  .nintendo-system-menu__pc-icon {
    width: 44px;
    height: 44px;
    margin-top: 1rem;
    margin-left: 1rem;
  }
  .nintendo-system-menu__pc-icon svg {
    width: 24px;
    height: 24px;
  }
  .joycon-modal__content {
    width: 95%;
    max-height: 90vh;
  }
  .joycon-modal__header {
    padding: 1rem 1rem 0.75rem;
  }
  .joycon-modal__body {
    padding: 1rem;
  }
  .joycon-modal__status-grid {
    grid-template-columns: 1fr;
  }
}
.settings-overlay {
  background-color: var(--surface-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px var(--shadow-hover);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: absolute;
  top: 4.25rem;
  right: 1.5rem;
  border-radius: 0.75rem;
  padding: 1.25rem;
  min-width: 220px;
  max-width: 300px;
  z-index: 1050;
  animation: fadeInScale 300ms ease-out;
}
.settings-overlay__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.settings-overlay__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}
.settings-overlay__item:last-child {
  border-bottom: none;
  margin-bottom: 0.75rem;
}
.settings-overlay__label {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}
.settings-overlay__footer {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  text-align: center;
}
.settings-overlay__version {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.settings-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-color);
  z-index: 1040;
  animation: fadeIn 300ms ease-out;
  cursor: pointer;
}

.theme-toggle {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  background: var(--accent-primary);
  color: white;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 60px;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.theme-toggle:hover {
  background: var(--accent-secondary);
  transform: scale(1.05);
}
.theme-toggle:active {
  transform: scale(0.95);
}
.theme-toggle--light {
  background: #E70009;
}
.theme-toggle--light:hover {
  background: rgb(180, 0, 7.012987013);
}
.theme-toggle--dark {
  background: #1CBFDE;
}
.theme-toggle--dark:hover {
  background: rgb(22.288, 152.036, 176.712);
}

.setting-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.setting-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.setting-switch--on {
  background: var(--accent-primary);
}
.setting-switch--on .setting-switch__thumb {
  transform: translateX(20px);
}
.setting-switch:hover .setting-switch__thumb {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.settings-section {
  margin-bottom: 1rem;
}
.settings-section__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  opacity: 0.8;
}
.settings-section__description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-top: 0.25rem;
}

.setting-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.setting-buttons .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}
.setting-buttons .btn--active {
  background: var(--accent-primary);
  color: white;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (min-width: 640px) {
  .settings-overlay {
    right: 1rem;
    left: 1rem;
    top: 4rem;
    min-width: auto;
    max-width: none;
  }
}
@media (min-width: 768px) {
  .settings-overlay {
    right: 1.5rem;
    left: auto;
    max-width: 300px;
  }
}
.theme-dark .settings-overlay {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.theme-dark .setting-switch {
  background: #555555;
}
.theme-dark .setting-switch--on {
  background: #1CBFDE;
}

.theme-light .settings-overlay {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.theme-light .setting-switch {
  background: #E0E0E0;
}
.theme-light .setting-switch--on {
  background: #E70009;
}

.settings-overlay:focus-within .settings-backdrop {
  background: rgba(var(--overlay-color-rgb), 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .settings-overlay,
  .settings-backdrop {
    animation: none;
  }
  .setting-switch__thumb {
    transition: none;
  }
}
@media print {
  .settings-overlay,
  .settings-backdrop {
    display: none !important;
  }
}
.switch-settings {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.settings-header {
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}
.settings-header svg {
  pointer-events: none;
  transition: none;
  color: var(--text-primary);
}
.settings-header svg:hover {
  opacity: 1;
  transform: none;
  filter: none;
  box-shadow: none;
}
.settings-header h1 {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0;
  margin-left: 1rem;
  color: var(--text-primary);
}

.settings-content {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 70px);
  padding-bottom: 120px;
}

.settings-sidebar {
  width: 350px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

.support-section {
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.support-section h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  border-left: 3px solid transparent;
  transition: all 0.2s;
  position: relative;
}
.sidebar-item:hover {
  background: var(--bg-primary);
}
.sidebar-item.selected {
  background: var(--bg-primary);
  border-left-color: var(--accent-primary);
  border-left-width: 4px;
}
.sidebar-item.selected svg {
  color: var(--accent-primary);
}
.sidebar-item svg {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.sidebar-item span:first-of-type {
  margin-left: 1rem;
  flex: 1;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
}
.sidebar-item .submenu-arrow {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-left: auto;
  opacity: 0.6;
}

.settings-main {
  flex: 1;
  background: var(--bg-primary);
  padding: 0;
  overflow-y: auto;
  position: relative;
}

.settings-detail-section {
  padding: 0;
  max-width: none;
  width: 100%;
  position: relative;
  z-index: 2;
}

.settings-main-content {
  padding: 3rem;
}

.setting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.setting-header h2 {
  font-size: 1.8rem;
  font-weight: 400;
  margin: 0;
  color: var(--text-primary);
}

.theme-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-group {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid var(--border-color);
}

.theme-option {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  cursor: pointer;
  min-width: 80px;
  justify-content: center;
}
.theme-option:hover {
  color: var(--text-primary);
  background: var(--bg-primary);
}
.theme-option.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.theme-option svg {
  flex-shrink: 0;
}

.theme-preview {
  margin: 2rem 0;
}
.theme-preview__item {
  display: flex;
  justify-content: center;
}
.theme-preview__card {
  width: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid;
  transition: all 0.3s ease;
}
.theme-preview__card--light {
  background: #FFFFFF;
  border-color: #E0E0E0;
  color: #000000;
}
.theme-preview__card--dark {
  background: #404040;
  border-color: #555555;
  color: #FFFFFF;
}
.theme-preview__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid;
}
.theme-preview__card--light .theme-preview__header {
  border-color: #E0E0E0;
  background: #F8F8F8;
}
.theme-preview__card--dark .theme-preview__header {
  border-color: #555555;
  background: #353535;
}
.theme-preview__title {
  font-weight: 600;
  font-size: 0.9rem;
}
.theme-preview__controls {
  display: flex;
  gap: 0.5rem;
}
.theme-preview__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.theme-preview__card--light .theme-preview__dot {
  background: #CCCCCC;
}
.theme-preview__card--light .theme-preview__dot:first-child {
  background: #FF5F57;
}
.theme-preview__card--light .theme-preview__dot:nth-child(2) {
  background: #FFBD2E;
}
.theme-preview__card--light .theme-preview__dot:nth-child(3) {
  background: #28CA42;
}
.theme-preview__card--dark .theme-preview__dot {
  background: #666666;
}
.theme-preview__card--dark .theme-preview__dot:first-child {
  background: #FF5F57;
}
.theme-preview__card--dark .theme-preview__dot:nth-child(2) {
  background: #FFBD2E;
}
.theme-preview__card--dark .theme-preview__dot:nth-child(3) {
  background: #28CA42;
}
.theme-preview__content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.theme-preview__text-primary {
  font-weight: 600;
  font-size: 1rem;
}
.theme-preview__text-secondary {
  font-size: 0.9rem;
  opacity: 0.7;
}
.theme-preview__button {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  width: fit-content;
}
.theme-preview__card--light .theme-preview__button {
  background: #E70009;
  color: white;
}
.theme-preview__card--dark .theme-preview__button {
  background: #1CBFDE;
  color: white;
}

.setting-description-block {
  line-height: 1.6;
}
.setting-description-block p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

.setting-note {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1rem;
  border-left: 4px solid var(--accent-primary);
  margin-top: 2rem;
}
.setting-note p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.setting-note p:last-child {
  margin-bottom: 0;
}

.placeholder-content {
  padding: 3rem;
  text-align: center;
  color: var(--text-secondary);
}
.placeholder-content h2 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 400;
}
.placeholder-content p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.switch-settings .nintendo-system-menu {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--system-menu-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .settings-content {
    flex-direction: column;
    padding-bottom: 140px;
  }
  .settings-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .settings-main-content {
    padding: 1rem;
  }
  .setting-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .setting-header h2 {
    font-size: 1.5rem;
  }
  .theme-controls {
    align-self: flex-end;
    width: 100%;
    justify-content: flex-end;
  }
  .theme-toggle-group {
    width: 100%;
    max-width: 200px;
  }
  .theme-actions {
    flex-direction: column;
  }
}
.theme-dark .theme-preview__card--dark {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.theme-dark .theme-option.active {
  box-shadow: 0 2px 8px rgba(28, 191, 222, 0.3);
}

.theme-light .theme-preview__card--light {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.theme-light .theme-option.active {
  box-shadow: 0 2px 8px rgba(231, 0, 9, 0.2);
}

@keyframes themeTransition {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.theme-preview__card {
  animation: themeTransition 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-item,
  .theme-option,
  .theme-preview__card,
  .switch-settings {
    transition: none !important;
    animation: none !important;
  }
}
@media (prefers-contrast: high) {
  .theme-option {
    border: 2px solid var(--border-color);
  }
  .theme-option.active {
    border-color: var(--accent-primary);
  }
  .theme-preview__card {
    border-width: 2px;
  }
  .sidebar-item.selected {
    border-left-width: 6px;
  }
}
.theme-option:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.sidebar-item:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
}

.switch-game {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, sans-serif;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 120px;
}

.game-layout {
  display: flex;
  height: calc(100vh - 120px);
  overflow: hidden;
}

.game-sidebar {
  width: 400px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.game-info {
  padding: 2rem 1.5rem;
  flex: 1;
}
.game-info__title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 2rem 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.game-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-primary);
}

.game-container {
  position: relative;
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--bg-secondary);
  width: 100%;
  height: 80vh;
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--shadow-color);
  transition: all 0.3s ease;
}
.game-container:hover {
  box-shadow: 0 12px 32px var(--shadow-hover);
}

.game-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-secondary);
}
.game-loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.game-loading__text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.game-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-primary);
  max-width: 400px;
}
.game-error__icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.game-error__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-error);
  margin: 0 0 0.5rem 0;
}
.game-error__message, .game-error__details {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.25rem 0;
  line-height: 1.75;
}
.game-error__details {
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  background: var(--bg-tertiary);
  padding: 0.5rem;
  border-radius: 0.25rem;
  word-break: break-word;
}

.game-controls {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px var(--shadow-color);
  margin-bottom: 2rem;
}
.game-controls__title {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.game-controls__text {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.switch-game .nintendo-system-menu {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--system-menu-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
}

@media (max-width: 1200px) {
  .game-sidebar {
    width: 350px;
  }
  .game-info {
    padding: 1.5rem 1rem;
  }
  .game-info__title {
    font-size: 1.75rem;
  }
}
@media (max-width: 768px) {
  .game-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 120px);
  }
  .game-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .game-info {
    padding: 1rem;
  }
  .game-info__title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .game-main {
    padding: 1rem;
  }
  .game-container {
    height: 60vh;
    max-width: 100%;
  }
  .game-controls {
    margin-bottom: 1rem;
    padding: 1rem;
  }
  .switch-game {
    padding-bottom: 140px;
  }
}
@media (max-width: 480px) {
  .game-info {
    padding: 0.75rem;
  }
  .game-info__title {
    font-size: 1.25rem;
  }
  .game-main {
    padding: 0.75rem;
  }
  .game-container {
    height: 50vh;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.game-sidebar {
  animation: slideInFromLeft 0.6s ease-out;
}

.game-container {
  animation: slideInFromRight 0.8s ease-out;
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.theme-dark .game-container {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.theme-dark .game-container:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.theme-dark .game-controls {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-light .game-container {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.theme-light .game-container:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
.theme-light .game-controls {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .game-sidebar,
  .game-container,
  .game-loading__spinner {
    animation: none !important;
    transition: none !important;
  }
}
@media (prefers-contrast: high) {
  .game-container,
  .game-controls {
    border-width: 2px;
  }
  .game-error__title {
    font-weight: 700;
  }
}
.game-container:focus-within {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  --bg-primary: #2D2D2D;
  --bg-secondary: #404040;
  --text-primary: #FFFFFF;
  --text-secondary: #CCCCCC;
  --border-color: #555555;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.4);
  --overlay-color: rgba(0, 0, 0, 0.5);
  --accent-primary: #1CBFDE;
  --accent-secondary: #E70009;
  --system-menu-bg: rgba(45, 45, 45, 0.95);
  --glass-bg: rgba(45, 45, 45, 0.9);
  --bg-tertiary: #353535;
  --surface-primary: #404040;
  --surface-secondary: #353535;
  --surface-hover: #4A4A4A;
  --text-tertiary: #999999;
  --text-inverse: #000000;
  --border-light: #404040;
  --border-strong: #666666;
  --shadow-strong: rgba(0, 0, 0, 0.6);
  --overlay-light: rgba(0, 0, 0, 0.3);
  --overlay-strong: rgba(0, 0, 0, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --accent-success: #4CAF50;
  --accent-warning: #FF9800;
  --accent-error: #F44336;
  --accent-info: #2196F3;
  --gradient-primary: linear-gradient(135deg, #1CBFDE 0%, rgb(69.408, 205.676, 231.592) 100%);
  --gradient-secondary: linear-gradient(135deg, #E70009 0%, rgb(255, 27, 35.8831168831) 100%);
  --gradient-background: linear-gradient(135deg, #2D2D2D 0%, #232526 100%);
  --game-tile-bg: #404040;
  --game-tile-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --game-tile-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.4);
  --game-tile-overlay: rgba(255, 255, 255, 0.1);
}
body.theme-light {
  --bg-primary: #F0F0F0;
  --bg-secondary: #FFFFFF;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border-color: #E0E0E0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
  --overlay-color: rgba(0, 0, 0, 0.3);
  --accent-primary: #E70009;
  --accent-secondary: #1CBFDE;
  --system-menu-bg: rgba(255, 255, 255, 0.95);
  --glass-bg: rgba(240, 240, 240, 0.9);
  --bg-tertiary: #FAFAFA;
  --surface-primary: #FFFFFF;
  --surface-secondary: #F8F8F8;
  --surface-hover: #F0F0F0;
  --text-tertiary: #999999;
  --text-inverse: #FFFFFF;
  --border-light: #F0F0F0;
  --border-strong: #CCCCCC;
  --shadow-strong: rgba(0, 0, 0, 0.2);
  --overlay-light: rgba(0, 0, 0, 0.1);
  --overlay-strong: rgba(0, 0, 0, 0.5);
  --glass-border: rgba(0, 0, 0, 0.06);
  --accent-success: #4CAF50;
  --accent-warning: #FF9800;
  --accent-error: #F44336;
  --accent-info: #2196F3;
  --gradient-primary: linear-gradient(135deg, #E70009 0%, rgb(255, 27, 35.8831168831) 100%);
  --gradient-secondary: linear-gradient(135deg, #1CBFDE 0%, rgb(69.408, 205.676, 231.592) 100%);
  --gradient-background: linear-gradient(135deg, #F0F0F0 0%, #E8E8E8 100%);
  --game-tile-bg: #FFFFFF;
  --game-tile-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --game-tile-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.15);
  --game-tile-overlay: rgba(0, 0, 0, 0.1);
}
body.theme-dark {
  --bg-primary: #2D2D2D;
  --bg-secondary: #404040;
  --text-primary: #FFFFFF;
  --text-secondary: #CCCCCC;
  --border-color: #555555;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.4);
  --overlay-color: rgba(0, 0, 0, 0.5);
  --accent-primary: #1CBFDE;
  --accent-secondary: #E70009;
  --system-menu-bg: rgba(45, 45, 45, 0.95);
  --glass-bg: rgba(45, 45, 45, 0.9);
  --bg-tertiary: #353535;
  --surface-primary: #404040;
  --surface-secondary: #353535;
  --surface-hover: #4A4A4A;
  --text-tertiary: #999999;
  --text-inverse: #000000;
  --border-light: #404040;
  --border-strong: #666666;
  --shadow-strong: rgba(0, 0, 0, 0.6);
  --overlay-light: rgba(0, 0, 0, 0.3);
  --overlay-strong: rgba(0, 0, 0, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --accent-success: #4CAF50;
  --accent-warning: #FF9800;
  --accent-error: #F44336;
  --accent-info: #2196F3;
  --gradient-primary: linear-gradient(135deg, #1CBFDE 0%, rgb(69.408, 205.676, 231.592) 100%);
  --gradient-secondary: linear-gradient(135deg, #E70009 0%, rgb(255, 27, 35.8831168831) 100%);
  --gradient-background: linear-gradient(135deg, #2D2D2D 0%, #232526 100%);
  --game-tile-bg: #404040;
  --game-tile-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --game-tile-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.4);
  --game-tile-overlay: rgba(255, 255, 255, 0.1);
}

button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 0.25rem;
  opacity: 0.5;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
  opacity: 0.8;
}

.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;
}

.fade-in {
  animation: fade-in 0.3s ease-out 0s both;
}

.slide-up {
  animation: slide-up 0.3s ease-out 0s both;
}

.bounce-in {
  animation: bounce-in 0.6s ease-out 0s both;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}
@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

.btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.btn--primary {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--gradient-primary);
  color: white;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 2px 8px rgba(28, 191, 222, 0.3);
}
.btn--primary:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(28, 191, 222, 0.4);
}
.btn--primary:active {
  transform: translateY(0);
}
.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn--secondary {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: var(--surface-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}
.btn--secondary:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.btn--secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.btn--secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn--ghost {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid transparent;
}
.btn--ghost:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.btn--ghost:hover {
  background-color: var(--surface-secondary);
  border-color: var(--border-light);
}
.btn--ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn--small {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.btn--large {
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.loading {
  position: relative;
}
.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.error-message {
  color: #FF4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.error-message::before {
  content: "⚠️";
  font-size: 1rem;
}

.success-message {
  color: #4CAF50;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.success-message::before {
  content: "✅";
  font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-contrast: high) {
  .btn {
    border-width: 2px;
  }
  .game-tile {
    border: 2px solid var(--border-color);
  }
  .game-tile--selected {
    border-width: 4px;
  }
}
@media print {
  .switch-home,
  .system-menu,
  .top-bar {
    display: none !important;
  }
  .game-grid {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    padding: 0 !important;
  }
  .game-tile {
    break-inside: avoid;
    margin-bottom: 1rem;
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
}
.debug-grid {
  background-image: linear-gradient(rgba(255, 0, 0, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 0, 0, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.debug-outline * {
  outline: 1px solid red !important;
}