/* ===== Mobile Dashboard Gaming Styles ===== */
/* Optimized for Mobile Devices Only */

/* Mobile Main Wrapper */
.mobile-dashboard-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0f, #1a1a2e, #16213e);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dashboard-wrapper::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(168, 85, 247, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 70% 20%, rgba(0, 255, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(255, 0, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: mobile-bg-pulse 10s ease-in-out infinite;
}

@keyframes mobile-bg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Mobile Layout Container */
.mobile-dashboard-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  padding: 0.75rem;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dashboard-container.mobile-fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Header */
.mobile-dashboard-header {
  background: rgba(22, 33, 62, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 15px;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  animation: mobile-slide-down 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mobile-dashboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0.02) 0%,
    rgba(0, 255, 255, 0.01) 50%,
    rgba(168, 85, 247, 0.02) 100%
  );
  pointer-events: none;
}

.mobile-dashboard-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  gap: 0.75rem;
}

.mobile-dashboard-header-left {
  flex: 1;
  min-width: 0;
}

.mobile-dashboard-header-left h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 0.25rem 0;
  background: linear-gradient(45deg, var(--color-game-purple-300), var(--color-game-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: mobile-title-glow 5s ease-in-out infinite alternate;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.mobile-dashboard-header-left p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin: 0;
  opacity: 0.8;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

@keyframes mobile-title-glow {
  0% { filter: brightness(1); text-shadow: 0 0 15px rgba(168, 85, 247, 0.2); }
  100% { filter: brightness(1.2); text-shadow: 0 0 20px rgba(0, 255, 255, 0.3); }
}

.mobile-dashboard-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Mobile User Info */
.mobile-dashboard-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  max-width: 120px;
}

.mobile-dashboard-user::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.1), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dashboard-user:active::before {
  left: 100%;
}

.mobile-dashboard-user:active {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.25);
  transform: scale(0.95);
}

.mobile-dashboard-user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-game-purple-500), var(--color-game-neon-cyan));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
  animation: mobile-avatar-pulse 4s ease-in-out infinite;
}

@keyframes mobile-avatar-pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.5);
    transform: scale(1.05);
  }
}

.mobile-dashboard-user-info {
  flex: 1;
  min-width: 0;
}

.mobile-dashboard-user-info h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 0.125rem 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.mobile-dashboard-user-info p {
  font-size: 0.625rem;
  color: var(--color-text-secondary);
  margin: 0;
  opacity: 0.8;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:active {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
  transform: scale(0.95);
}

.mobile-menu-hamburger {
  position: relative;
  width: 18px;
  height: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: linear-gradient(45deg, var(--color-game-purple-300), var(--color-game-neon-cyan));
  border-radius: 1px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: all 0.25s ease-in-out;
}

.mobile-menu-hamburger span:nth-child(1) {
  top: 0px;
}

.mobile-menu-hamburger span:nth-child(2) {
  top: 5px;
}

.mobile-menu-hamburger span:nth-child(3) {
  top: 10px;
}

.mobile-menu-open .mobile-menu-hamburger span:nth-child(1) {
  top: 5px;
  transform: rotate(135deg);
}

.mobile-menu-open .mobile-menu-hamburger span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.mobile-menu-open .mobile-menu-hamburger span:nth-child(3) {
  top: 5px;
  transform: rotate(-135deg);
}

/* Mobile Menu Overlay */
.mobile-dashboard-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 98;
  /* Removed backdrop-filter to prevent blur issues */
}

.mobile-overlay-enter {
  opacity: 0;
}

.mobile-overlay-enter-end {
  opacity: 1;
  transition: opacity 300ms ease-out;
}

.mobile-overlay-leave-end {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

/* Mobile Navigation Menu */
.mobile-dashboard-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: rgba(22, 33, 62, 0.99);
  /* Light backdrop-filter for better readability */
  backdrop-filter: blur(3px);
  border-left: 2px solid rgba(168, 85, 247, 0.4);
  z-index: 99;
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 60px rgba(0, 0, 0, 0.7);
}

.mobile-menu-enter {
  opacity: 0;
  transform: translateX(100%);
}

.mobile-menu-enter-end {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 250ms ease-out, transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-leave-end {
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 150ms ease-in, transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dashboard-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  background: rgba(168, 85, 247, 0.05);
}

.mobile-dashboard-menu-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  background: linear-gradient(45deg, var(--color-game-purple-300), var(--color-game-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-menu-close {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--color-game-purple-300);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close:active {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
  transform: scale(0.95);
}

.mobile-dashboard-menu-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

/* Mobile Menu Sections */
.mobile-menu-section {
  margin-bottom: 1.5rem;
}

.mobile-menu-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-game-purple-300);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem 0;
  padding: 0 1rem;
  opacity: 0.8;
}

.mobile-menu-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-left: 3px solid transparent;
}

.mobile-menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(168, 85, 247, 0.05);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-item:active::before {
  transform: translateX(0);
}

.mobile-menu-item:active {
  background: rgba(168, 85, 247, 0.1);
  border-left-color: var(--color-game-purple-400);
}

.mobile-menu-item.active {
  background: rgba(168, 85, 247, 0.15);
  border-left-color: var(--color-game-neon-cyan);
  box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.1);
}

