/*body {
  display: none;
}*/

:root {
    --primary: #FFAE00;
    --accent: #FFAE00;
    --headline: #f5f5f5;
    --body: #1F1F1F;
    --file: #1F1F1F;
}
body {
    overflow: hidden !important;
    background-color: var(--body);
    font-family: 'Ndsbios', 'Roboto';
}
html, body {
    overflow: hidden; /* Убирает скролл во всем документе */
    height: 100dvh; /* Исправляет проблему с высотой в Safari */
    margin: 0;
    padding: 0;
}
a {
    color: var(--accent);
    cursor: pointer !important;
}
.bios {
    background-color: #000;
    color: #888888;
    overflow: hidden;
    height: 100%;
    width: 100%;
    padding: 16px 64px;
    font-size: 32px;
    line-height: 120%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    inset: 0;
    z-index: 999999999;
}
.bios--hide {
    display: none;
}
.bios__box-link {
    color: var(--accent);
}
.bios__head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.bios__logo {
    height: auto;
    width: 150px;
    object-fit: contain;
}
.bios__logo--big {
    width: 300px;
}
.bios__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}
.bios__content .bios__box {
    margin-bottom: 22px;
}
.bios__box {
    margin-bottom: 5px;
}
.bios__box span {
    color: #fff;
}
.bios__memory {
    display: flex;
    align-items: center;
    visibility: hidden;
    margin-bottom: 15px;
}
.bios__line--1, .bios__line--2 {
    visibility: hidden;
}
.main {
    display: flex;
    width: 100vw;
    height: 100dvh;
    background-color: var(--body);
    overflow: hidden;
    position: relative;
    flex-direction: column;
}
.main--index {
    display: none;
}
.main--active {
    display: flex;
}
.main__window {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    height: calc(100dvh - 45px);
    bottom: 45px;
    padding: 64px 32px;
}
.bottom {
    padding: 10px;
    background: var(--headline);
    height: 45px;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    /*    box-shadow: inset -2px -2px 0 #FFFFFF, inset 2px 2px 0 #404040, inset 4px 4px 0 #808080;
    border-top: 2px solid #C0C0C0;
*/
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 58px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    z-index: 9999;
}
.bottom__start-button {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer !important;
    padding: 4px 8px;
    background-color: transparent;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
}
.bottom__logo {
    max-height: 35px;
}
.bottom__start-button:hover {
    transform: scale(1.1);
}
.bottom__start-button:active {
    transform: scale(0.95);
}
.bottom__start-icon {
    width: 26px;
    height: 26px;
}
.bottom__time-text {
    padding: 8px 12px;
    background-color: transparent;
    border-radius: 8px;
    font-size: 18px;
    color: #333;
    font-weight: bold;
    border: none;
}
.menu {
       display: grid;
    grid-template-columns: repeat(auto-fill, 128px);
    /* grid-auto-rows: minmax(151px, auto); */
    grid-auto-flow: column;
    gap: 16px;
    width: 100%;
    height: 100%;
    align-content: flex-start;
    grid-template-rows: repeat(auto-fill, 110px);
}

.menu__item {
    text-align: center;
    cursor: pointer;
    padding: 4px;
    width: 128px; 
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 120%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.menu__item-text {
    margin-top: -4px;
    padding: 0 4px;
    border-radius: 4px;
    background-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}
.menu__icon {
    width: 90px;
    height: 90px;
    cursor: pointer;
    transition: filter 0.2s ease;
}
.menu__item:hover {
    transform: scale(1.05);
}
.menu__item:active {
    transform: scale(0.95);
}
.menu__item:hover .menu__icon {
    filter: drop-shadow(0 0 8px rgba(255, 174, 0, 0.6));
}
.menu__item:hover .menu__item-text {
    background-color: var(--accent);
    color: #fff;
}
.modal {
    position: absolute;
    max-height: 80%;
    max-width: 80%;
    min-width: 500px;
    /*     height: 100%; 
    overflow: auto;*/
    /*    top: 50%;*/
    /*    left: 50%;
    transform: translate(-50%, -50%);*/
  
    width: 600px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    z-index: 1000;
}

.main--single .modal {
  min-width: 70%;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    cursor: move;
}
.modal__title {
    font-size: 24px;
}

.modal__close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}
.modal__close-btn:hover {
    color: #FFAE00;
}

.modal__content {
    padding: 16px;
    min-height: 300px;
    overflow-y: auto;
    max-height: calc(80dvh - 60px);
}

.modal__expand-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}
.modal__expand-btn:hover {
    color: #FFAE00;
}
.menu--category {
    flex-direction: row;
}
.menu--category .menu__item {
    width: 90px;
}
.menu--category .menu__icon {
    width: 50px;
    height: 50px;
}

.p404__window {
      display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.p404__title {
    margin-top: 0;
    color: #FFF;
    margin-bottom: 0;
}

.p404__btn {
  color: var(--accent) !important;
  cursor: pointer;
}

.p404__btn:hover {
  opacity: 0.8;
}

@media (max-width: 1000px) {
  .bios__logo--big {
    display: none;
  }

  html {
    margin-top: 0 !important;
  }

  .main__window {
    overflow: hidden;
  }
}

@media (max-width: 600px) {
  .bios {
    padding: 32px 16px;
    font-size: 24px;
  }

  .bios__logo {
    width: 100px;
  }

  .main__window {
    padding: 32px 16px;
  }

  .menu {
    gap: 8px;
        grid-template-columns: repeat(auto-fill, 110px);
    grid-template-rows: repeat(auto-fill, 90px);
  }

  .menu__item {
    position: initial !important;
         width: 90px;
    font-size: 16px;
    padding: 2px;
  }

  .menu__icon {
    width: 56px;
    height: 56px;
  }

  .bottom {
    padding: 0 16px;
  }

  .bottom__start-button {
    padding: 0;
  }

  .bottom__logo {
    max-height: 20px;
}

.bottom__time-text {
      padding: 0;
    font-size: 16px;
}

.modal {
 width: 98vw;
height: calc(90dvh - 60px);
min-width: 0;
max-width: 100vw;
max-height: 95dvh;
/* top: 0 !important; */
border-radius: 4px;
}

.modal__content {
    padding: 8px;
    max-height: calc(100% - 60px);
}

.modal__header {
  padding: 8px;
}

.modal__btns {
  width: fit-content;
display: flex;
align-items: center;
}
}