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

html,
body,
#root {
  width: 100%;
  height: 100%;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

/* Pre-mount fallback only (dark is the default mode); once React mounts, the body
   background comes from the active MUI theme. */
html {
  background-color: #0a0e27;
}

body {
  /* background + text colour are set from the active MUI theme in A11yStyleInjector
     (light / dark / high-contrast) — don't hard-code them here */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;

  &:hover {
    background: rgba(255, 255, 255, 0.2);
  }
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: rgba(37, 99, 235, 0.5);
  color: #ffffff;
}

/* Video elements */
video {
  display: block;
}

/* Input styling */
input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Remove default button styling */
button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Animation utilities */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* RTL support */
[dir='rtl'] {
  direction: rtl;
  text-align: right;
}

[dir='rtl'] input,
[dir='rtl'] textarea {
  text-align: right;
}
