/* Enhanced MenuControl UiFlex Styling */
.GameLayoutMenu .MenuControl {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: calc(var(--space) * 1.2);
  border-radius: 20px 20px 0 0;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.GameLayoutMenu .MenuControl::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.6) 50%, 
    transparent 100%);
  z-index: 1;
}

.GameLayoutMenu .MenuControl::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 50%, 
    rgba(255, 255, 255, 0.1) 100%);
  pointer-events: none;
  z-index: 0;
}

.GameLayoutMenu .MenuControl:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Enhanced UiButton styling within MenuControl */
.GameLayoutMenu .MenuControl .UiButton {
  margin-right: 8px;
  margin-left: 4px;
  border-radius: 12px;
  background: linear-gradient(135deg, 
    rgba(var(--ui-button-color), 0.9) 0%, 
    rgba(var(--ui-button-color), 0.7) 100%);
  box-shadow: 
    0 4px 12px rgba(var(--ui-button-color), 0.3),
    0 2px 6px rgba(var(--ui-button-color), 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.GameLayoutMenu .MenuControl .UiButton::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    transparent 100%);
  transition: left 0.5s ease;
}

.GameLayoutMenu .MenuControl .UiButton:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 6px 20px rgba(var(--ui-button-color), 0.4),
    0 3px 10px rgba(var(--ui-button-color), 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.GameLayoutMenu .MenuControl .UiButton:hover::before {
  left: 100%;
}

.GameLayoutMenu .MenuControl .UiButton:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 
    0 2px 8px rgba(var(--ui-button-color), 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Enhanced UiFlex styling */
.GameLayoutMenu .MenuControl.UiFlex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Responsive design */
@media (max-width: 768px) {
  .GameLayoutMenu .MenuControl {
    padding: calc(var(--space) * 0.8);
    border-radius: 16px 16px 0 0;
  }
  
  .GameLayoutMenu .MenuControl .UiButton {
    margin-right: 6px;
    margin-left: 2px;
    border-radius: 10px;
  }
}

/* Dark mode support */
body[dark=true] .GameLayoutMenu .MenuControl {
  background: linear-gradient(135deg, rgba(49, 50, 62, 0.95) 0%, rgba(49, 50, 62, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body[dark=true] .GameLayoutMenu .MenuControl::before {
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    transparent 100%);
}

body[dark=true] .GameLayoutMenu .MenuControl::after {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.05) 0%, 
    rgba(255, 255, 255, 0.02) 50%, 
    rgba(255, 255, 255, 0.05) 100%);
}

/* Animation for menu items */
@keyframes menuItemFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.GameLayoutMenu .MenuControl .UiButton {
  animation: menuItemFadeIn 0.4s ease forwards;
}

.GameLayoutMenu .MenuControl .UiButton:nth-child(1) { animation-delay: 0.1s; }
.GameLayoutMenu .MenuControl .UiButton:nth-child(2) { animation-delay: 0.2s; }
.GameLayoutMenu .MenuControl .UiButton:nth-child(3) { animation-delay: 0.3s; }
.GameLayoutMenu .MenuControl .UiButton:nth-child(4) { animation-delay: 0.4s; }
.GameLayoutMenu .MenuControl .UiButton:nth-child(5) { animation-delay: 0.5s; }
.GameLayoutMenu .MenuControl .UiButton:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced focus states for accessibility */
.GameLayoutMenu .MenuControl .UiButton:focus {
  outline: 2px solid rgba(var(--ui-button-color), 0.5);
  outline-offset: 2px;
}

/* Loading state */
.GameLayoutMenu .MenuControl.loading {
  opacity: 0.7;
  pointer-events: none;
}

.GameLayoutMenu .MenuControl.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(var(--ui-primary), 0.3);
  border-top: 2px solid rgba(var(--ui-primary), 1);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} 