.pipes-header {
  overflow: hidden;
  display: flex;
  gap: 500px;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.pipe-header {
  position: fixed;
  width: 50px;
  height: 20px;
  background: transparent;
}
.pipe-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--silver-bg-pipe);
  border-radius: inherit;
  filter: blur(1px);
  z-index: -1;
}

.header {
  display: flex;
  justify-content: center;
  position: fixed;
  top: constant(safe-area-inset-top);
  top: env(safe-area-inset-top, 0);
  width: 800px; 
  padding: 5px;
  background:
    var(--controls-bg),
    var(--main-container-bg-inside);
  box-shadow: 
    0 5px 10px rgba(0, 0, 0, 0.6),
    var(--container-shadow);
  border-radius: 0 0 0.75em 0.75em;
  border-bottom: 3px solid var(--border-color-main);
  transition: all 0.5s ease;
  z-index: 100;
}
.header.scrolled {
  top: calc(env(safe-area-inset-top, 0px) + 5px);
  border-radius: var(--border-radius);
}

body.in-app-browser .header {
  top: max(env(safe-area-inset-top, 0px), 20px);
}
body.in-app-browser .header.scrolled {
  top: calc(max(env(safe-area-inset-top, 0px), 20px) + 5px);
}

.header-limit {
  width: 100%;
  display: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 5px;
}

.btn.buy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: bold;
  font-size: var(--main-font-size);
  color: var(--btn-text-color);
  min-width: 72px;
  height: 41px;
}

#menuButton.active .buy-label {
  display: none;
}

.btn.login-button {
  width: 40px;
  height: 41px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--main-font-size);
  cursor: not-allowed;
  opacity: 0.6;
}

.buy-wrapper {
  width: 100%;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s ease, padding 0.5s ease;
  padding: 0 var(--main-padding-gap);
  box-sizing: border-box;
}
.header.expanded .buy-wrapper {
  max-height: 600px;
  padding: var(--main-padding-gap);
  overflow: hidden;
}
.buy-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  font-family: var(--screen-font-family);
  color: var(--secondary-text-color);
  overflow: hidden;
  background: var(--content-bg);
  border-radius: var(--screen-border-radius);
}
.buy-panel-header {
  font-size: 1rem;
  letter-spacing: 2px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 8px;
}
.buy-links-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.buy-exchange-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--secondary-text-color);
  border-radius: var(--mini-screen-border-radius);
  font-size: 1.2rem;
  letter-spacing: 2px;
  transition: background 0.15s ease;
  border: 1px solid transparent;
}
.buy-exchange-link:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}
.buy-exchange-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.buy-link-arrow {
  margin-left: auto;
  opacity: 0.5;
  font-size: 0.85rem;
}
.buy-guide {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 10px;
}
.buy-guide-title {
  font-size: 0.85rem;
  letter-spacing: 1px;
  opacity: 0.55;
  margin-bottom: 6px;
}
.buy-guide-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  opacity: 0.75;
  line-height: 1.9;
}
.buy-guide-steps strong {
  color: var(--secondary-text-color);
  opacity: 1;
}

.logo-text {
  display: inline-block;
  white-space: nowrap;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 50px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--logo-text-color-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 3px rgba(0, 0, 0, 0.20);
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,.4))
    drop-shadow(0 2px 2px rgba(0,0,0,.35))
    drop-shadow(0 0 4px rgba(0,255,0,.25));
  cursor: default;
  user-select: none;
}
.logo-text::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    z-index: -1;
    color: rgba(0,0,0,.35);
    transform: translateY(2px);
    filter: blur(2px);
}

@media (max-width: 768px) {
  .header {
    width: 95%;
  }
  .logo-text {
    font-size: 27px;
  }
  .btn.buy-button {
    font-size: var(--mobile-font-size);
    min-width: 45px;
    height: 28px;
  }
  .btn.login-button {
    font-size: var(--mobile-font-size);
    width: 28px;
    height: 28px;
  }
}