@font-face {
  font-family: "Atlas Grotesk Web";
  src: url("Atlas-Grotesk-Web-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Atlas Grotesk Web Regular";
  src: url("Atlas-Grotesk-Web-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background: #dbdce0;
  min-height: 100vh;
  padding: 20px;
  zoom: 0.75;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.title-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: #27272a;
  color: white;
  margin: 0;
  font-family: "Atlas Grotesk Web", sans-serif;
  font-weight: 500;
}
.background-shield {
  position: fixed;
  inset: 0;
  background: black;
  opacity: 0.7;
}
.instructions-container {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  bottom: 40px;
  margin: auto;
  max-width: 1100px;
  background: rgb(44, 44, 44);
  color: rgb(228, 228, 228);
  overflow: auto;
  font-size: 18px;
  display: none;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.instructions-container .help-button {
  position: sticky;
  display: inline-block;
  margin-left: auto;
  top: 10px;
  right: 10px;
  background: rgb(46, 46, 46);
}

.instructions-inner {
  position: relative;
  padding: 0;
  padding: 0 20px 30px;
}

.instructions-container.isVisible {
  display: block;
}

.instructions-container ul {
  padding-left: 30px;
}

/* Headings */
.instructions-container h1,
.instructions-container h2,
.instructions-container h3,
.instructions-container h4,
.instructions-container h5,
.instructions-container h6 {
  line-height: 1.3;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
}

.instructions-container h1 {
  font-size: 2em;
}
.instructions-container h2 {
  font-size: 1.6em;
}
.instructions-container h3 {
  font-size: 1.3em;
}
.instructions-container h4 {
  font-size: 1.1em;
}

/* Paragraphs */
.instructions-container p {
  margin: 0 0 1em;
}

/* Links */
.instructions-container a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Lists */
.instructions-container ul,
.instructions-container ol {
  padding-left: 1.5em;
  margin: 0 0 1em;
}

.instructions-container li {
  margin: 0.3em 0;
}

/* Blockquotes */
.instructions-container blockquote {
  margin: 1em 0;
  padding: 0.5em 1em;
  border-left: 3px solid #ccc;
  background: #f8f8f8;
}

/* Inline code */
.instructions-container :not(pre) > code {
  background: #f1f1f1;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Code blocks */
.instructions-container pre {
  background: #1e1e1e;
  color: #eee;
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
}

.instructions-container pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Tables */
.instructions-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.instructions-container th,
.instructions-container td {
  padding: 0.6em 0.8em;
  border: 1px solid #ddd;
  text-align: left;
}

.instructions-container th {
  background: #f5f5f5;
  font-weight: 600;
}

/* Images */
.instructions-container img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Horizontal rules */
.instructions-container hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 2em 0;
}

/* Strong and emphasis */
.instructions-container strong {
  font-weight: 700;
}

.instructions-container em {
  font-style: italic;
}

.help-button {
  padding: 10px;
  background: rgba(255, 255, 255, 0.135);
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.help-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.controls {
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.control-group {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.control-group label {
  font-weight: 500;
  color: #333;
  min-width: 120px;
}

#imageUpload {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  flex: 1;
  min-width: 200px;
}

.tool-btn {
  padding: 10px 20px;
  background: #a4a6a8;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
}

.tool-btn:hover {
  background: #929496;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(164, 166, 168, 0.4);
}

.tool-btn:disabled,
.tool-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: #8f9193;
}

.shortcuts-panel {
  background: #f0f2f5;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
}

.shortcuts-panel h4 {
  color: #333;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.shortcuts-panel .shortcut-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 4px 12px;
  font-size: 0.78em;
  color: #555;
  align-items: start;
}

.shortcuts-panel .shortcut-grid div {
  line-height: 1.1;
  min-height: auto;
}

.shortcuts-panel .shortcut-grid div strong {
  display: inline-block;
  margin-bottom: 2px;
  color: #333;
}

.shortcuts-panel {
  padding: 10px 10px 8px;
}

.shortcuts-panel h4 {
  margin-bottom: 6px;
  font-size: 0.88em;
}

.#satelliteModeBtn,
#groundModeBtn {
  font-weight: 700;
}

.tool-btn.active {
  background: #f63f0f;
  box-shadow: 0 5px 15px rgba(246, 63, 15, 0.4);
}

.tool-btn.clear {
  background: #f63f0f;
}

.tool-btn.clear:hover {
  background: #d9340d;
}

.tool-btn.download {
  background: #0084d1;
}

.tool-btn.download:hover {
  background: #006fae;
}

.info-text {
  margin-top: 10px;
}

.info {
  font-size: 13px;
  color: #666;
  font-style: italic;
}

#labelInput,
#editLabelInput,
#labelSide,
#defaultLabelSide {
  font-size: 14px;
  padding: 8px;
  border: 2px solid #a4a6a8;
  border-radius: 5px;
  text-transform: uppercase;
  width: 60px;
  text-align: center;
}

#labelSide,
#defaultLabelSide {
  width: 110px;
  text-transform: none;
}

#rotationInput {
  width: 180px;
  min-width: 120px;
}

#rotationValue {
  min-width: 40px;
}

#editPanel {
  display: grid;
  grid-template-columns:
    minmax(190px, max-content) minmax(240px, max-content)
    minmax(420px, 1fr);
  align-items: center;
  column-gap: 12px;
}

#editPanel .control-group {
  margin-bottom: 8px;
  gap: 8px;
}

#editPanel .control-group label {
  min-width: auto;
}

#editPanel > .control-group:last-child {
  grid-column: 2 / 4;
}

@media (max-width: 760px) {
  #editPanel {
    grid-template-columns: minmax(190px, max-content) minmax(240px, 1fr);
  }

  #rotationGroup {
    grid-column: 1 / -1;
  }

  #editPanel > .control-group:last-child {
    grid-column: 2;
  }
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #333;
}

.canvas-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: #fafafa;
  overflow: auto;
  min-height: 400px;
}

#canvas {
  border: 2px solid #ddd;
  background: white;
  cursor: crosshair;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#canvas.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
