* {
      box-sizing: border-box;
      font-family: "Roboto", sans-serif;
      -webkit-tap-highlight-color: transparent;
}

:root {
      --main-color: #F1D651;
      --main-color-2: #00DEAA;
      --main-color-3: #D7D7D7;
      --color-document: #ffffff;
      --color-document-2: #000000;

      --main-color-hover: #eedd85;
      --main-color-hover-2: #61d7bb;
      --main-color-hover-3: #c2c2c2;
}

body {
      background-color: var(--color-document);
      color: var(--color-2-document);
      height: 100vh;
}

.body-container {
      display: flex; 
      flex-direction: column; 
      height: 100vh;
}

.header {
      background-color: #F1D651;
      height: 80px;
      padding: 0 5%;
      position: relative;
      z-index: 4;
}

.header-container {
      height: 100%;
      display: flex;
      align-items: center;
}

.logo {
      color: var(--color-document);
      font-size: 40px;
      font-weight: bold;
      user-select: none;
}

.header-nav {
      margin-left: 5%;
}

.header-ul {
      list-style: none;
      padding: 0;
}

.header-a {
      color: var(--color-document);
      font-size: clamp(20px, 24px, 28px);
      font-weight: bold;
      text-decoration: none;
}

.burger-icon {
      display: none;
}

.main {
      position: relative;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
}

.div-input-output-result {
      width: 100%;
      height: 150px;
      border-bottom: 3px var(--main-color-3) solid;
}

.input-output-result {
      background-color: var(--bg-document);
      width: 100%;
      height: 100%;
      border: none;
      text-align: right;
      outline: none;
      padding: 5px 20px;
      font-size: clamp(20px, 22px, 26px);
      font-weight: bold;
}

.input-output-result::placeholder {
      text-align: center;
      color: var(--main-color-3);
      font-size: clamp(16px, 18px, 22px);
      font-weight: 400;
}

.input-output-result::selection, .block-history::selection {
      background-color: var(--main-color);
      color: var(--color-document-2);
}

.blocks-history-of-calculations-and-visual-keyboard {
     width: 100%;
     flex-grow: 1;
     display: grid;
     grid-template-columns: repeat(2, 1fr);
}

.div-history-of-calculations {
      width: 100%;
      height: 100%;
      border-right: 3px var(--main-color-3) solid;
      
}

.toggle-of-view-history {
      display: inline-flex;
      margin: 1%;
      align-items: center;
}

.text-toggle {
      color: var(--main-color-3);
}

.toggle-history {
      background-color: var(--main-color-3);
      width: 100%;
      max-width: 70px;
      min-width: 70px;
      height: 35px;
      display: flex;
      align-items: center;
      padding: 4px;
      border-radius: 50px;
      cursor: pointer;
      margin-left: 10px;
      margin-right: 10px;
}

.changer {
      transition: transform .3s ease, background-color .3s ease;
      background-color: #4DFF80;
      border-radius: 50px;
      width: 100%;
      height: 100%;
      max-width: 30px;
      min-width: 30px;
      max-height: 30px;
}

.changer.toggle {
      transform: translateX(32px);
      background-color: #FF3A3A;
      width: 100%;
      height: 100%;
      max-width: 30px;
      max-height: 30px;
      border-radius: 50px;
}

.clear-history-span {
      cursor: pointer;
      background-color: #FF3A3A;
      color: white;
      padding: 5px;
      font-size: clamp(16px, 20px, 24px);
      font-weight: bold;
      border-radius: 50px;
      margin-right: 10px;
      opacity: 0;
      transition: opacity .3s ease, background-color .3s ease;
}

.clear-history-span:hover {
      background-color: #ff6464;
}

.clear-history-span.appear {
      opacity: 1;
}

.div-block-history {
      display: flex;
      justify-content: center;
      margin: 1% 3%;
}

