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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  font-family: "Roboto", sans-serif;
  background-color: #000;
  margin: 0 auto;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

p {
  margin: 0;
}

a {
  text-decoration: none;
}

.wrapper {
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background-color: black;
  background-size: cover;
  overflow: hidden;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2em;
  margin-bottom: 20px;
  max-height: 80px;
}

h1 {
  margin: auto;
  font-family: "PT Sans", sans-serif;
  color: azure;
  text-align: center;
  max-width: 500px;
  height: 50px;
}

h5 {
  margin: auto;
  font-family: "PT Sans", sans-serif;
  color: azure;
  text-align: center;
  max-width: 500px;
  height: 30px;
}

.container {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  max-width: 1400px;
  width: 100%;
  height: auto;
}

.container__center {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex-grow: 1;
}

.textarea {
  background-color: black;
  margin: 20px;
  box-shadow: 0 0 5px 4px #4caf50;
  width: 90%;
  min-height: 200px;
  font-size: 18px;
  font-family: "PT Sans", sans-serif;
  resize: none;
  border-radius: 15px;
  padding: 10px;
  color: #d8d8d8;
  border: none;
  overflow: auto;
  outline: none;
}

.rick,
.mortie {
  flex: 1 1 auto;
}

.rick img,
.mortie img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(74, 8px);
  grid-template-rows: repeat(24, 8px);
  grid-column-gap: 0px;
  grid-row-gap: (2px);
  border: 2px solid #4caf50;
  padding: 10px;
  border-radius: 10px;
  max-width: 95%;
  box-shadow: 0 0 5px 2px #4caf50;
  margin-bottom: 20px;
}

.letter {
  font-size: 15px;
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #4caf50;
  box-shadow: 0 0 5px 2px #4caf50;
  outline: 0;
}

.symbol {
  font-size: 15px;
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #4caf50;
  box-shadow: 0 0 5px 2px #4caf50;
  outline: 0;
}

.action {
  font-size: 15px;
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #fcfa88;
  box-shadow: 0 0 5px 2px #fcfa88;
  outline: 0;
}

.letter:hover {
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #4caf50;
  box-shadow: 0 0 5px 5px #4caf50;
  padding: 5px;
  cursor: pointer;
}

.symbol:hover {
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #4caf50;
  box-shadow: 0 0 5px 5px #4caf50;
  padding: 5px;
  cursor: pointer;
}

.action:hover {
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #fcfa88;
  box-shadow: 0 0 5px 5px #fcfa88;
  padding: 5px;
  cursor: pointer;
}

.letter:active {
  font-size: 13px;
  transform: translate(5%, 5%);
  height: 90%;
  width: 90%;
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #4caf50;
  box-shadow: 0px 0px 5px 7px #4caf50;
  padding: 5px;
}

.symbol:active {
  font-size: 13px;
  transform: translate(5%, 5%);
  height: 90%;
  width: 90%;
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #4caf50;
  box-shadow: 0px 0px 5px 7px #4caf50;
  padding: 5px;
}

.action:active {
  font-size: 13px;
  transform: translate(5%, 5%);
  height: 90%;
  width: 90%;
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #fcfa88;
  box-shadow: 0px 0px 5px 7px #fcfa88;
  padding: 5px;
}

.active {
  font-size: 13px;
  transform: translate(5%, 5%);
  height: 90%;
  width: 90%;
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #4caf50;
  box-shadow: 0px 0px 5px 7px #4caf50;
  padding: 5px;
}

.activeAction {
  font-size: 13px;
  transform: translate(5%, 5%);
  height: 90%;
  width: 90%;
  border-radius: 10px;
  background-color: #272525;
  color: #d8d8d8;
  font-family: "PT Sans", sans-serif;
  border: 2px solid #fcfa88;
  box-shadow: 0px 0px 5px 7px #fcfa88;
  padding: 5px;
}

.sound {
  display: flex;
  align-items: center;
  min-width: 100px;
}

