@charset "UTF-8";
:root {
  --editor-height: calc(100% - 200px);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: linear-gradient(120deg, #676767, #008491 85%);
  font-size: 1.5rem;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

@keyframes gradient-move {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
main {
  color: #fff6d5;
  font-family: inherit;
  padding: 1.5rem;
}

.container .editor-wrapper {
  height: var(--editor-height);
}

.container {
  min-height: 0;
  position: absolute;
  left: 20px;
  right: 20px;
  top: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  background: rgba(30, 32, 34, 0.88);
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), 0 1.5px 8px rgba(0, 0, 0, 0.11);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lower-container {
  display: flex;
  flex-direction: row;
}

.lower-container > canvas {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: white;
}

#gamecanvas {
  width: 100%;
  height: 100%;
}

.lower-container > .log {
  flex: 1 1 0;
  min-width: 0;
  overflow: auto;
}

.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.5rem;
  height: 48px;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.controls button {
  background: linear-gradient(100deg, #00545d 40%, #00505a 100%);
  color: #fff6d5;
  border: none;
  border-radius: 0.7rem;
  font-size: 0.75rem;
  padding: 0.9em 0.4em;
  cursor: pointer;
  font-weight: 600;
  text-shadow: #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
  transition: background 0.2s, transform 0.1s;
}
.controls button:hover, .controls button:focus {
  background: linear-gradient(100deg, #00bbee 0%, #0099bb 100%);
  transform: translateY(-2px) scale(1.045);
  outline: none;
}
.controls button:active {
  transform: scale(0.97);
}

.full-height {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}

.drag-container {
  display: flex;
}

.dragger {
  height: 12px;
  min-height: 12px;
  background: #333;
  cursor: row-resize;
  user-select: none;
}

.log {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.log-area {
  background: rgba(0, 0, 0, 0.14);
  color: #f6f3e4;
  font-size: 1rem;
  padding: 0.6em 1.3em 0.6em 1.1em;
  min-height: 2.6em;
  height: 100%;
  overflow-y: auto;
  border-radius: 0.8em;
  margin: 0 1.2em 0.8em 1.2em;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.log-area .log-line {
  white-space: pre-line;
  font-family: ui-monospace, monospace;
  font-size: 0.98em;
  opacity: 0.97;
  padding: 0.05em 0;
  white-space: pre-wrap;
}
.log-area .log-line::before {
  display: inline-block;
  width: 1.3em;
  margin-right: 0.4em;
  font-size: 1.05em;
  font-family: "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  vertical-align: middle;
  opacity: 0.82;
}
.log-area .log-line.info {
  color: #89d8ff;
  border-left-color: #1fa6ed;
  background: rgba(10, 36, 68, 0.08);
}
.log-area .log-line.info::before {
  content: "ℹ️";
}
.log-area .log-line.debug {
  color: #aff1a3;
  border-left-color: #37be62;
  background: rgba(20, 42, 16, 0.08);
}
.log-area .log-line.debug::before {
  content: "📋";
}
.log-area .log-line.warn {
  color: #ffde7a;
  border-left-color: #ffc32b;
  background: rgba(96, 66, 0, 0.12);
}
.log-area .log-line.warn::before {
  content: "⚠️";
}
.log-area .log-line.error {
  color: #ffc6c6;
  border-left-color: #d73b3e;
  background: rgba(70, 18, 18, 0.14);
}
.log-area .log-line.error::before {
  content: "⛔";
}
.log-area .spacer {
  height: 7.5em;
  pointer-events: none;
}

.tabs {
  display: flex;
  gap: 0.5em;
  background: transparent;
  margin: 0.5em 0 0 0.8em;
}
.tabs button.tab {
  appearance: none;
  background: none;
  border: none;
  outline: none;
  color: #98bfe9;
  font-size: 0.75em;
  font-family: inherit;
  font-weight: 500;
  padding: 0.4em 1.4em;
  margin: 0;
  border-radius: 0.7em 0.7em 0 0;
  transition: background 0.17s, color 0.16s, box-shadow 0.18s;
  cursor: pointer;
  opacity: 0.83;
  position: relative;
}
.tabs button.tab:hover, .tabs button.tab:focus {
  background: rgba(40, 90, 160, 0.18);
  color: #e3f1ff;
  opacity: 1;
  z-index: 2;
}
.tabs button.tab.selected {
  background: linear-gradient(120deg, #194e77 60%, #276289 100%);
  color: #fff6d5;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.12), 0 0.5px 0.5px 0 rgba(255, 255, 255, 0.04) inset;
  opacity: 1;
  font-weight: 700;
  border-bottom: 2px solid #00aabb;
  z-index: 3;
}

.tabs button.error {
  color: #ffbaba;
  background: rgba(189, 40, 40, 0.14);
  border-bottom: 2px solid #ff4444;
  position: relative;
  font-weight: 600;
}
.tabs button.error::before {
  content: "⛔";
  font-size: 1em;
  vertical-align: middle;
  margin-right: 0.4em;
  opacity: 0.85;
}
.tabs button.error:hover, .tabs button.error:focus {
  background: rgba(189, 40, 40, 0.22);
  color: #ffdada;
  outline: none;
}

.tabs button.selected.error,
.tabs button.error.selected {
  color: #fff6d5;
  background: linear-gradient(120deg, #b12c2c 40%, #a83e3e 100%);
}
.tabs button.selected.error::before,
.tabs button.error.selected::before {
  content: "⛔";
  font-size: 1.2em;
  opacity: 0.93;
}
