*,
*::before,
*::after {
   box-sizing: border-box;
}

html {
   height: 100%;
}

body {
   background-color: #282a36;
   color: white;
   font-family: "Montserrat", sans-serif;
}

body.genz {
   background-image: url(../images/moon1.svg);
   background-size: cover;
}

h1 {
   font-size: 60px;
   text-align: center;
   padding-bottom: 20px;
}

footer {
   margin: 20px;
   padding: 20px;
   text-align: center;
   font-weight: 600;
}

a {
   color: #df407d;
}

.app-header {
   display: flex;
   justify-content: end;
   margin: 40px;
}

.title {
   margin: 0;
   font-weight: 800;
   letter-spacing: 0.7px;
}

.wrap {
   max-width: 960px;
   margin: 0 auto;
   padding: 16px;
}

.translator {
   display: grid;
   grid-template-columns: 1fr;
   gap: 16px;
   margin: 8px auto 40px;
}

.panel {
   position: relative;
   background: rgba(255, 255, 255, 0.08);
   border: 1px solid rgba(255, 255, 255, 0.22);
   border-radius: 20px;
   padding: 16px;
   backdrop-filter: blur(14px) saturate(140%);
   -webkit-backdrop-filter: blur(14px) saturate(140%);
   box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.panel::before {
   content: "";
   position: absolute;
   inset: 0;
   border-radius: 20px;
   pointer-events: none;
   box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
   background: linear-gradient(
         180deg,
         rgba(255, 255, 255, 0.18),
         rgba(255, 255, 255, 0) 40%
      ),
      linear-gradient(0deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0) 40%);
   opacity: 0.9;
}

.panel h2 {
   margin: 0 0 10px;
   font-size: 16px;
   color: #d3d9e9;
}

@media (min-width: 800px) {
   .translator {
      grid-template-columns: 1fr 1fr;
   }
}

textarea,
.result-box {
   font-family: inherit;
   font-size: 16px;
   padding: 14px 16px;
   width: 100%;
   display: block;
   height: 240px;
   min-height: 240px;
   overflow: auto;
   resize: none;
   color: #eaf0ff;
   background: rgba(5, 8, 16, 0.55);
   border: 1px solid rgba(255, 255, 255, 0.18);
   border-radius: 14px;
   backdrop-filter: blur(10px) saturate(120%);
   -webkit-backdrop-filter: blur(10px) saturate(120%);
   outline: none;
   box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

textarea::placeholder {
   color: rgba(234, 240, 255, 0.45);
}

textarea:focus,
.result-box:focus {
   box-shadow: 0 0 0 3px rgba(240, 34, 206, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.toggle,
.translate {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   padding: 12px 20px;
   min-height: 44px;
   border-radius: 30px;
   background: linear-gradient(
         120deg,
         rgba(34, 240, 212, 0.12),
         rgba(173, 107, 255, 0.12)
      ),
      rgba(255, 255, 255, 0.1);
   border: 1px solid rgba(255, 255, 255, 0.25);
   backdrop-filter: blur(10px) saturate(140%);
   -webkit-backdrop-filter: blur(10px) saturate(140%);
   box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      inset 0 -1px 0 rgba(0, 0, 0, 0.18);

   color: #eaf0ff;
   font-size: 14px;
   font-weight: 700;
   line-height: 1;
   border: 0;
   cursor: pointer;
   user-select: none;
   -webkit-user-select: none;
   touch-action: manipulation;
   transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.translate {
   margin-top: 10px;
}
.toggle:hover,
.translate:hover {
   filter: brightness(1.05);
}

.translate[aria-busy="true"] {
   opacity: 0.6;
   cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
   * {
      transition: none !important;
      animation: none !important;
   }
}
