/* Theme switcher styles (neutral, inherit theme variables) */
.theme-switcher {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  display: flex;
  justify-content: flex-end;
  z-index: 1000;
}

.theme-switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--tg-theme-hint-color, rgba(120,120,140,0.4));
  background: var(--tg-theme-secondary-bg-color, rgba(255,255,255,0.08));
  color: var(--tg-theme-text-color, #ddd);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-switcher-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.theme-switcher-btn:active {
  transform: translateY(0);
}

.theme-menu {
  position: absolute;
  bottom: 44px;
  right: 0;
  background: var(--tg-theme-secondary-bg-color, rgba(0,0,0,0.7));
  color: var(--tg-theme-text-color, #e0e0ff);
  border: 1px solid var(--tg-theme-hint-color, rgba(120,120,140,0.4));
  border-radius: 10px;
  min-width: 200px;
  padding: 6px;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.theme-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.theme-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  font-size: 14px;
  position: relative;
  padding-right: 32px;
}

.theme-item:hover {
  background: rgba(127,127,255,0.12);
}

.theme-item:active {
  background: rgba(127,127,255,0.18);
}

.theme-item.active {
  background: rgba(127,127,255,0.14);
}

.theme-item.active::after {
  content: "✓";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tg-theme-link-color, #7bf2ff);
  font-weight: 700;
}


.platform-instruction .button,
.platform-instruction a.button,
.platform-instruction .button.small {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  margin: 0;
  align-self: flex-start;
}

.platform-instruction .button { min-width: 0; }

.container a:not(.button):not(.theme-item) {
  color: var(--tg-theme-link-color, var(--accent-primary, #7bf2ff));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.container a:not(.button):not(.theme-item):visited {
  color: var(--tg-theme-link-color, var(--accent-primary, #7bf2ff));
}

.container a:not(.button):not(.theme-item):hover {
  filter: brightness(1.1);
}
