* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #f0f4fa;
  color: #0d3a75;
  font-family: "Times New Roman", serif;
  margin: 0;
}

a {
  color: #1a5fb4;
}

.site-header {
  position: relative;
  height: 205px;
}

.wave-divider {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 168px;
}

.shark-logo-img {
  position: absolute;
  top: 10px;
  left: 24px;
  z-index: 2;
  width: 220px;
  transform-origin: left center;
  animation: fade-in 0.7s ease-out both, shark-drift 5s ease-in-out 0.7s infinite;
}

.wave-cover {
  position: absolute;
  top: 18px;
  left: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 150px;
  pointer-events: none;
  transform-origin: center;
  animation: wave-breathe 8s ease-in-out infinite alternate;
}

.brand {
  position: absolute;
  top: 36px;
  left: 275px;
  z-index: 4;
  color: #fff;
  text-shadow: 0 1px 2px rgba(13, 58, 117, 0.35);
  animation: rise-in 0.65s 0.08s ease-out both;
}

h1 {
  font-size: 34px;
  font-weight: normal;
  letter-spacing: 1px;
  margin: 0 0 4px;
}

.tagline {
  color: #dceeff;
  font-size: 14px;
  font-style: italic;
  margin: 0;
}

.menu-toggle,
.burger {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 45px;
  width: min(1050px, calc(100% - 48px));
  margin: 0 auto;
}

.sidebar {
  align-self: start;
  border-top: 2px solid #3584e4;
  padding: 18px 0;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
}

