html, body {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.center-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 42px 18px 32px;
  text-align: center;
}

.center-container h1 {
  margin: 0 0 22px;
}

.center-container h2 {
  margin: 22px 0 10px;
}

.center-container h4 {
  max-width: 760px;
  margin: 10px auto 14px;
  line-height: 1.35;
}

.center-container input,
.center-container select {
  width: min(520px, 92vw);
  max-width: 100%;
  padding: 10px 12px;
  margin: 8px 0;
  box-sizing: border-box;
}

.form-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0;
}

.form-row input {
  flex: 1 1 320px;
  min-width: min(320px, 92vw);
  margin: 0;
}

.center-container button.secondary,
.center-container a.button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.tab-presets {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tab-presets button.secondary {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 12px;
}

.tab-presets img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.bottom-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

@media (max-width: 600px) {
  .center-container {
    padding-top: 24px;
  }
}

.theme-cards {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 12px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.07);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
  min-width: 90px;
}

.theme-card:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-2px);
}

.theme-card.active {
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.14);
}

.theme-swatch {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.theme-label {
  font-size: 0.82em;
  opacity: 0.85;
  letter-spacing: 0.03em;
}

.transport-card {
  min-width: 120px;
  gap: 6px;
}

.transport-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.transport-sub {
  font-size: 0.72em;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.transport-compat {
  font-size: 0.68em;
  opacity: 0.5;
  letter-spacing: 0.03em;
}

.transport-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 0.65em;
  font-weight: 700;
  cursor: default;
  flex-shrink: 0;
  line-height: 1;
}

.transport-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,10,30,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 1.3em;
  font-weight: 400;
  color: #e2d6f5;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
  max-width: 220px;
  white-space: normal;
  text-align: left;
  width: max-content;
}

.transport-tip:hover::after,
.transport-tip:focus::after {
  opacity: 1;
}

.toggle-row {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.toggle-track {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-track input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  margin: 0;
  padding: 0;
}

.toggle-thumb {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  transition: background 0.2s;
}

.toggle-thumb::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.2s;
}

.toggle-track input:checked + .toggle-thumb {
  background: rgba(255,255,255,0.38);
}

.toggle-track input:checked + .toggle-thumb::after {
  transform: translateX(22px);
  background: #fff;
}

.toggle-text {
  font-size: 0.95em;
  opacity: 0.9;
}

.settings-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.settings-tab {
  padding: 8px 20px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  font-size: 0.88em;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  color: inherit;
}

.settings-tab:hover {
  background: rgba(255,255,255,0.11);
  opacity: 0.9;
}

.settings-tab.active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.4);
  opacity: 1;
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}
