html,
body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  height: 100%;
}
body {
  min-height: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
}

:root {
  --c-font-main: rgb(243, 183, 183);
  --c-font-transparent: rgba(243, 183, 183, 0.623);
  --c-border-main: solid 1px rgb(197, 64, 64);
  --c-border-dark: solid 1px rgb(39, 3, 3);
  --c-bg-main: rgba(32, 4, 4, 0.842);
  --c-window-header-bg: rgba(36, 2, 2, 0.842);
  --c-btn-bg: rgb(32, 3, 3);
}

div#rootFlex {
  height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

div.window {
  /* height: 45rem; */
  height: clamp(65%, 47rem, 98%);
  /* width: 70rem; */
  width: clamp(65%, 75rem, 98%);
  border: var(--c-border-dark);
  display: flex;
  flex-direction: column;
  /* background: linear-gradient(to bottom, rgba(255, 208, 208, 0.719), rgba(255, 208, 208, 0.849)); */
  background: var(--c-bg-main);
  position: relative;
}
div.window * {
  color: var(--c-font-main);
}

div.window input {
  border: none;
  border: var(--c-border-main);
  border-radius: 3px;
  background: var(--c-btn-bg);
}

div.window input::placeholder {
  color: var(--c-font-transparent);
}

div.window select, div.window option {
  border: none;
  border: var(--c-border-main);
  background: var(--c-btn-bg);
}

div.window button {
  border: none;
  border: var(--c-border-main);
  background: var(--c-btn-bg);
  cursor: pointer;
}

div.window button:hover {
  filter: brightness(1.2);
}
div.window button:active {
  filter: brightness(1);
}

div.bg-img {
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: url(../static/test_result.webp) center / cover no-repeat;
  z-index: -1;
}

div.fg-right {
  height: 720px;
  width: 480px;
  position: fixed;
  top: 0;
  right: 0;
  background: url(../static/fore2.webp) no-repeat;
}

header {
  background: var(--c-window-header-bg);
  font-weight: bold;
  border-bottom: solid 1px black;
  color: var(--c-font-main);
}

div.gridlol {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr;
  padding: 0.5rem;
  gap: 0.5rem;
  overflow: hidden;
}

main {
  display: flex;
  overflow: hidden;
}

div#viewPort {
  background-color: rgba(0, 0, 0, 0.384);
  height: 100%;
  width: 100%;
  padding: .3rem;
  overflow-y: scroll;
  scrollbar-color: rgba(122, 18, 18, 0.329) rgba(0, 0, 255, 0);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

img, video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

aside {
  /* background-color: antiquewhite; */
  /* border: 1px solid rgba(0, 0, 0, 0.37); */
  display: flex;
  flex-direction: column;
  padding: .3rem;
  overflow: hidden;
}
aside h2 {
  text-align: center;
  margin: 0;
  margin-bottom: 1rem;
}

.imgContainer  {
  border: var(--c-border-main);
  background-color: black;
  flex-grow: 1;
  /* height: 15rem; */
  height: fit-content;
  width: 15rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: 100ms;
}

.imgContainer:has(img:focus) {
  box-shadow: 0 0 20px rgb(255, 0, 0);
  transform: translateY(-10px);
}

.imgContainer:has(video) {
  border: solid 1px rgb(17, 0, 255);
}

.media {
  transition: 100ms;
}

.media[data-censored=true] {
  filter: blur(25px);
  opacity: .2;
}

.media[data-censored=true]:hover, .media[data-censored=true]:focus {
  filter: blur(0);
  opacity: 1;
  /* transition: 100ms; */
}

.imgContainerRandom {
  background-color: black;
  border: var(--c-border-main);
  flex-grow: 1;
  /* height: 15rem; */
  height: fit-content;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.imgContainerRandom:has(img:focus) {
  box-shadow: 0 0 20px rgb(255, 238, 0);
}

div#tagResult {
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

div.tagResultWrapper {
  background: var(--c-btn-bg);
  border: var(--c-border-main);
  height: 100%;
  width: 100%;
  display: flex;
  overflow: scroll;
  scrollbar-width: none;
  margin-top: .3rem;
}

p.tagItem {
  margin: 0;
  font-family: 'consolas';
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}

p.tagItem i {
  margin-left: 24px;
}

p.tagItem:nth-child(even) {
  background-color: rgba(143, 0, 0, 0.205);
}

div.quadGrid {
  display: grid;
  margin: .3rem 0;
  gap: .3rem;
  grid-template-columns: 2fr 2fr;
  border: dashed 1px rgb(230, 106, 106);
  padding: .3rem;
}

div.pageArea {
  width: 100%;
  display: flex;
  gap: .3rem;
  margin: .3rem 0;
}
div.pageArea button {
  width: 100%;
}

a {
  content: '';
  background-color: red;
  margin: 0;
}

div.tagScanner {
  height: clamp(65%, 47rem, 98%);
  width: clamp(20%, 25rem, 98%);
  /* width: 25rem; */
  background: var(--c-bg-main);
  border: var(--c-border-dark);
  margin-right: .3rem;
  display: flex;
  flex-direction: column;
  color: var(--c-font-main);
  overflow: hidden;
}

div.tagsArea {
  /* background-color: red; */
  height: 100%;
  width: 100%;
  padding: .5rem;
  display: flex;
  overflow: hidden;
}

div.scrolltagWrap {
  background: var(--c-btn-bg);
  border: var(--c-border-main);
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
  overflow: scroll;
  scrollbar-width: none;
}

div#tagsContainer {
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
div#tagsContainer p {
  min-width: fit-content;
  margin: 0;
  padding-left: 8px;
  font-family: 'Consolas';
}
div#tagsContainer p:nth-child(even) {
  background-color: rgba(255, 0, 0, 0.178);
}

div#tagsContainer p[data-tname="yuri"] {
  animation: rainbow 3s infinite;
  color: white;
}

@keyframes rainbow {
  0% {
    background-color: rgba(255, 0, 0, 0.5);
  }
  25% {
    background-color: rgb(21, 255, 0, 0.5);
  }
  50% {
    background-color: rgba(0, 255, 200, 0.5);
  }
  75% {
    background-color: rgba(55, 0, 255, 0.5);
  }
  100% {
    background-color: rgba(255, 0, 0, 0.5);
  }
}

div#tagsContainer div.tagHead {
  background-color: rgb(107, 38, 38);
  text-align: center;
}

div.not-allowed {
  display: none;
  height: 100dvh;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

@media (orientation: portrait) {
  div#rootFlex {
    display: none;
  }
  div.not-allowed {
    display: flex;
  }
}