.sidebar a {
  position: relative;
  display: block;
  border-bottom: 1px solid #d7e3f2;
  padding: 11px 4px;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.sidebar a::before {
  display: inline-block;
  width: 0;
  overflow: hidden;
  color: #07346f;
  content: ">";
  font-family: Arial, sans-serif;
  font-weight: bold;
  opacity: 0;
  transform: translateX(-7px);
  transition: width 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.sidebar a:last-child {
  border-bottom: none;
}

.sidebar a:hover,
.sidebar a:focus-visible,
.sidebar a[aria-current="page"] {
  background: #e5eef9;
  color: #1a5fb4;
  padding-left: 9px;
}

.sidebar a:hover::before,
.sidebar a:focus-visible::before,
.sidebar a[aria-current="page"]::before {
  width: 15px;
  opacity: 1;
  transform: translateX(0);
}

.sidebar .soon {
  float: right;
  margin-top: 2px;
  color: #9fb6d9;
  font-family: Arial, sans-serif;
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

main {
  min-height: 430px;
  padding: 0 0 80px;
}

.status {
  border-top: 2px solid #3584e4;
  font-size: 15px;
  line-height: 1.7;
  padding-top: 18px;
  animation: rise-in 0.65s 0.18s ease-out both;
}

.status h2 {
  color: #1a5fb4;
  font-size: 24px;
  font-weight: normal;
  margin: 0 0 12px;
}

.status p {
  max-width: 56ch;
  margin: 0;
}

.soon-label {
  display: inline-block;
  margin-bottom: 10px;
  color: #7d9fc7;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tool-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.tool-intro h2 {
  margin-bottom: 4px;
}

.privacy-note {
  flex: 0 0 auto;
  color: #6488b2;
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.uwu-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.text-panel {
  min-width: 0;
}

.text-panel-head,
.tool-actions,
.mode-picker {
  display: flex;
  align-items: center;
}

.text-panel-head {
  justify-content: space-between;
  margin-bottom: 7px;
}

.text-panel label {
  color: #0d3a75;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
}

.character-count {
  color: #8aa7c9;
  font-family: Arial, sans-serif;
  font-size: 10px;
}

.tool-textarea {
  display: block;
  width: 100%;
  min-height: 235px;
  resize: vertical;
  border: 1px solid #bdd2ea;
  border-radius: 3px;
  outline: none;
  background: rgba(255, 255, 255, 0.68);
  color: #0d3a75;
  font: 15px/1.55 "Times New Roman", serif;
  padding: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-textarea:focus {
  border-color: #3584e4;
  box-shadow: 0 0 0 3px rgba(53, 132, 228, 0.1);
}

.tool-textarea[readonly] {
  background: #eaf2fb;
}

.tool-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}

.mode-picker {
  gap: 4px;
  padding: 3px;
  border: 1px solid #c7daef;
  border-radius: 3px;
  background: #e7f0fa;
}

.mode-picker span {
  padding: 0 6px;
  color: #6f8eaf;
  font-family: Arial, sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tool-button {
  cursor: pointer;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #1a5fb4;
  font: 12px Arial, sans-serif;
  padding: 8px 10px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tool-button:hover,
.tool-button:focus-visible {
  background: #d6e6f7;
  color: #07346f;
}

.tool-button:active {
  transform: translateY(1px);
}

.tool-button[aria-pressed="true"],
.tool-button.primary {
  background: #1a5fb4;
  color: #fff;
}

.tool-button.primary:hover,
.tool-button.primary:focus-visible {
  background: #0d478c;
  color: #fff;
}

.tool-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.tool-actions {
  justify-content: end;
  gap: 4px;
}

.copy-status {
  min-width: 45px;
  color: #2c8662;
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.tool-credit {
  margin-top: 18px !important;
  color: #819cbb;
  font-family: Arial, sans-serif;
  font-size: 10px;
}

.footer {
  border-top: 1px solid #d7e3f2;
  color: #9fb6d9;
  font-size: 11px;
  margin-top: 42px;
  padding-top: 14px;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shark-drift {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(3px) rotate(0.3deg); }
}

@keyframes wave-breathe {
  from { transform: translateX(-2px) scaleX(1.004); }
  to { transform: translateX(2px) scaleX(1.008); }
}

@media (max-width: 700px) {
  .site-header {
    height: 170px;
  }

  .wave-divider {
    top: 0;
    height: 137px;
  }

  .wave-cover {
    top: 12px;
    height: 125px;
  }

  .shark-logo-img {
    top: 9px;
    left: clamp(-34px, -6vw, -22px);
    width: clamp(150px, 45vw, 175px);
  }

  .brand {
    top: 30px;
    right: 54px;
    left: clamp(104px, 31vw, 126px);
  }

  h1 {
    font-size: clamp(21px, 7vw, 25px);
    line-height: 1;
    white-space: nowrap;
  }

  .tagline {
    margin-top: 6px;
    font-size: 12px;
  }

  .burger {
    position: absolute;
    top: 25px;
    right: 18px;
    z-index: 5;
    display: flex;
    width: 44px;
    height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 0;
  }

  .burger::before,
  .burger::after,
  .burger span {
    position: absolute;
    width: 19px;
    height: 2px;
    background: #fff;
    content: "";
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .burger::before { transform: translateY(-6px); }
  .burger::after { transform: translateY(6px); }

  .layout {
    display: block;
    width: min(100% - 36px, 620px);
  }

  .sidebar {
    position: absolute;
    top: 110px;
    right: 18px;
    left: 18px;
    z-index: 10;
    display: block;
    visibility: hidden;
    opacity: 0;
    border: 1px solid #b9cfe8;
    background: #f8fbff;
    box-shadow: 0 10px 30px rgba(13, 58, 117, 0.16);
    padding: 16px;
    pointer-events: none;
    transform: translateY(-8px);
    transition: visibility 0.22s ease, opacity 0.22s ease, transform 0.22s ease;
  }

  .menu-toggle:checked ~ .layout .sidebar {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-toggle:checked + .burger::before { transform: rotate(45deg); }
  .menu-toggle:checked + .burger::after { transform: rotate(-45deg); }
  .menu-toggle:checked + .burger span { opacity: 0; }

  .tool-intro {
    display: block;
  }

  .privacy-note {
    display: block;
    margin-top: 9px;
  }

  .uwu-panel {
    grid-template-columns: 1fr;
  }

  .tool-textarea {
    min-height: 175px;
  }

  .tool-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-picker,
  .tool-actions {
    justify-content: center;
  }

  .tool-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 360px) {
  .brand {
    right: 50px;
    left: 100px;
  }

  h1 { font-size: 20px; }
  .tagline { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .shark-logo-img,
  .wave-cover,
  .brand,
  .status {
    animation: none;
  }

  .sidebar,
  .sidebar a,
  .sidebar a::before,
  .burger::before,
  .burger::after,
  .burger span {
    transition: none;
  }
}
