* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

.vt323-regular {
  font-family: "VT323", monospace;
  font-weight: 400;
  font-style: normal;
}

.noto-sans-mono-interface {
  font-family: "Noto Sans Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}

body {
  background-color: #000;
  color: #0f0;
  font-size: 14pt;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body.noto-sans-mono-interface {
  font-family: "Noto Sans Mono", monospace;
}

a {
  color: #0f0;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
textarea:focus-visible {
  outline: 2px dashed #0f0;
  outline-offset: 2px;
}

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  width: min(100%, 900px);
  padding: 24px 32px 32px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}

.toolbar-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #030;
  border: 1px solid #0c0;
  border-radius: 6px;
  color: inherit;
  cursor: pointer;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 12pt;
  letter-spacing: 0.5px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.25);
}

.icon-button:active {
  transform: translateY(1px);
  box-shadow: none;
}

.button-label {
  text-transform: uppercase;
  font-size: 60%;
  letter-spacing: 2px;
  opacity: 0.9;
}

.status {
  font-size: 11pt;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.status .divider {
  opacity: 0.4;
}

.editor-container {
  flex: 1;
  display: flex;
  position: relative;
}

#writerArea {
  width: 100%;
  height: 100%;
  flex: 1;
  resize: none;
  padding: 32px 28px 48px;
  background-color: #000;
  color: #0f0;
  border: 1px solid #020;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 255, 0, 0.08);
  font-family: inherit;
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.6;
  letter-spacing: 0.02em;
  caret-color: #0f0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#writerArea::placeholder {
  color: #093;
  opacity: 0.65;
}

#writerArea:focus {
  border-color: #0c0;
  box-shadow: 0 0 60px rgba(0, 255, 0, 0.18);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  body {
    font-size: 12pt;
  }

  .app {
    width: 100%;
    padding: 20px 18px 24px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .status {
    justify-content: space-between;
    font-size: 10pt;
  }

  #writerArea {
    padding: 24px 18px 36px;
    border-radius: 10px;
    font-size: clamp(15px, 4.5vw, 18px);
  }
}

@media (max-width: 520px) {
  .icon-button {
    justify-content: center;
    padding: 8px 12px;
  }

  .button-label {
    display: none;
  }

  .status {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    text-align: center;
  }
}
