* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  background: #0c0c0e;
  color: #e4e4e7;
  overflow: hidden;
}

#gol-container {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 1;
}

#gol-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ——— Title (top left) ——— */
.gol-title {
  position: fixed;
  top: 0;
  left: 0;
  padding: 1rem 1.25rem;
  z-index: 50;
  pointer-events: none;
}

.gol-title-main {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.7);
}

.gol-title-sub {
  margin: 0.2rem 0 0 0;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(161, 161, 170, 0.65);
  letter-spacing: 0.01em;
}

.gol-title .gol-credit {
  margin: 0.35rem 0 0 0;
  font-size: 0.7rem;
  color: #52525b;
  text-align: left;
  pointer-events: auto;
}

.gol-title .gol-credit a {
  color: rgba(161, 161, 170, 0.9);
  text-decoration: none;
}

.gol-title .gol-credit a:hover {
  color: rgba(228, 228, 231, 0.95);
  text-decoration: underline;
}

/* ——— Control bar (bottom) ——— */
.gol-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 1rem 0.65rem;
  pointer-events: auto;
  z-index: 100;
  isolation: isolate;
  overflow: visible;
}

.gol-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  padding: 0.4rem 0.85rem;
  background: rgba(18, 18, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.2);
  overflow-x: auto;
  overflow-y: visible;
}

.gol-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.gol-seed {
  gap: 0.35rem 0.5rem;
}

.gol-status-wrap {
  flex: 1;
  min-width: 0;
  margin-left: auto;
}

.gol-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717a;
  margin-right: 0.15rem;
  white-space: nowrap;
}

.gol-field {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.gol-field-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: #a1a1aa;
  min-width: 1.35em;
  white-space: nowrap;
}

.gol-field input[type="range"] {
  width: 48px;
  height: 5px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(63, 63, 70, 0.8);
  border-radius: 3px;
  pointer-events: auto;
  touch-action: none;
  cursor: pointer;
}

.gol-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.gol-field input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.08);
}

.gol-field input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.gol-field input[type="number"] {
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0.22rem 0.28rem;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  background: rgba(39, 39, 42, 0.9);
  border: 1px solid rgba(63, 63, 70, 0.8);
  border-radius: 6px;
  color: #fafafa;
  pointer-events: auto;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.gol-field input[type="number"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.gol-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.gol-actions {
  gap: 0.3rem;
}

.gol-btn {
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(63, 63, 70, 0.9);
  border: 1px solid rgba(82, 82, 91, 0.6);
  border-radius: 8px;
  color: #fafafa;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.gol-btn:hover {
  background: rgba(82, 82, 91, 0.95);
  border-color: rgba(113, 113, 122, 0.8);
}

.gol-btn:active {
  transform: scale(0.98);
}

.gol-btn-icon {
  padding: 0.32rem 0.4rem;
  font-size: 0.8rem;
  line-height: 1;
  min-width: 1.85rem;
  min-height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gol-btn-primary {
  background: linear-gradient(180deg, #fff 0%, #e4e4e7 100%);
  color: #0c0c0e;
  border-color: rgba(255, 255, 255, 0.5);
}

.gol-btn-primary:hover {
  background: linear-gradient(180deg, #fafafa 0%, #d4d4d8 100%);
  border-color: rgba(255, 255, 255, 0.6);
}

.gol-runtime {
  display: flex;
  gap: 0.25rem;
}

.gol-btn:disabled,
.gol-btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(39, 39, 42, 0.6) !important;
  border-color: rgba(63, 63, 70, 0.5) !important;
  color: #71717a !important;
}

.gol-btn-primary:disabled {
  background: rgba(63, 63, 70, 0.5) !important;
  border-color: rgba(63, 63, 70, 0.5) !important;
  color: #71717a !important;
}

.gol-status {
  margin: 0;
  font-size: 0.68rem;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


@media (min-width: 732px) {
  .gol-bar {
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .gol-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .gol-divider {
    width: 100%;
    height: 1px;
  }

  .gol-status-wrap {
    margin-left: 0;
    order: 3;
  }
}
