/* guns.lol-style profile — variable names match reference */

:root {
  --font-body: "Rubik", system-ui, sans-serif;
  --font-display: "Rubik", system-ui, sans-serif;
  --textColor: #ffffff;
  --textColorDarker: rgba(255, 255, 255, 0.5);
  --backgroundColor: #ffffff;
  --containerColor: rgba(22, 22, 28, 0.72);
  --containerBlur: 16px;
  --containerGradient: linear-gradient(
    25deg,
    rgba(12, 12, 12, 0),
    rgba(0, 0, 0, 0)
  );
  --containerRadius: 9px;
  --containerPadding: 10px;
  --buttonBackground: rgba(255, 255, 255, 0.22);
  --buttonBorder: 1px solid rgba(255, 255, 255, 0.14);
  --buttonRadius: 9px;
  --buttonBackgroundHover: rgba(255, 255, 255, 0.32);
  --buttonBorderHover: 2px solid rgba(255, 255, 255, 0.25);
  --buttonUrlColor: rgba(255, 255, 255, 0.65);
  --avatarBorder: 2px solid rgba(255, 255, 255, 0.4);
  --colorUsernameGlow: 0 0 10px rgba(255, 255, 255, 0.35);
  --border: rgba(255, 255, 255, 0.07);
  --modernLayoutSeperator: rgba(255, 255, 255, 0.12);
  --audioPlayerBar: rgba(255, 255, 255, 0.35);
  --progessBarFull: rgba(255, 255, 255, 0.3);
  --progessBarPlaying: #ffffff;
  --controlButtonsOther: rgba(255, 255, 255, 0.5);
  --controlButtonPlaying: #ffffff;
  --controlTextColor: rgba(255, 255, 255, 0.7);
  --audioIconBackground: rgba(255, 255, 255, 0.2);
}

::selection {
  background: #ffffff;
  color: #ffffff;
}

::-moz-selection {
  background: #ffffff;
  color: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #000000;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--textColor);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

button,
input,
select,
textarea,
a.gl-btn {
  font-family: inherit;
}

/* Full-screen background — above .guns-bg-overlay (z-1) so video/image is visible */
.guns-bg-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: #000000;
}

.guns-bg-layer--fallback {
  background: #000000;
}

.guns-bg-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: blur(8px) brightness(0.7);
}

/* Full-viewport video (no .guns-bg-media — that class adds blur/scale to images) */
.guns-bg-video-root {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center center;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  filter: none;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  background: #000;
  isolation: isolate;
}

.guns-bg-audio,
.guns-track-audio {
  position: fixed;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.guns-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  /* Sits under the video layer; subtle dim for letterboxing / transparency */
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.guns-rain {
  position: fixed;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
  background: transparent !important;
}

.main-stage {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  background: transparent !important;
}

.main-stage.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 12, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.splash-screen.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.splash-screen.is-hidden {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-screen__inner {
  text-align: center;
  padding: 1.25rem;
  max-width: 22rem;
}

.splash-screen__hint {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--textColor);
}

.guns-page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.35rem;
  perspective: 1200px;
  perspective-origin: center center;
  background: transparent !important;
}

#main {
  background: transparent !important;
}

.guns-card-tilt {
  width: 100%;
  max-width: min(34rem, calc(100vw - 0.75rem));
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .guns-card-tilt {
    transition: none;
    transform: none !important;
  }
}

.guns-card {
  position: relative;
  width: 100%;
  max-width: min(34rem, calc(100vw - 0.75rem));
  max-height: calc(100vh - 0.65rem);
  letter-spacing: 0.015em;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--containerPadding);
  border-radius: var(--containerRadius);
  background: var(--containerColor);
  background-image: var(--containerGradient);
  backdrop-filter: blur(var(--containerBlur));
  -webkit-backdrop-filter: blur(var(--containerBlur));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.45),
    0 16px 36px -12px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: translateZ(0);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.guns-card::-webkit-scrollbar {
  display: none;
}

@keyframes gunsCardEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guns-card-enter {
  animation: gunsCardEnter 0.4s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .guns-card-enter {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-ready .gl-reveal {
  opacity: 0;
  animation: revealUp 0.5s ease forwards;
  animation-delay: var(--reveal-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .page-ready .gl-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.gl-card-stack {
  position: relative;
  padding-top: 0;
}

/* Volume — same surface as .guns-card, nudged toward top-right corner */
.guns-volume-dock.guns-volume-dock--in-card {
  position: absolute;
  top: 0.18rem;
  right: 0.12rem;
  left: auto;
  z-index: 8;
  width: min(11.25rem, calc(100% - 0.9rem));
  max-width: 92%;
  pointer-events: auto;
}

.guns-volume-dock__card {
  padding: 0.35rem 0;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.guns-volume-dock__head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0;
  border-bottom: none;
}

.guns-volume-dock__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--textColor);
  opacity: 0.9;
}

.guns-volume-dock__icon-svg {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
  pointer-events: none;
}

.guns-volume-dock__title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--textColorDarker);
  border-bottom: none;
  box-shadow: none;
}

