@font-face {
  font-family: 'Compass';
  src: url("https://raw.githubusercontent.com/Aratox-Official/Compass.ttf-Image-Generator/main/compass.ttf") format('truetype');
  font-weight: bold;
  font-style: normal;
}

body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  transition: background-image 0.5s ease;
}

/* Dark Mode Styles */
body.dark-mode {
  color: #c9d1d9;
  background-color: #0d1117;
  background-image: url("https://raw.githubusercontent.com/Aratox-Official/Compass.ttf-Image-Generator/main/gb_stars.png");
}
.dark-mode h1 { color: #58a6ff; }
.dark-mode .controls { background-color: rgba(22,27,34,0.92); }
.dark-mode label { color: #c9d1d9; }
.dark-mode textarea,
.dark-mode input[type="number"],
.dark-mode select {
  background-color: #0d1117;
  border: 1px solid #30363d;
  color: #c9d1d9;
}
.dark-mode canvas { border: 1px solid #30363d; }
.dark-mode button {
  background-color: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
}
.dark-mode button:hover:enabled { background-color: #2c3643; }

/* Light Mode Styles */
body.light-mode {
  color: #24292e;
  background-color: #f6f8fa;
  background-image: url("https://raw.githubusercontent.com/Aratox-Official/Compass.ttf-Image-Generator/main/gb_mountains.png");
}
.light-mode h1 { color: #0366d6; }
.light-mode .controls { background-color: rgba(246,248,250,0.92); }
.light-mode label { color: #24292e; }
.light-mode textarea,
.light-mode input[type="number"],
.light-mode select {
  background-color: #f6f8fa;
  border: 1px solid #d1d5da;
  color: #24292e;
}
.light-mode canvas { border: 1px solid #d1d5da; }
.light-mode button {
  background-color: #e1e4e8;
  color: #24292e;
  border: 1px solid #d1d5da;
}
.light-mode button:hover:enabled { background-color: #d1d5da; }

/* General Styles */
h1 {
  font-family: Compass, Arial, sans-serif;
  font-size: 45px;
  text-align: center;
  margin-bottom: 40px;
}

.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.controls {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 8px;
  transition: background-color 0.5s ease;
}

label { font-weight: bold; margin-top:10px; }

textarea,
input[type="number"],
select {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 4px;
}

input[type="color"] {
  padding: 0;
  border: none;
  width: 40px;
  height: 40px;
}

#canvasContainer {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  background-color: transparent;
  display: block;
  max-width: 100%;
  height: auto;
  transition: border-color 0.5s ease;
}

button {
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
  width: 100%;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mode-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 5px;
  width: auto;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.mode-toggle:hover { background-color: rgba(255, 255, 255, 0.2); }

.light-mode .mode-toggle {
  background-color: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: black;
}
.light-mode .mode-toggle:hover { background-color: rgba(0, 0, 0, 0.2); }