.sound h5 {
  margin-top: 15px;
  margin-right: 20px;
}

.mute-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}

.mute-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  width: 35px;
  height: 20px;
  background-color: #4caf50;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 3px;
  top: 2.5px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #cc4949;
}

input:checked + .slider:before {
  transform: translateX(14px);
}

.mute-label {
  font-size: 16px;
}

@media (max-width: 1100px) {
  .keyboard {
    grid-template-columns: repeat(74, 1fr);
    grid-template-rows: repeat(24, minmax(7px, 1fr));
  }
}

@media (max-width: 990px) {
  .keyboard {
    grid-template-columns: repeat(74, minmax(8px, 1fr));
    grid-template-rows: repeat(24, minmax(8px, 1fr));
  }

  .container {
    grid-template-columns: 1fr;
    justify-items: center;
    width: 100%;
    height: 100%;
  }
  .container__center {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .keyboard {
    grid-template-columns: repeat(74, 1fr);
    grid-template-rows: repeat(24, minmax(5px, 1fr));
  }
  .textarea {
    min-height: 150px;
  }
}

@media (max-width: 350px) {
  h1 {
    font-size: medium;
    height: 20px;
  }
}

/* ПЕРВАЯ СТРОКА КЛАВИАТУРЫ */

#buttonBackquote {
  grid-row: 1 / 5;
  grid-column: 1 / 5;
}
#button1 {
  grid-row: 1 / 5;
  grid-column: 6 / 10;
}
#button2 {
  grid-row: 1 / 5;
  grid-column: 11 / 15;
}
#button3 {
  grid-row: 1 / 5;
  grid-column: 16 / 20;
}
#button4 {
  grid-row: 1 / 5;
  grid-column: 21 / 25;
}
#button5 {
  grid-row: 1 / 5;
  grid-column: 26 / 30;
}
#button6 {
  grid-row: 1 / 5;
  grid-column: 31 / 35;
}
#button7 {
  grid-row: 1 / 5;
  grid-column: 36 / 40;
}
#button8 {
  grid-row: 1 / 5;
  grid-column: 41 / 45;
}
#button9 {
  grid-row: 1 / 5;
  grid-column: 46 / 50;
}
#button0 {
  grid-row: 1 / 5;
  grid-column: 51 / 55;
}
#buttonDash {
  grid-row: 1 / 5;
  grid-column: 56 / 60;
}
#buttonEqually {
  grid-row: 1 / 5;
  grid-column: 61 / 65;
}
#buttonDel {
  grid-row: 1 / 5;
  grid-column: 66 / 70;
}
#buttonBackspace {
  grid-row: 1 / 5;
  grid-column: 71 / 75;
}

/* ВТОРАЯ СТРОКА КЛАВИАТУРЫ */

#buttonTab {
  grid-row: 6 / 10;
  grid-column: 1 / 7;
}
#buttonQ {
  grid-row: 6 / 10;
  grid-column: 8 / 12;
}
#buttonW {
  grid-row: 6 / 10;
  grid-column: 13 / 17;
}
#buttonE {
  grid-row: 6 / 10;
  grid-column: 18 / 22;
}
#buttonR {
  grid-row: 6 / 10;
  grid-column: 23 / 27;
}
#buttonT {
  grid-row: 6 / 10;
  grid-column: 28 / 32;
}
#buttonY {
  grid-row: 6 / 10;
  grid-column: 33 / 37;
}
#buttonU {
  grid-row: 6 / 10;
  grid-column: 38 / 42;
}
#buttonI {
  grid-row: 6 / 10;
  grid-column: 43 / 47;
}
#buttonO {
  grid-row: 6 / 10;
  grid-column: 48 / 52;
}
#buttonP {
  grid-row: 6 / 10;
  grid-column: 53 / 57;
}
#buttonOpenSquareBracket {
  grid-row: 6 / 10;
  grid-column: 58 / 62;
}
#buttonCloseSquareBracket {
  grid-row: 6 / 10;
  grid-column: 63 / 67;
}
#buttonBackSlash {
  grid-row: 6 / 10;
  grid-column: 68 / 75;
}