.gl-volume {
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
}

/* Dock range: fixed track + thumb sizes so WebKit thumb centers on the track */
.gl-volume.gl-volume--dock {
  --vol-track-h: 6px;
  --vol-thumb: 14px;
  --vol-thumb-mt: calc((var(--vol-track-h) - var(--vol-thumb)) / 2);
  display: block;
  width: 100%;
  height: 1.75rem;
  min-height: 1.75rem;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}

.gl-volume.gl-volume--dock::-webkit-slider-runnable-track {
  height: var(--vol-track-h);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.gl-volume.gl-volume--dock::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: var(--vol-thumb);
  height: var(--vol-thumb);
  margin-top: var(--vol-thumb-mt);
  border-radius: 50%;
  background: var(--backgroundColor);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.gl-volume.gl-volume--dock::-moz-range-track {
  height: var(--vol-track-h);
  border-radius: 3px;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
}

.gl-volume.gl-volume--dock::-moz-range-thumb {
  box-sizing: border-box;
  width: var(--vol-thumb);
  height: var(--vol-thumb);
  border-radius: 50%;
  background: var(--backgroundColor);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

/* Profile head */
.gl-profile-head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0;
}

.gl-avatar-wrap {
  flex-shrink: 0;
}

.gl-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: var(--avatarBorder);
  display: block;
  transition: border-color 0.2s ease, filter 0.2s ease;
}

.gl-avatar:hover {
  border-color: rgba(255, 255, 255, 0.65);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
}

.gl-avatar--empty {
  background: rgba(255, 255, 255, 0.08);
}

.gl-name-block {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.gl-username {
  margin: 0 0 0.1rem;
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0.04em;
  color: var(--textColor);
  text-shadow: var(--colorUsernameGlow);
}

.gl-username .gl-typewriter-text {
  white-space: pre-wrap;
}

.gl-username .gl-tw-cursor {
  display: inline-block;
  margin-left: 2px;
  font-weight: 600;
  animation: twBlink 0.5s step-end infinite;
  color: var(--textColor);
}

@keyframes twBlink {
  50% {
    opacity: 0;
  }
}

.gl-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 0.3rem;
}

.gl-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ba55d;
  animation: statusPulse 2s ease infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.55);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(59, 165, 93, 0);
  }
}

.gl-status-text {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--textColorDarker);
  border-bottom: none;
  text-decoration: none;
  box-shadow: none;
}

.gl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0.35rem;
}

.gl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.gl-desc {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0.015em;
  color: var(--textColor);
}

.gl-meta {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--textColorDarker);
}

/* Audio player */
.gl-audio-player {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.45rem;
  padding: 4px 6px;
  border-radius: var(--buttonRadius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.gl-audio-cover-wrap {
  flex-shrink: 0;
}

.gl-audio-cover {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--audioIconBackground);
}

.gl-audio-cover--empty {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 5px;
}

.gl-audio-body {
  flex: 1;
  min-width: 0;
}

.gl-audio-title {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--controlTextColor);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gl-audio-bar-wrap {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--progessBarFull);
  overflow: hidden;
  cursor: pointer;
}

.gl-audio-bar-bg {
  position: absolute;
  inset: 0;
  background: var(--audioPlayerBar);
}

.gl-audio-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--progessBarPlaying);
  transition: width 0.1s linear;
}

.gl-audio-play {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: var(--audioIconBackground);
  color: var(--controlButtonPlaying);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s;
}

.gl-audio-play:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.28);
}

.gl-audio-play-icon {
  font-size: 1rem;
  letter-spacing: -0.05em;
  line-height: 1;
}

.gl-audio-play.is-playing .gl-audio-play-icon {
  letter-spacing: -2px;
}

/* Separator */
.gl-separator {
  margin: 0.4rem 0;
  border: none;
  border-top: 1px solid var(--modernLayoutSeperator);
}

/* First rule under profile (after name / онлайн): hide thin line */
.gl-profile-head + .gl-separator,
.gl-profile-head + .gl-audio-ent + .gl-separator {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

.gl-profile-head + .gl-separator + .gl-social-row,
.gl-profile-head + .gl-separator + .gl-section,
.gl-profile-head + .gl-audio-ent + .gl-separator + .gl-social-row,
.gl-profile-head + .gl-audio-ent + .gl-separator + .gl-section {
  margin-top: 0.42rem;
}

/* Social row */
.gl-social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 0.1rem 0 0.28rem;
}

