@font-face {
  font-family: 'Poneglyph';
  src: url('../font/Poneglyph.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image:
    url('../img/sandwall.jpg'),
    linear-gradient(rgba(245,240,230,0.72), rgba(235,225,205,0.72));
  background-blend-mode: overlay, saturation;
  background-attachment: fixed;
}

.navbar {
  min-width: 50%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  margin-bottom: 20px;
  padding: 20px 32px;
  padding-left: 110px;
  background-color: rgba(0, 0, 128, 0.8);
  color: azure;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.navbar::before {
  content: "";
  position: absolute;
  transform: translateY(-24px) translateX(-144px);
  width: 160px;
  height: 160px;
  background-image: url('../img/strawhat.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

button {
  margin-top: 10px;
  box-sizing: border-box;
  padding: 0 12px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

/* Language control (flags) */
.lang-controls { display: flex; gap: 8px; align-items: center; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.lang-btn img { display: block; width: 32px; height: 21px; }
.lang-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06); }
.lang-btn:focus { outline: 2px solid rgba(255,255,255,0.15); outline-offset: 2px; }

/* Hover highlight for flag buttons */
.lang-btn:hover,
.lang-btn:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
  border-color: rgba(255,255,255,0.28);
  background-color: rgba(255,255,255,0.06);
}

.wrapper-div {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 20px;
  align-items: center;
}

.note {
  padding: 10px;
  margin: 12px 0;
  background-color: rgba(255,255,255,0.6);
  font-size: 14px;
}

textarea {
  width: 40%;
  margin: 20px 10px;
  min-height: 160px;
  font-size: 16px;
  padding: 10px;
  box-sizing: content-box;
  white-space: pre-wrap;
}

#result {
  width: 40%;
  min-height: 140px;
  font-size: 48px;
  margin: 20px 10px;
  padding: 14px;
  color: azure;
  background-color: #000080;
  border-width: 8px;
  border-style: ridge;
  border-color: midnightblue;
  line-break: anywhere;
  text-align: center;
  font-family: 'Poneglyph';
  font-size: 20px;
  user-select: none;
}

.tool-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px;
  gap: 12px;
}

.tool-button {
  width: 150px;
  height: 60px;
}

@media screen and (max-width: 600px) {
  h1 {
    font-size: 20px;
    margin: 0;
  }
}