/* ТРЕТЬЯ СТРОКА КЛАВИАТУРЫ */

#buttonCapsLock {
  grid-row: 11 / 15;
  grid-column: 1 / 9;
}
#buttonA {
  grid-row: 11 / 15;
  grid-column: 10 / 14;
}
#buttonS {
  grid-row: 11 / 15;
  grid-column: 15 / 19;
}
#buttonD {
  grid-row: 11 / 15;
  grid-column: 20 / 24;
}
#buttonF {
  grid-row: 11 / 15;
  grid-column: 25 / 29;
}
#buttonG {
  grid-row: 11 / 15;
  grid-column: 30 / 34;
}
#buttonH {
  grid-row: 11 / 15;
  grid-column: 35 / 39;
}
#buttonJ {
  grid-row: 11 / 15;
  grid-column: 40 / 44;
}
#buttonK {
  grid-row: 11 / 15;
  grid-column: 45 / 49;
}
#buttonL {
  grid-row: 11 / 15;
  grid-column: 50 / 54;
}
#buttonSemicolon {
  grid-row: 11 / 15;
  grid-column: 55 / 59;
}
#buttonApostrophe {
  grid-row: 11 / 15;
  grid-column: 60 / 64;
}
#buttonEnter {
  grid-row: 11 / 15;
  grid-column: 65 / 75;
}

/* ЧЕТВЕРТАЯ СТРОКА КЛАВИАТУРЫ */

#buttonLeftShift {
  grid-row: 16 / 20;
  grid-column: 1 / 10;
}
#buttonZ {
  grid-row: 16 / 20;
  grid-column: 11 / 15;
}
#buttonX {
  grid-row: 16 / 20;
  grid-column: 16 / 20;
}
#buttonC {
  grid-row: 16 / 20;
  grid-column: 21 / 25;
}
#buttonV {
  grid-row: 16 / 20;
  grid-column: 26 / 30;
}
#buttonB {
  grid-row: 16 / 20;
  grid-column: 31 / 35;
}
#buttonN {
  grid-row: 16 / 20;
  grid-column: 36 / 40;
}
#buttonM {
  grid-row: 16 / 20;
  grid-column: 41 / 45;
}
#buttonComma {
  grid-row: 16 / 20;
  grid-column: 46 / 50;
}
#buttonDot {
  grid-row: 16 / 20;
  grid-column: 51 / 55;
}

#buttonForwardSlash {
  grid-row: 16 / 20;
  grid-column: 56 / 60;
}
#buttonForward {
  grid-row: 16 / 20;
  grid-column: 61 / 65;
}
#buttonRightShift {
  grid-row: 16 / 20;
  grid-column: 66 / 75;
}

/* ПЯТАЯ СТРОКА КЛАВИАТУРЫ */

#buttonLeftControl {
  grid-row: 21 / 25;
  grid-column: 1 / 5;
}
#buttonWin {
  grid-row: 21 / 25;
  grid-column: 6 / 10;
}
#buttonLeftAlt {
  grid-row: 21 / 25;
  grid-column: 11 / 15;
}
#buttonSpace {
  grid-row: 21 / 25;
  grid-column: 16 / 50;
}
#buttonRightAlt {
  grid-row: 21 / 25;
  grid-column: 51/ 55;
}
#buttonLeft {
  grid-row: 21 / 25;
  grid-column: 56 / 60;
}
#buttonBack {
  grid-row: 21 / 25;
  grid-column: 61 / 65;
}
#buttonRight {
  grid-row: 21 / 25;
  grid-column: 66 / 70;
}
#buttonRightControl {
  grid-row: 21 / 25;
  grid-column: 71 / 75;
}