.gl-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  filter: drop-shadow(#a3a3a3 1px 0 7px);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.gl-social-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 6px;
}

.gl-social-icon--emoji {
  font-size: 1.3rem;
  text-decoration: none;
}

.gl-social-emoji {
  line-height: 1;
}

.gl-social-icon:hover {
  transform: scale(1.06);
  filter: drop-shadow(var(--gl-social-hover, #a3a3a3) 1px 0 12px);
}

/* Sections */
.gl-section-title {
  margin: 0 0 0.22rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--textColorDarker);
}

.gl-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gl-row {
  display: grid;
  grid-template-columns: 20px minmax(52px, auto) 1fr auto;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 8px;
  border-radius: var(--buttonRadius);
  background: var(--buttonBackground);
  border: var(--buttonBorder);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.gl-row:hover {
  background: var(--buttonBackgroundHover);
  border: var(--buttonBorderHover);
  transform: scale(1.01);
}

.gl-config-row {
  grid-template-columns: 20px minmax(72px, auto) 1fr auto;
}

.gl-device-row--single {
  grid-template-columns: 28px minmax(72px, auto) 1fr auto;
}

.gl-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-align: center;
  opacity: 0.9;
  line-height: 1.2;
}

.gl-device-icon-svg {
  width: 1.15em;
  height: 1.15em;
  display: block;
  flex-shrink: 0;
}

.gl-device-icon-img {
  width: 1.15em;
  height: 1.15em;
  display: block;
  object-fit: contain;
}

.gl-device-icon-fallback {
  display: inline-block;
  min-width: 0.5em;
  text-align: center;
}

.gl-row-icon--cfg {
  font-size: 1.05rem;
}

.gl-cfg-icon-svg {
  width: 1.15em;
  height: 1.15em;
  display: block;
  flex-shrink: 0;
  color: var(--textColor, rgba(232, 240, 255, 0.92));
}

.gl-cfg-icon-img {
  width: 1.15em;
  height: 1.15em;
  display: block;
  object-fit: contain;
  opacity: 0.92;
  filter: brightness(1.05);
}

.gl-cfg-icon-fallback {
  display: inline-block;
  min-width: 0.5em;
  text-align: center;
}

.gl-row-cat {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--textColorDarker);
}

.gl-row-meta {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--textColorDarker);
}

.gl-row-name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--textColor);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gl-row-link {
  color: var(--buttonUrlColor);
  text-decoration: none;
}

.gl-row-link:hover {
  color: var(--textColor);
}

.gl-row-action {
  justify-self: end;
}

.gl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 6px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--textColor);
  background: var(--buttonBackground);
  border: var(--buttonBorder);
  border-radius: var(--buttonRadius);
  cursor: pointer;
  transition: background 0.15s ease, border 0.15s ease, transform 0.15s ease;
}

.gl-btn:hover {
  background: var(--buttonBackgroundHover);
  border: var(--buttonBorderHover);
  transform: scale(1.02);
}

.gl-btn--sm {
  padding: 4px 8px;
  font-size: 0.85rem;
}

.btn-download-row__svg {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  display: block;
}

/* Device row: compact block + inline expanding buy panel (no overlap) */
.gl-device-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border-radius: var(--buttonRadius);
  background: var(--buttonBackground);
  border: var(--buttonBorder);
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gl-device-row:hover {
  background: var(--buttonBackgroundHover);
  border: var(--buttonBorderHover);
}

.gl-device-row.is-buy-open {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.gl-device-row__main {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 0.4rem;
  min-height: 2.35rem;
  padding: 0.32rem 0.42rem;
}

.gl-device-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
}

.gl-device-row .gl-row-cat {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1;
}

.gl-device-row .gl-row-name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.96);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Buy — compact pill toggle */
.device-buy-wrap {
  position: relative;
}

.device-buy-wrap .btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1.2;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.device-buy-wrap .btn-buy:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.device-buy-wrap .btn-buy.is-open {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.42);
}

.device-buy-wrap .btn-buy:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.device-buy-wrap .btn-buy__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.device-buy-wrap .btn-buy__chev-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.device-buy-wrap .btn-buy__chev-inner--up {
  display: none;
}

.device-buy-wrap .btn-buy.is-open .btn-buy__chev-inner--down {
  display: none;
}

.device-buy-wrap .btn-buy.is-open .btn-buy__chev-inner--up {
  display: inline-flex;
}

.device-buy-wrap .btn-buy__chev-svg {
  width: 0.95em;
  height: 0.95em;
  display: block;
  vertical-align: middle;
}

