* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: var(--foreground);
  --background: #393939;
  --secondary-background: #2a2a2a;
  --foreground: #fff1e3;
  --secondary-foreground: #fff1e390;
  --on-foreground: #fff1e3dd;
  --rounded-md: 10px;
  --margin-md: 1rem;
  --xxxs: 0.1rem;
  --xxs: 0.2rem;
  --xs: 0.5rem;
  --sm: 0.8rem;
  --md: 1rem;
  --lg: 1.5rem;
  --xl: 3rem;
  --font-md: 0.9rem;

  --toggle-width: 44px;
  --toggle-height: 24px;
  --toggle-circle: 18px;
  --accent-color: #007aff; /* iOS Blue */
  --btn-bg: #444;
}

body {
  font-family:
    "Genty Sans",
    -apple-system,
    "Roboto",
    sans-serif;
  background: var(--background);
  display: flex;
  justify-content: center;
}

.icon {
  margin-left: 0.3rem;
  margin-bottom: auto;
  width: 1rem;
  height: 1.1rem;
}
.logo {
  width: var(--lg);
  height: var(--lg);
  border-radius: 100%;
  transition: all 0.3s ease;
}
.btn {
  text-decoration: none;
  border: none;
  border-radius: var(--rounded-md);
  padding: 12px 24px;
  flex: 1;
  margin-top: var(--margin-md);
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--secondary-background);
}
.btn-reddit {
  background: #ff4500;
}
.btn-reddit:hover {
  background: #cf3700;
}
.btn-discord {
  background: #5865f2;
}
.btn-discord:hover {
  background: #424bb4;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.btn-secondary {
  background: #6c757d;
}
.btn-secondary:hover {
  background: #5a6268;
}

.container {
  background: var(--background);
  border: var(--foreground);
  border-width: 2px;
  margin: var(--md) var(--sm);
  width: 100%;
  max-width: 40rem;
  padding: var(--md);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
}

h1 {
  color: var(--foreground);
  font-size: 3em;
  font-weight: 700;
  background-color: var(--background);
  margin: 0;
  z-index: 2;
  position: relative;
  padding: 0px 1rem;
}

h2 {
  font-size: 1.2rem;
  margin-top: 0.7rem;
}

h3 {
  font-size: 1rem;
}

p {
  font-size: 0.9em;
  margin-top: 0.5rem;
}
p:first-child {
  margin-top: 0;
}

/* Configure */
.configure {
  background-color: var(--secondary-background);
  margin-top: var(--margin-md);
  border-radius: var(--rounded-md);
  padding: var(--margin-md);
}
.configure-type:first-child {
  margin-top: 0;
}
.configure-type {
  text-align: left;
  border-bottom: 2px solid var(--secondary-foreground);
  padding-bottom: var(--xxs);
  margin-top: var(--md);
}
.config-item {
  display: flex;
  text-align: left;
  justify-content: space-between;
  padding-top: var(--md);
}
.config-item label {
  cursor: pointer;
  margin-left: var(--xs);
}

