
:root {
  --bg: var(--tg-theme-bg-color, #fff);
  --secondary-bg: var(--tg-theme-secondary-bg-color, #f2f2f2);
  --card: var(--tg-theme-secondary-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #000);
  --muted: var(--tg-theme-hint-color, #8a8f98);
  --accent: var(--tg-theme-button-color, #2481cc);
  --accent-text: var(--tg-theme-button-text-color, white);
  --border: rgba(15, 23, 42, .1);
  --shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; }

body {
  padding: 0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  height: 100%;
  overflow: hidden;
}

.hidden {
  display: none;
}

button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: --accent;
  color: --accent-text;
  font-size: 16px;
}

// MOBILE

html {
  -webkit-text-size-adjust: 100%;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 8vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

select {
    -webkit-appearance: none; /* Для старых версий Safari/Chrome */
  -moz-appearance: none;    /* Для Firefox */
  appearance: none;
}


.page {
  box-sizing: border-box;
  height: 100vh;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  margin: 0 auto;
  padding-top: 0;
}



.bottom-nav { position: fixed; z-index: 500; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--bg); backdrop-filter: blur(16px); }
.bottom-nav-item { display: grid; justify-items: center; gap: 3px; width: min(180px, 45vw); padding: 5px 12px; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.bottom-nav-item svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav-item.active { color: var(--accent); }


.advertLayout { position: relative; }


.alertBox {
  position: fixed;

  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));

  transform: translate(-50%, 20px);

  max-width: min(420px, calc(100vw - 32px));
  width: max-content;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 14px 16px;

  border-radius: 16px;

  background: rgba(20,20,20,.95);
  color: #fff;

  opacity: 0;
  visibility: hidden;

  transition: all .25s ease;

  z-index: 9999;
}
.alertBox.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

#backBtn {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 10000;

  padding: 8px 12px;
  border-radius: 999px;

  background: rgba(0, 0, 0, 0.55);
  color: white;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}
