* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-container {
  position: relative;
}

canvas {
  display: block;
}

/* --- Bug Report Widget --- */

#seek-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

#seek-bar.seek-hidden {
  display: none;
}

#seek-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

#seek-fill {
  height: 100%;
  background: #6a6af0;
  border-radius: 3px;
  width: 0%;
  pointer-events: none;
}

#seek-time {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #8b8fa8;
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

#bug-trigger {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.5;
  padding: 4px 12px;
  min-width: 36px;
  min-height: 36px;
  transition: opacity 0.2s;
}

#bug-trigger:hover,
#bug-trigger:focus-visible {
  opacity: 1;
  outline: none;
}

#bug-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#bug-card {
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  background: #18181b;
  border-radius: 16px;
  border: 1px solid #27272a;
  padding: 24px;
  box-sizing: border-box;
}

.bug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.bug-header h2 {
  color: #fafafa;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

#bug-close {
  color: #71717a;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  line-height: 1;
}

#bug-close:hover {
  color: #fafafa;
}

.bug-toggle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.bug-toggle {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid #3f3f46;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
}

.bug-toggle.active {
  border-color: #00FF88;
  background: rgba(0, 255, 136, 0.1);
  color: #00FF88;
}

.bug-field {
  margin-bottom: 16px;
}

.bug-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #a1a1aa;
}

#bug-desc,
#bug-email {
  width: 100%;
  padding: 10px 12px;
  background: #09090b;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  color: #fafafa;
  font-size: 16px;
  box-sizing: border-box;
  font-family: inherit;
}

#bug-desc {
  resize: vertical;
  min-height: 100px;
}

#bug-desc:focus,
#bug-email:focus {
  outline: none;
  border-color: #00FF88;
}

#bug-counter {
  text-align: right;
  font-size: 11px;
  color: #52525b;
  margin-top: 4px;
}

.bug-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.bug-error {
  color: #f87171;
  font-size: 13px;
  margin: 0 0 12px;
}

.bug-hidden {
  display: none !important;
}

.bug-actions {
  display: flex;
  gap: 12px;
}

.bug-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

.bug-btn-cancel {
  border: 1px solid #3f3f46;
  background: transparent;
  color: #a1a1aa;
}

.bug-btn-cancel:hover {
  color: #fafafa;
}

.bug-btn-submit {
  border: none;
  background: #00FF88;
  color: #09090b;
  font-weight: 600;
}

.bug-btn-submit:disabled {
  background: #3f3f46;
  color: #a1a1aa;
  cursor: not-allowed;
}
