/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Reset и нормализация */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: #002040;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  overscroll-behavior-y: contain;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  line-height: 1.5;
  background-color: #002040;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* Защита от перегруженных flex-элементов */
div,
section,
article,
aside,
nav,
main,
header,
footer {
  min-height: 0;
  min-width: 0;
}

/* Предотвращение проблем с абсолютным позиционированием */
.app-container {
  position: relative;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
}

.app-content {
  position: relative;
  width: 100%;
}

/* Фиксы для мобильных устройств */
@media (max-width: 480px) {
  input,
  select,
  textarea {
    font-size: 16px; /* Предотвращает зум на iOS */
  }

  html,
  body {
    /* Предотвращает проблемы с дребезжанием при прокрутке на iOS */
    -webkit-overflow-scrolling: touch;
  }

  /* Исправление проблемы с fixed элементами на iOS */
  .ios-fixed {
    position: fixed;
    width: 100%;
    transform: translateZ(0);
  }
}