.block-history {
     width: 100%;
     height: 100%;
     max-height: 400px;
     max-width: 600px;
     background-color: var(--main-color-3);
     border-radius: 10px;
     text-align: right;
     padding: 10px;
     font-size: clamp(16px, 20px, 24px); 
     transform: translateX(0);
     transition: transform .5s ease;
     overflow: auto;
}

.block-history.opened {
      transform: translateX(-10000px);
}

.block-history::-webkit-scrollbar {
      width: 15px;
}

.block-history::-webkit-scrollbar-track {
      background-color: var(--main-color);
      border-radius: 0 10px 10px 0;
}

.block-history::-webkit-scrollbar-thumb {
      background-color: var(--main-color-2);
      border-radius: 10px;
}

.block-history::-webkit-scrollbar-thumb:hover {
      background-color: var(--main-color-hover-2);
}

.div-visual-keyboard {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      user-select: none;
}

.block-visual-keyboard {
      
}

.calculator {
    display: grid;
    grid-template-columns: repeat(6, 70px);
    grid-template-rows: repeat(5, 70px);
    gap: 10px;
    grid-template-areas:
      "C AC minus left"
      "nine divide mult right"
      "six seven eight right"
      "three four five equal"
      "zero one two equal";
  }

.calculator button {
    font-size: clamp(20px, 24px, 28px);
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
  }

  /* Цвета */
  .btn-clear { 
      background-color: var(--main-color-2); 
}
  .btn-ac { 
      background-color: var(--main-color); 
}
  .btn-operator, .btn-number { 
      background-color: var(--main-color-3);
      
}
  .btn-equal { 
      background-color: var(--main-color-2); grid-area: equal; 
}
  .btn-plus { 
      grid-area: right; background-color: var(--main-color-3); 
}
  .btn-minus { 
      grid-area: minus; background-color: var(--main-color-3); 
      grid-column: span 2;и
}
  .btn-left { 
      grid-area: left; background-color: var(--main-color-3); 
}
.btn-right {
      
}
  .btn-mult { 
      background: var(--main-color-3); 
}
  .btn-divide { 
      background: var(--main-color-3); 
}

.btn-dot {
     background-color: var(--main-color-3); 
}

  
  .C { 
      grid-area: C; 
}
  .AC { 
      grid-area: AC; 
}
  .nine { 
      grid-area: nine; 
}
  .divide { 
      grid-area: divide; 
}
  .mult { 
      grid-area: mult; 
}
  .six { 
      grid-area: six; 
}
  .seven { 
      grid-area: seven; 
}
  .eight { 
      grid-area: eight; 
}
  .three { 
      grid-area: three; 
}
  .four { 
      grid-area: four; 
}
  .five { 
      grid-area: five; 
}
  .zero { 
      grid-area: zero; 
}
  .one { 
      grid-area: one; 
}
  .two { 
      grid-area: two; 
}

.btn-clear:active, .btn-equal:active {
      background-color: var(--main-color-hover-2);
}

.btn-ac:active {
      background-color: var(--main-color-hover);
}

.btn-minus:active, .btn-operator:active, .btn-number:active, .btn-left:active, .btn-dot:active, .btn-mult:active, .btn-divide:active, .btn-plus:active {
      background-color: var(--main-color-hover-3);
}

.div-nav-phone {
      display: none;
}

.block-tips {
      position: absolute;
      top: 0;
      left: -10000px;
}

.block-tips:hover {
      transform: translateX(10000px);
}

.block-tips:hover .show-tips {
      transform: translateX(-10000px) rotate(90deg);
      border-radius: 10px 10px 0 0;
      
}

.block-tips:hover .div-tips {
      opacity: 1;
}

.show-tips {
      background-color: var(--main-color-2);
      display: inline-flex;
      position: relative;
      top: 5px;
      left: 10000px;
      border-radius: 0 10px 10px 0;
}

.div-tips {
      background-color: var(--main-color);
      padding: 10px;
      border-radius: 0 10px 10px 0;
      opacity: 0;
      transition: opacity .3s ease;
      width: 100%;
      max-width: 500px;
}