input[type="checkbox"].switch {
  position: relative;
  width: 44px;
  height: 24px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--btn-bg);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
  /* prevents the flexbox from squishing the toggle */
  flex-shrink: 0;
  margin-left: 20px;
}
/* The Sliding Circle */
input[type="checkbox"].switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--foreground);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Checked States */
input[type="checkbox"].switch:checked {
  background: var(--accent-color);
}
input[type="checkbox"].switch:checked::after {
  transform: translateX(20px);
}
/* Accessibility: Keyboard Focus */
input[type="checkbox"].switch:focus-visible {
  border: 2px solid #fff;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Tom Select */
.ts-wrapper {
  margin-top: var(--xs);
  display: block;
}
.ts-control {
  background: var(--background) !important;
  color: var(--foreground) !important;
  border-color: var(--foreground) !important;
  font-size: var(--font-md) !important;
  border-radius: var(--rounded-md) !important;
}
.ts-control input {
  color: var(--foreground) !important;
  font-size: var(--font-md) !important;
}
.ts-wrapper.multi .ts-control > div {
  border-radius: var(--rounded-md);
  background: var(--secondary-background) !important;
  color: var(--foreground) !important;
  font-size: var(--font-md) !important;
  border-color: var(--foreground) !important;
}
.remove {
  border-left: none !important;
  margin: var(--xxxs) !important;
}
.ts-dropdown {
  margin-top: var(--xs) !important;
  background: var(--background) !important;
  color: var(--foreground) !important;
  font-size: var(--font-md) !important;
  border-radius: var(--rounded-md) !important;
  border: 1px solid var(--foreground) !important;
}
.ts-dropdown-content {
  max-height: 20rem !important;
}
.ts-dropdown .active {
  background: var(--secondary-background) !important;
  color: var(--foreground) !important;
  border-radius: var(--rounded-md) !important;
  margin: 0 var(--xxs);
}

/* Tooltip */
.tooltip-text {
  /* visibility: hidden; */
  display: none;
  background-color: var(--background);
  color: var(--foreground);
  max-width: 400px;
  min-width: 200px;
  border: 1px solid var(--secondary-foreground);
  text-align: left;
  border-radius: var(--rounded-md);
  padding: var(--xs) var(--md);
  position: absolute;
  bottom: 4vh;
  left: -13vw;
  z-index: 1;
}
.tooltip {
  position: relative;
  text-decoration: dotted underline;
  margin-right: auto;
  margin-left: var(--xs);
}

.tooltip:hover .tooltip-text {
  display: inline;
}

/* Radio */
.radio-group {
  margin-top: var(--margin-md);
  display: flex;
  gap: var(--md);
}
.radio-card {
  cursor: pointer;
  flex: 1;
}
/* Hide the actual radio button */
.radio-card input {
  display: none;
}
.radio-card span {
  font-size: var(--sm);
}
/* The "Card" UI */
.card-content {
  display: block;
  padding: var(--md) var(--md);
  border: 2px solid var(--secondary-foreground);
  border-radius: 8px;
  text-align: center;
  transition: all 0.2s ease;
}

/* The Selected State */
.radio-card input:checked + .card-content {
  border-color: var(--accent-color);
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent-color);
}
/* Hover Effect */
.radio-card:hover .card-content {
  background: var(--btn-bg);
}

/* Install */
.grid-btn {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
}

/* Manifest Url */
.manifest-container {
  margin-top: 1rem;
  border: 2px solid var(--foreground);
  border-radius: 0.625rem;
  padding: 0.2rem;
  display: flex;
}
.manifest-url {
  margin: auto var(--sm);
  overflow: scroll;
  width: 90%;
  text-wrap: nowrap;
  scrollbar-gutter: stable;
  scroll-behavior: unset;
  /* Hide scrollbar for Chrome, Safari and Opera */
  &::-webkit-scrollbar {
    display: none;
  }
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.copy-btn {
  background: #28a745;
  border: none;
  border-radius: var(--rounded-md);
  padding: 0.5rem 15px;
  margin: 0.2rem;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.3s ease;
  white-space: nowrap;
}
.copy-btn:hover {
  background: #218838;
}

/* Changelog */
/* The Modal (background) */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
  backdrop-filter: blur(4px);
  text-align: left;
}

/* Modal Content/Box */
.modal-content {
  width: 80vw;
  max-width: 31rem;
  max-height: 35rem;
  background-color: var(--background);
  color: var(--foreground);
  margin: 10rem auto;
  padding: var(--sm);
  border: 2px solid var(--foreground);
  border-radius: var(--rounded-md);
  display: flex;
  flex-direction: column;
}
.changelog {
  padding: 0 1.5rem;
  padding-bottom: 1rem;
  margin: var(--sm) 0;
  background-color: var(--secondary-background);
  border-radius: var(--rounded-md);
  max-width: 29.2rem;
  max-height: 28rem;
  overflow: scroll;
}
.changelog * {
  margin-top: var(--xs);
}
.changelog h2 {
  margin-top: var(--md);
}
/* The Close Button */
.close-modal {
  color: #aaa;
  display: flex;
  width: fit-content;
  justify-content: right;
  margin-right: var(--sm);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: var(--foreground);
}

.link-group {
  display: flex;
  justify-content: center;
  gap: var(--lg);
}
