/* ========== GLOBAL RESET & SCROLLBAR ========== */
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #c0c0c5 transparent; /* Subtle gray scrollbar */
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
textarea::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background-color: #c0c0c5;
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: #a8a8b3;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
/* ========== PAGE BASE ========== */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #f5f5f7; /* Light gray background */
  font-size: calc(0.5vw + 12px);
  font-family:  -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1d1d1f; /* Dark text */
  line-height: 1.6;
  overflow-x: hidden;
}
/* ========== NAVBAR ========== */
nav {
  width: 100%;
  background-color: #ffffff; /* White nav */
  border-bottom: 1px solid #e5e5e5; /* Light border */
  padding: 0.8em 1em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Subtle shadow */
  position: sticky;
  top: 0;
  z-index: 10;
}
/* ========== HEADERS & TEXT ========== */
header {
  float: right;
  text-align: right;
  padding: 0 0.8em;
  margin: 0 0.5em 0 1em;
  display: inline-block;
  color: #86868b; /* Secondary text color */
}
header div {
  text-transform: uppercase;
  font-size: 0.5em;
  letter-spacing: 0.5px;
}
/* ========== LINKS ========== */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #0066cc; /* Accent blue */
}
/* ========== BUTTONS & LABELS ========== */
button, label {
  outline: none;
  border: none;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: all 0.2s ease;
}
#support {
  float: right;
  text-align: center;
  height: 2.8em;
  width: 2.8em;
  background-color: #FF424D; /* Red support button */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
#support:hover {
  background-color: #e63946; /* Darker red on hover */
}
/* ========== TABS ========== */
.tablink {
  text-transform: uppercase;
  padding: 0.6em 1.2em;
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0.3px;
  background-color: #ffffff; /* White tab background */
  border-radius: 6px;
  margin-right: 0.3em;
}
.inactive {
  background: none;
  color: #86868b; /* Inactive tab color */
}
.inactive:focus, .inactive:hover {
  background-color: #f8f9fa; /* Light hover background */
  color: #1d1d1f; /* Dark text on hover */
}
/* ========== BUTTON STYLING ========== */
.buttons {
  font-size: 0.75em;
  border: 1px solid #d2d2d7; /* Light border */
  min-height: 2.8em;
  padding: 0 1.2em;
  margin-bottom: 0.6em;
  color: #1d1d1f; /* Dark text */
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.3px;
  background-color: #ffffff; /* White button */
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* Subtle shadow */
  transition: all 0.2s ease;
}
.buttons:focus, .buttons:hover {
  background-color: #f8f9fa; /* Light hover */
  border-color: #b8b8bb; /* Darker border on hover */
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.buttons:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
button:disabled {
  display: none;
}
/* ========== ACTIVE STATE INDICATORS ========== */
.dataButtonActive, .twodistances-first {
  position: relative;
}
.dataButtonActive:after, .twodistances-first:after {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #0066cc; /* Accent blue underline */
  content: '';
  border-radius: 2px;
}
/* ========== TEXTAREAS & INPUTS ========== */
textarea {
  width: 100%;
  height: 80vh;
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #d2d2d7; /* Light border */
  resize: vertical;
  background: #ffffff; /* White background */
  color: #1d1d1f; /* Dark text */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}
.tabinput {
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  margin: 0;
  padding: 1.2em;
}