.tip-about-keyboard {
      background-color: var(--main-color-2);
      color: white;
      padding: 5px;
      border-radius: 10px;
      font-size: clamp(18px, 22px, 26px);
      font-weight: bold;
      text-align: center;
      margin: 0;
}

.ul-tips-of-keyboard {
      display: flex;
      flex-direction: column;
      gap: 15px;
}

.tip-of-keyboard::marker {
      color: var(--main-color-2);
      font-size: 20px;
}

.tip-of-key {
      font-size: clamp(16px, 20px, 24px);
      font-weight: bold;
      background-color: var(--main-color-2);
      color: white;
      padding: 5px;
      border-radius: 10px;
}

.description {
      font-size: clamp(16px, 20px, 24px);
      color: white;
      padding: 5px;
}

@media (max-width: 480px) {
      .header-container {
            display: flex;
            justify-content: space-between;
      }

      .logo {
            font-size: 32px;
      }

      .header-nav {
            display: none;
      }

      .burger-icon {
            display: flex;
            flex-direction: column;
            background: transparent;
            border: none;
      }

      .burger-icon .stick {
            width: 60px;
            height: 6px;
            background-color: var(--color-document);
            margin: 5px;
            transition: transform .2s ease, opacity .4s ease;
      }

      .stick.opened:nth-of-type(1) {
            transform: rotate(45deg) translateY(20px);
      }

      .stick.opened:nth-of-type(2) {
            visibility: hidden;
            opacity: 0;
      }

      .stick.opened:nth-of-type(3) {
            transform: rotate(-45deg) translateY(-20px);
      }

      .div-input-output-result {
            height: 120px;
      }

      .div-history-of-calculations {
            display: none;
      }

      .input-output-result {
            font-size: 18px;
      }

      .input-output-result::placeholder {
      font-size: 16px;
      white-space: wrap;
      text-align: center;
      }

      .blocks-history-of-calculations-and-visual-keyboard {
            display: flex;
            justify-content: center;
      }

      .calculator {
            grid-template-columns: repeat(5, 55px);
            grid-template-rows: repeat(5, 55px);
            gap: 5px;
      }

        .btn-minus { 
            grid-column: span 1;
      }

      .div-nav-phone {
            display: flex;
            justify-content: center;
            align-items: center;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 3;
            width: 100%;
            height: 100%;
            background-color: var(--main-color);
            transform: translateX(-1000px);
            transition: transform .4s ease;
      }

      .div-nav-phone.opened {
            transform: translateX(0);
      }

      .header-ul-phone {
            padding: 0;
      }

      .header-li-phone {
            list-style: none;
            padding: 0;
      }

      .header-a-phone {
            color: var(--color-document);
            font-size: clamp(20px, 24px, 28px);
            font-weight: bold;
            text-decoration: none;
      }
      .block-tips {
            display: none;
      }
      }

@media (min-width: 480px) and (max-width: 768px) {
      .div-input-output-result {
            height: 130px;
      }

      .div-history-of-calculations {
            display: none;
      }

      .input-output-result {
            font-size: 18px;
      }

      .input-output-result::placeholder {
            font-size: 18px;
            white-space: wrap;
            text-align: center;
      }

      .calculator {
            grid-template-columns: repeat(6, 60px);
            grid-template-rows: repeat(5, 60px);
            gap: 5px;
      }

      .btn-minus { 
            grid-column: span 2;
      }

      .blocks-history-of-calculations-and-visual-keyboard {
            display: flex;
            justify-content: center;
      }

      .block-tips {
            display: none;
      }
}

@media (min-width: 768px) and (max-width: 1024px) {
      .calculator {
            grid-template-columns: repeat(5, 65px);
            grid-template-rows: repeat(5, 65px);
            gap: 5px;
      }

      .block-tips {
            display: none;
      }
      .btn-minus { 
            grid-column: span 1;
      }
}