.mobile-menu-item-icon {
  width: 36px;
  height: 36px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-game-purple-300);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.mobile-menu-item.active .mobile-menu-item-icon {
  background: linear-gradient(135deg, var(--color-game-purple-500), var(--color-game-neon-cyan));
  color: white;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
  animation: mobile-icon-glow 3s ease-in-out infinite;
}

@keyframes mobile-icon-glow {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(168, 85, 247, 0.4); }
}

.mobile-menu-item:active .mobile-menu-item-icon {
  background: rgba(168, 85, 247, 0.2);
  color: var(--color-game-neon-cyan);
  transform: scale(0.95);
}

.mobile-menu-item-content {
  flex: 1;
  min-width: 0;
}

.mobile-menu-item-content h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 0.125rem 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.mobile-menu-item.active .mobile-menu-item-content h5 {
  background: linear-gradient(45deg, var(--color-game-purple-300), var(--color-game-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-menu-item-content p {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin: 0;
  opacity: 0.7;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.mobile-menu-item-arrow {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  opacity: 0.5;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.mobile-menu-item.active .mobile-menu-item-arrow {
  color: var(--color-game-neon-cyan);
  opacity: 1;
  transform: translateX(5px);
}

.mobile-menu-item:active .mobile-menu-item-arrow {
  transform: translateX(3px);
  opacity: 0.8;
}

/* Mobile Content Area */
.mobile-dashboard-content {
  flex: 1;
  background: rgba(22, 33, 62, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 15px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: mobile-content-appear 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

@keyframes mobile-content-appear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mobile-dashboard-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.01) 0%,
    rgba(0, 255, 255, 0.005) 50%,
    rgba(168, 85, 247, 0.01) 100%
  );
  pointer-events: none;
}

.mobile-dashboard-content-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 300px;
}

/* Mobile Loading States */
.mobile-dashboard-content-loading {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-loading-container {
  text-align: center;
  animation: mobile-loading-appear 0.5s ease-out;
}

@keyframes mobile-loading-appear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.mobile-loading-icon {
  margin-bottom: 1rem;
  font-size: 2.5rem;
  color: var(--color-game-purple-400);
}

.mobile-bounce {
  animation: mobile-bounce 1.5s ease-in-out infinite;
}

@keyframes mobile-bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-10px) scale(1.1);
  }
  50% {
    transform: translateY(-20px) scale(1);
  }
  75% {
    transform: translateY(-10px) scale(1.1);
  }
}

.mobile-loading-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--color-game-purple-300), var(--color-game-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-loading-description {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.mobile-loading-dots {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.mobile-loading-dots span {
  width: 6px;
  height: 6px;
  background: var(--color-game-purple-400);
  border-radius: 50%;
  animation: mobile-loading-dots 1.4s ease-in-out infinite both;
}

.mobile-loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.mobile-loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.mobile-loading-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes mobile-loading-dots {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile Error Container */
.mobile-dashboard-error {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

.mobile-dashboard-error-icon {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: var(--color-game-purple-400);
  animation: mobile-error-float 3s ease-in-out infinite;
}

@keyframes mobile-error-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-1deg); }
  75% { transform: translateY(-3px) rotate(1deg); }
}

.mobile-dashboard-error-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
  background: linear-gradient(45deg, var(--color-game-purple-300), var(--color-game-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-dashboard-error-description {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin: 0;
  opacity: 0.8;
  line-height: 1.5;
}

/* Mobile Header Animation */
.mobile-header-fade {
  opacity: 0.6;
  transform: translateY(-5px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Animation Classes */
.mobile-fade-in {
  animation: mobile-fade-in 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-slide-down {
  animation: mobile-slide-down 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes mobile-fade-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Alpine.js Transitions */
[x-cloak] {
  display: none !important;
}

/* Mobile Responsive Fine-tuning */
@media (max-width: 480px) {
  .mobile-dashboard-container {
    padding: 0.5rem;
    gap: 0.75rem;
  }

  .mobile-dashboard-header {
    padding: 0.75rem;
  }

  .mobile-dashboard-header-left h1 {
    font-size: 1.25rem;
  }

  .mobile-dashboard-header-left p {
    font-size: 0.75rem;
  }

  .mobile-dashboard-user {
    max-width: 100px;
  }

  .mobile-dashboard-user-info h3 {
    font-size: 0.6875rem;
  }

  .mobile-dashboard-user-info p {
    font-size: 0.5625rem;
  }

  .mobile-dashboard-menu {
    width: 260px;
  }

  .mobile-dashboard-content {
    padding: 1rem;
  }
}

@media (max-width: 360px) {
  .mobile-dashboard-menu {
    width: calc(100vw - 40px);
  }

  .mobile-dashboard-user {
    max-width: 90px;
    padding: 0.375rem;
  }

  .mobile-dashboard-user-avatar {
    width: 28px;
    height: 28px;
  }

  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
  }

  .mobile-menu-hamburger {
    width: 16px;
    height: 10px;
  }
}

/* Prevent body scroll when menu is open */
.mobile-menu-open {
  overflow: hidden;
}

.mobile-menu-open .mobile-dashboard-container {
  /* Removed blur filter - only keep subtle scale effect */
  transform: scale(0.98);
  opacity: 0.8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
