:root {
  --background-color-lightskyblue: lightskyblue;
  --background-color-royalblue: royalblue;
  --background-color-aqua: aqua;
  --background-color-aquamarine: aquamarine;
  --background-color-blue: blue;
  --background-color-mediumblue: rgb(5, 101, 196);
  --background-color-darkblue: darkblue;
  --accent-color-red: red;
  --accent-color-white: #ffffff;
}

body,
html {
  overflow: hidden;
}

body {
  background: linear-gradient(
    to top right,
    var(--background-color-lightskyblue),
    var(--background-color-royalblue),
    var(--background-color-aqua),
    var(--background-color-lightskyblue)
  );
}

a {
  color: lightskyblue;
  text-decoration: none;
}

.page {
  max-width: 1440px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: 0.5em;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.playing-area-wrapper {
  position: relative;
  width: clamp(90dvw, 100%, 853px);
  height: 90vh;
  height: 90dvh;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

h1 {
  font-family: 'Cartoon Shout';
  font-size: 3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--background-color-darkblue);
}

header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.h1-playing-area {
  font-family: 'Cartoon Shout';
  font-size: 0.9rem;
  font-size: clamp(0.9rem, 2.5vw, 1.5rem);
  letter-spacing: normal;
  text-align: center;
}

.h1-playing-area-story {
  font-family: 'Cartoon Shout';
  font-size: clamp(0.9rem, 2.5vw, 1.5rem);
}

.textarea-wrapper {
  height: calc(100% - 70px);
  margin: 0 auto;
  padding: 0.5em 1em;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mermaid-selection-wrapper,
.game-result-wrapper {
  height: calc(100% - 70px);
  margin: 0 auto;
  padding: 0.5em 1em;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.mermaid {
  width: 25%;
  position: relative;
}

.mermaid-name {
  width: 100%;
  height: 80px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  background-image: url('../img/game_ui/PNG/basic_window/wooden_panel.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cartoon Shout';
  font-size: 1.1rem;
  cursor: pointer;
}

.textarea {
  width: 400px;
  height: 95%;
  margin: 0 auto;
  padding: 0.5em 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url('../img/game_ui/PNG/registration/window_4.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.text {
  width: 100%;
  height: 100%;
  padding: 0 0 0.5em;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

.story-text {
  width: 75%;
  margin: 1em 0 0;
  font-size: 0.9rem;
}

.illustration-right {
  width: 80px;
  float: right;
  margin-left: 0.5em;
}

.illustration-left {
  width: 80px;
  float: left;
  margin-right: 0.5em;
}

.clownfish-couple {
  width: 120px;
}

.key,
.starfish,
.pearl,
.water-bomb {
  width: 40px;
}

.keyboard-keys {
  width: 120px;
}

.mermaid-image {
  width: 60px;
}

.invisible {
  opacity: 0;
}

.first-paragraph::first-letter {
  font-family: 'Cartoon Shout';
  color: darkblue;
  font-size: 64px;
}

.back-button {
  height: 50px;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.button-right {
  opacity: 0;
}

.back-button img {
  height: 100%;
}

h2,
h3,
p,
span {
  font-family: 'Roboto', sans-serif;
}

h2 {
  margin: 0.5em 0 1em;
  font-size: 1.3rem;
  font-weight: 700;
}

h3 {
  margin: 0.5em 0 0.7em;
  font-size: 1.2rem;
  font-weight: 600;
}

.headline {
  display: none;
}

.headline p {
  position: absolute;
  top: 8px;
  right: 12px;
  rotate: -6deg;
  font-family: 'Salsa';
  font-size: 1.3rem;
  color: var(--accent-color-red);
}

.start-screen-outer-wrapper {
  height: 100%;
  width: 100%;
}

.start-screen-inner-wrapper {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr repeat(3, 1fr);
  grid-template-areas:
    'aside title title title'
    'aside main_area main_area main_area'
    'aside main_area main_area main_area'
    'aside main_area main_area main_area';
  grid-auto-rows: 1fr;
  background-image: url('../img/game_ui/PNG/basic_window/start_screen_bg.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.screen-inner-wrapper {
  height: 100%;
  position: relative;
  background-image: url('../img/game_ui/PNG/menu/screen_bg.png');
  background-size: cover;
  font-size: 1.2rem;
  color: var(--accent-color-white);
}

.start-screen-header {
  grid-area: title;
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-screen-aside {
  grid-area: aside;
  background-image: url('../img/game_ui/PNG/basic_window/chain_1.png');
  background-size: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

.wooden-panel {
  width: 100%;
  height: 50px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../img/game_ui/PNG/basic_window/wooden_panel.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.wooden-panel img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story,
.game-rules,
.imprint-button,
.copyright {
  width: 100%;
  height: 100%;
  padding: 0 0 0.3em;
  background-color: transparent;
  border: none;
  font-family: 'Cartoon Shout';
  font-size: 0.8rem;
  color: var(--accent-color-white);
  cursor: pointer;
}

.story:hover,
.game-rules:hover,
.imprint-button:hover {
  text-decoration: underline;
}

.copyright {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  text-align: center;
  line-height: 1.5;
  cursor: auto;
}

.main-area {
  grid-area: main_area;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mermaid-image1 {
  height: 200px;
  position: absolute;
  top: 10%;
  left: 0;
}

.mermaid-image2 {
  height: 200px;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.mermaid-image3 {
  height: 200px;
  position: absolute;
  top: 10%;
  left: 80%;
}

.stone-slab {
  width: 80%;
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.start-panel {
  top: 12px;
  width: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-6deg);
}

.wooden-start-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.caption-start-game {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.start-game-text {
  font-family: 'Cartoon Shout';
  font-size: 0.8rem;
  color: var(--accent-color-white);
}

.start-game-button {
  width: 48px;
  padding: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.sound-button-wrapper {
  width: 180px;
  padding: 0.5em;
  position: absolute;
  bottom: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-areas:
    'button1 button2'
    'caption caption';
  gap: 8px;
  justify-items: center;
}

.music,
.noise {
  height: 48px;
  cursor: pointer;
}

.music {
  grid-area: button1;
}

.noise {
  grid-area: button2;
}

.music-text,
.noise-text {
  font-family: 'Cartoon Shout';
  font-size: 0.5rem;
  color: darkblue;
}

canvas {
  width: 100%;
  height: 100%;
  margin: auto;
  display: block;
  background-color: var(--background-color-darkblue);
}

.message {
  display: none;
}

.legal-information {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: var(--accent-color-white);
  background-color: royalblue;
}

.content-wrapper {
  height: 100%;
  padding: 2em 2em;
  overflow-y: auto;
  background-image: url('../img/game_ui/PNG/settings/window_4.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: left center;
}

.jellyfish_01,
.jellyfish_02,
.crab_01,
.crab_02,
.clownfish,
.lionfish {
  position: absolute;
}

.jellyfish_01 {
  height: 96px;
  top: 10%;
  left: 0;
}

.crab_01 {
  height: 48px;
  top: 10%;
  left: 0;
}

.crab_02 {
  height: 64px;
  bottom: 20%;
  left: 30px;
}

.jellyfish_02 {
  height: 64px;
  bottom: 20%;
  left: 20%;
}

.clownfish {
  height: 40%;
  right: -30px;
}

.lionfish {
  height: 60%;
  right: -60px;
}

.game-result {
  height: 100%;
  position: relative;
}

.game-result img {
  max-height: 100%;
}

.star-results {
  height: 128px;
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  height: 15%;
}

.game-result-sign {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  transform: translateY(-50%) rotate(-4deg);
  height: 20%;
}

.replay-button {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 20%;
}

.text::-webkit-scrollbar {
  width: 12px;
}

.text::-webkit-scrollbar-track {
  background: #fcfcfc;
}

.text::-webkit-scrollbar-thumb {
  background-color: grey;
  border: white 1.5px solid;
  border-radius: 8px;
}

.start-button {
  position: absolute;
  top: 0;
  left: 0;
}

.audio-wrapper {
  position: absolute;
  top: 4px;
  right: 4px;
}

.audio-wrapper img {
  width: 32px;
  height: 32px;
}

.mobile-button-wrapper {
  width: 100%;
  height: 128px;
  padding: 0 1em 0 0;
  position: absolute;
  bottom: 8px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arrow-buttons {
  width: 50%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    'left up right'
    'left down right';
}

.left,
.up,
.down,
.right {
  height: 48px;
  aspect-ratio: 1 / 1;
  border: black 2px solid;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left {
  grid-area: left;
  align-self: center;
  justify-self: center;
  transform: rotate(-180deg);
}

.up {
  grid-area: up;
  align-self: center;
  justify-self: center;
  transform: rotate(-90deg);
}

.down {
  grid-area: down;
  align-self: center;
  justify-self: center;
  transform: rotate(90deg);
}

.right {
  grid-area: right;
  align-self: center;
  justify-self: center;
}

.space-button {
  height: 100%;
  display: flex;
  align-items: center;
}

.space-button img {
  height: 48px;
  border-radius: 50%;
  border: black 2px solid;
}

.bold {
  font-weight: 700;
}

.d-none {
  display: none;
}
