* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.glass-bar {
  background-color: rgba(var(--mud-palette-surface-rgb), 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- 1. СТИЛИ ЗАГРУЗКИ (Твои текущие) --- */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: -apple-system, sans-serif;
  z-index: 9999; /* Высокий приоритет, но ниже ошибки */
}

.splash-logo {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  animation: splash-pulse 2s infinite ease-in-out;
  overflow: hidden; /* Чтобы картинка не вылезала за круг */
}

.splash-progress-track {
  width: 200px;
  height: 4px;
  background-color: #b2e0f7;
  border-radius: 2px;
  overflow: hidden;
}

.splash-progress-fill {
  height: 100%;
  background-color: #2196f3;
  width: var(--blazor-load-percentage, 10%);
  transition: width 0.2s ease;
}

.splash-text {
  margin-top: 10px;
  font-size: 12px;
  color: #adb5bd;
}

.splash-text::after {
  content: var(--blazor-load-percentage-text, "Loading...");
}

@keyframes splash-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/* --- 2. СТИЛИ ОШИБКИ (Новый красивый дизайн) --- */
#blazor-error-ui {
  display: none; /* Скрыто по умолчанию */

  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000; /* ВАЖНО: Должно быть больше 9999, чтобы перекрыть загрузку */

  background-color: #323232; /* Темный фон (как Snackbar в Material Design) */
  color: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  align-items: center;
  gap: 12px;
  font-family: -apple-system, sans-serif;
  font-size: 14px;
  min-width: 300px;
  justify-content: space-between;
}

/* Когда Blazor активирует ошибку, он меняет display на flex */
#blazor-error-ui[style*="display: block"],
#blazor-error-ui[style*="display: flex"] {
  display: flex !important;
}

#blazor-error-ui .error-icon {
  font-size: 18px;
}

#blazor-error-ui .reload {
  color: #a29bfe; /* Светло-фиолетовый, чтобы сочеталось с брендом */
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  margin-left: auto; /* Прижимаем вправо */
  margin-right: 15px;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  font-size: 18px;
  opacity: 0.7;
}

#blazor-error-ui .dismiss:hover {
  opacity: 1;
}
