html,
body {
  height: 100vh;
  width: 100vw;
  padding: 0;
  margin: 0;
  font-family: monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #1f1f1f;
  color: #bdbdbd;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

.menu-button[aria-hidden="true"] {
  display: none;
}

.container {
  padding: 10px;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  overflow-y: auto;
}

.center {
  flex: 1 1 auto;
  height: 100%;
}

.menu {
  position: fixed;
  top: 0;
  right: 0;
}

.stats {
  position: fixed;
  bottom: 0;
  right: 0;
}

.editor-textarea {
  height: 100%;
  width: 100%;
  background: transparent;
  padding: 0;
  outline: none;
  resize: none;
  margin: 0;
  border: none;
  font-size: 14px;
  color: #e5e5e5;
  font-family: inherit;
}

.editor-textarea:focus,
.editor-textarea:focus-visible {
  outline: none;
  box-shadow: none;
}

.menu-container {
  padding: 10px 12px 10px 10px;
  background-color: #272727;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100vw;
  border-bottom-left-radius: 10px;
  user-select: none;
}

.menu-button {
  flex: none;
}

.menu-button:hover svg:not(.disabled) {
  color: #e5e5e5;
}

.menu-button svg {
  color: #a3a3a3;
  margin: 0 5px;
  cursor: pointer;
  height: 1em;
  font-size: 1.5rem;
  vertical-align: -0.125em;
}

.menu-button svg.disabled {
  color: #666666;
  cursor: default;
}

.menu-description {
  display: none;
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
}

.menu-description-cleanup {
  height: 10px;
  background-color: #272727;
}

.menu-description-inner {
  height: 50px;
  padding: 5px 10px;
  background-color: #313131;
  border-bottom-left-radius: 10px;
}

.menu-description-title {
  color: #e5e5e5;
  font-weight: 600;
}

.menu-description-shortcut {
  color: #a3a3a3;
  font-size: 11px;
}

.menu-button:hover .menu-description {
  display: block;
}

.stats-container {
  padding: 10px 16px 10px 14px;
  background-color: #272727;
  position: relative;
  display: flex;
  border-top-left-radius: 10px;
  color: #a3a3a3;
  align-items: center;
  font-weight: 600;
  user-select: none;
}

.stats-stat {
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.stats-stat svg {
  margin-right: 8px;
  height: 1em;
  vertical-align: -0.125em;
}

.view-container {
  color: #e5e5e5;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 14px;
}

.view-line {
  display: flex;
}

.view-line-number {
  min-width: 30px;
  padding-right: 8px;
  font-weight: 600;
  flex: none;
  color: #a3a3a3;
  user-select: none;
}

.view-line-code {
  white-space: pre-wrap;
  word-break: break-all;
  flex: auto;
}

.brand {
  color: #f5f5f5;
  font-weight: 600;
  margin: 0 12px 0 4px;
  align-self: center;
  margin-right: auto;
}

.duration-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d4d4d4;
  font-size: 13px;
}

.duration-control select {
  color: #e5e5e5;
  background: #313131;
  border: 1px solid #444444;
  border-radius: 4px;
  padding: 4px 8px;
}

.history {
  position: relative;
  align-self: center;
  max-width: min(320px, calc(100vw - 24px));
  font-size: 13px;
}

.history summary {
  cursor: pointer;
  color: #e5e5e5;
  padding: 4px 8px;
  border-radius: 4px;
}

.history[open] summary,
.history summary:hover {
  background: #313131;
}

.history-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2;
  min-width: 220px;
  padding: 12px;
  border-radius: 8px;
  background: #313131;
  display: grid;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}

.history-list p {
  margin: 0;
  color: #a3a3a3;
}

.history-list a {
  color: #d4d4d4;
  overflow-wrap: anywhere;
}

.form-error {
  position: fixed;
  top: 58px;
  right: 12px;
  color: #e5e5e5;
  background: #313131;
  padding: 8px 12px;
  border-radius: 8px;
}

.view-line-code,
.view-line-code * {
  color: #d4d4d4 !important;
  background-color: transparent !important;
}

:focus-visible {
  outline: 2px solid #e5e5e5;
  outline-offset: 3px;
}