@media (prefers-reduced-motion: reduce) {
  .device-buy-wrap .btn-buy {
    transition: none;
  }
}

.buy-panel {
  flex: 0 0 auto;
  display: block;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.buy-panel.is-open {
  max-height: 9.5rem;
}

.buy-panel__inner {
  padding: 3px 4px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.2);
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 9.5rem;
}

.buy-panel__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.buy-chip {
  position: relative;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--textColor);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  overflow: hidden;
  max-width: 100%;
  min-height: 0;
}

.buy-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 55%
  );
  opacity: 0.5;
  pointer-events: none;
}

.buy-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.buy-chip__label {
  position: relative;
  z-index: 1;
  line-height: 1.2;
  text-align: left;
  min-width: 0;
}

.buy-chip__go {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0.55;
  color: rgba(180, 210, 255, 0.95);
}

.buy-chip__go-svg {
  width: 0.95em;
  height: 0.95em;
  display: block;
  flex-shrink: 0;
}

.buy-chip--wb {
  border-color: rgba(142, 36, 170, 0.45);
  box-shadow: 0 0 18px -6px rgba(142, 36, 170, 0.45);
}

.buy-chip--ozon {
  border-color: rgba(0, 91, 255, 0.45);
  box-shadow: 0 0 18px -6px rgba(0, 91, 255, 0.35);
}

.buy-chip--amazon {
  border-color: rgba(255, 153, 0, 0.4);
}

.buy-chip--ym {
  border-color: rgba(252, 213, 53, 0.35);
}

.buy-chip--temu {
  border-color: rgba(255, 94, 58, 0.5);
  box-shadow: 0 0 18px -6px rgba(255, 120, 70, 0.35);
}

/* Never let inline SVG blow up the card (safety net) */
.guns-card svg {
  max-width: 24px;
  max-height: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .buy-panel {
    transition: none;
  }
}

.gl-rows--links .gl-link-row {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.gl-link-label {
  flex: 1;
  font-size: 1.02rem;
  letter-spacing: 0.015em;
  color: var(--textColor);
}

.gl-link-arrow {
  color: var(--textColorDarker);
}

/* About / projects / skills */
.rich-text .about-body {
  font-size: 1.02rem;
  color: var(--textColorDarker);
  line-height: 1.45;
  letter-spacing: 0.015em;
}

.rich-text .about-body a {
  color: var(--textColor);
}

.gl-project-grid {
  display: grid;
  gap: 4px;
}

.gl-project-card-link {
  display: block;
  border-radius: var(--buttonRadius);
  overflow: hidden;
  border: var(--buttonBorder);
  background: var(--buttonBackground);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.gl-project-card-link:hover {
  transform: scale(1.02);
  border: var(--buttonBorderHover);
}

.gl-project-img-wrap {
  aspect-ratio: 16 / 9;
  background: #000;
}

.gl-project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gl-project-body {
  padding: 5px 7px;
}

.gl-project-title {
  margin: 0 0 0.15rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--textColor);
}

.gl-project-desc {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.015em;
  color: var(--textColorDarker);
}

.gl-skill-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.gl-skill-tag {
  padding: 3px 8px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tag) 40%, transparent);
  background: color-mix(in srgb, var(--tag) 12%, transparent);
  color: var(--tag);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: var(--textColor);
  z-index: 10000;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 8px;
}

.skip-link:focus {
  left: 1rem;
  outline: 2px solid #fff;
}

@media (max-width: 520px) {
  .gl-profile-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .gl-name-block {
    width: 100%;
  }

  .gl-username {
    font-size: 1.72rem;
    font-weight: 900;
    line-height: 1.22;
    letter-spacing: 0.04em;
  }

  .gl-row:not(.gl-config-row) {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .gl-device-row__main {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: auto;
  }

  .gl-device-row__main .gl-row-action {
    justify-self: stretch;
  }

  .gl-device-row__main .device-buy-wrap {
    width: 100%;
  }

  .gl-device-row__main .btn-buy {
    width: 100%;
    max-width: none;
  }

  .gl-row.gl-config-row {
    grid-template-columns: 20px 1fr;
    grid-template-areas:
      "icon meta"
      "name name"
      "btn btn";
    align-items: center;
  }

  .gl-config-row .gl-row-icon {
    grid-area: icon;
  }

  .gl-config-row .gl-row-meta {
    grid-area: meta;
  }

  .gl-config-row .gl-row-name {
    grid-area: name;
  }

  .gl-config-row .gl-btn {
    grid-area: btn;
    justify-self: stretch;
    text-align: center;
  }

  .gl-row-action {
    justify-self: stretch;
  }
}
