:root {
  color-scheme: dark;
  --bg: #0d0e11;
  --card: #12141a;
  --text: #f5f7fb;
  --muted: #c9ced7;
  --accent: #ff6d1f;
  --orange: #e05d1f;
  --dark: #202020;
  --green: #8dc63f;
  --header-space: 62px;
  --desktop-topcats-space: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(120% 60% at 20% 100%, rgba(54, 131, 255, 0.14) 0%, rgba(54, 131, 255, 0) 52%),
    radial-gradient(100% 60% at 100% 0%, rgba(255, 109, 31, 0.15) 0%, rgba(255, 109, 31, 0) 58%),
    linear-gradient(180deg, #12151d 0%, var(--bg) 100%);
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
}

body {
  overflow: hidden;
}

body.menu-open {
  overflow: hidden;
}

header {
  background: var(--dark);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 15px;
  height: 62px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-egg {
  width: 34px;
  height: 40px;
  background: radial-gradient(ellipse at 38% 32%, #555, #181818 65%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: inset -3px -3px 8px rgba(255, 255, 255, 0.06), 0 3px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  flex-shrink: 0;
  animation: rock 4s ease-in-out infinite;
}

.logo-egg::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 6px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  transform: rotate(-25deg);
}

@keyframes rock {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

.logo-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.logo-name em {
  color: var(--orange);
  font-style: normal;
}

.cat-nav-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.cat-nav-wrap::before,
.cat-nav-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s;
}

.cat-nav-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--dark), transparent);
  opacity: 0;
}

.cat-nav-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--dark), transparent);
}

.cat-nav-wrap.scrolled-left::before {
  opacity: 1;
}

.cat-nav-wrap.scrolled-right::after {
  opacity: 0;
}

.cat-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 4px;
  scroll-behavior: smooth;
}

.cat-nav::-webkit-scrollbar {
  display: none;
}

.cat-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s;
}

.cat-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.cat-nav a.active {
  color: #fff;
  background: var(--orange);
}

.cat-nav a .ico {
  font-size: 0.9rem;
  width: 1rem;
  min-width: 1rem;
}

.cat-more-btn {
  flex-shrink: 0;
  position: relative;
}

.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 13px;
  border-radius: 7px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}

.more-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.more-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.75);
  padding: 7px 15px;
  border-radius: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-orange {
  background: var(--orange);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-orange:hover {
  background: #c94f15;
  transform: translateY(-1px);
}

.classic-mode-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
}

.classic-mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.classic-mode-btn i {
  font-size: 0.92rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
}

.mob-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--dark);
  flex-direction: column;
  padding: 20px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mob-menu.open {
  display: flex;
}

.mob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.mob-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  cursor: pointer;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mob-menu > a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mob-link-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mob-link-group summary {
  list-style: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 13px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mob-link-group summary::-webkit-details-marker {
  display: none;
}

.mob-link-group summary::after {
  content: "+";
  margin-left: auto;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
  line-height: 1;
}

.mob-link-group[open] summary::after {
  content: "-";
}

.mob-sub-link {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 0 10px 30px;
}

@media (min-width: 992px) {
  :root {
    --desktop-topcats-space: 108px;
  }
}

@media (max-width: 991px) {
  :root {
    --desktop-topcats-space: 0px;
  }
}

.desktop-topcats {
  display: none;
}

@media (min-width: 992px) {
  .desktop-topcats {
    position: fixed;
    top: var(--header-space);
    left: 0;
    right: 0;
    z-index: 225;
    height: var(--desktop-topcats-space);
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 14px;
    padding: 14px 14px;
    background: #efebe6;
    border-bottom: 1px solid #ddd4c8;
  }

  .desktop-topcats-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(32, 32, 32, 0.56);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease;
  }

  .desktop-topcats-nav:hover {
    background: rgba(32, 32, 32, 0.78);
  }

  .desktop-topcats-card {
    width: min(920px, 100%);
    margin: 0 auto;
    min-height: 72px;
    border-radius: 28px;
    border: 1px solid #eee5d9;
    background: #ffffff;
    color: #1d2129;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 12px 20px;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.07);
  }

  .desktop-topcats-ico {
    width: 90px;
    min-width: 90px;
    height: 54px;
    border-radius: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(224, 93, 31, 0.18), rgba(224, 93, 31, 0.08));
    color: var(--orange);
    font-size: 1.5rem;
  }

  .desktop-topcats-text {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .desktop-topcats-text strong {
    font-size: clamp(1.45rem, 2.8vw, 2.05rem);
    line-height: 1.06;
    color: #141923;
    letter-spacing: -0.01em;
  }

  .desktop-topcats-text small {
    font-size: clamp(1rem, 1.75vw, 1.25rem);
    color: #9ea4ad;
    font-weight: 600;
    line-height: 1.2;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 10px 16px 12px;
    height: auto;
    min-height: 62px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .logo-name {
    font-size: 1.08rem;
  }

  .cat-nav-wrap {
    display: block;
    order: 4;
    flex-basis: 100%;
    overflow: visible;
  }

  .cat-nav-wrap::before,
  .cat-nav-wrap::after {
    display: none;
  }

  .cat-nav {
    gap: 8px;
    padding: 0;
  }

  .cat-nav a {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.72rem;
  }

  .header-right {
    display: none;
  }

  .cat-more-btn {
    display: none;
  }

  .classic-mode-btn {
    display: inline-flex;
    margin-left: auto;
  }

  .hamburger {
    display: flex;
    margin-left: 8px;
  }
}

.feed-shell {
  position: fixed;
  inset: calc(var(--header-space) + var(--desktop-topcats-space)) 0 0 0;
  width: 100%;
  height: auto;
  background: transparent;
  overflow: hidden;
}

.feed-shell::before,
.feed-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.feed-shell::before {
  inset: -4%;
  background-image: var(--feed-backdrop-image, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(34px) saturate(1.1);
  opacity: 0.58;
  transform: scale(1.12);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 26px, rgba(0, 0, 0, 0.28) 68px, rgba(0, 0, 0, 0.72) 116px, #000 170px);
  mask-image: linear-gradient(to bottom, transparent 0, transparent 26px, rgba(0, 0, 0, 0.28) 68px, rgba(0, 0, 0, 0.72) 116px, #000 170px);
}

.feed-shell::after {
  background:
    linear-gradient(180deg, rgba(10, 12, 18, 0.48) 0%, rgba(10, 12, 18, 0.14) 32%, rgba(10, 12, 18, 0.54) 100%),
    radial-gradient(110% 80% at 0% 100%, rgba(54, 131, 255, 0.12) 0%, rgba(54, 131, 255, 0) 58%),
    radial-gradient(110% 80% at 100% 0%, rgba(255, 109, 31, 0.14) 0%, rgba(255, 109, 31, 0) 55%);
}

.feed {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.2vw 0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.reel {
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  justify-items: center;
  align-items: start;
}

.reel-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  height: min(92svh, calc(100% - 0.45rem));
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  clip-path: inset(0 round 22px);
  background: var(--card);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

.reel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus-x, 50%) var(--focus-y, 44%);
  --pan-start: -1.2%;
  --pan-end: 1.5%;
  --zoom-start: 1.06;
  --zoom-peak: 1.16;
  --zoom-end: 1.08;
  border-radius: inherit;
  backface-visibility: hidden;
  will-change: transform;
  transform: scale(var(--zoom-start));
  animation: reel-pan-zoom 16s ease-in-out infinite;
}

.reel-image.is-landscape {
  --zoom-start: 1.12;
  --zoom-peak: 1.22;
  --zoom-end: 1.14;
}

.reel-image.is-portrait {
  --zoom-start: 1.03;
  --zoom-peak: 1.09;
  --zoom-end: 1.04;
}

.overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.16) 15%, rgba(8, 10, 16, 0.82) 82%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 35%);
}

.top-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
}

.category-badge,
.price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.56rem 0.9rem;
  font-weight: 700;
  font-size: clamp(0.84rem, 2.8vw, 0.98rem);
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.category-badge i,
.heart-button i {
  display: inline-grid;
  place-items: center;
  width: 1em;
  line-height: 1;
}

.category-badge {
  color: #fff;
  background: rgba(16, 19, 25, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  animation: badge-float 3.1s ease-in-out infinite;
}

.price-badge {
  color: #fff;
  background: linear-gradient(155deg, #ff9d40 0%, #ff6b1f 85%);
  border: 2px solid rgba(255, 241, 225, 0.92);
  display: inline-grid;
  place-items: center;
  gap: 0;
  font-size: clamp(0.98rem, 3.3vw, 1.14rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  min-width: 6.65rem;
  height: 2.45rem;
  padding: 0 0.9rem;
  transform-origin: center center;
  animation: price-pop 2.3s ease-in-out infinite;
}

.heart-button {
  position: absolute;
  right: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(10, 13, 18, 0.56);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.heart-button.is-liked {
  background: rgba(255, 35, 91, 0.92);
  border-color: rgba(255, 113, 153, 1);
  transform: translateY(-50%) scale(1.05);
}

.copy-wrap {
  position: absolute;
  left: 1rem;
  right: 5rem;
  bottom: 1rem;
  z-index: 3;
  color: var(--text);
}

.deal-title {
  margin: 0;
  font-size: clamp(1rem, 3.9vw, 1.45rem);
  line-height: 1.25;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-link {
  margin-top: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.64rem 1rem;
  background: rgba(255, 109, 31, 0.92);
  box-shadow: 0 8px 20px rgba(255, 109, 31, 0.28);
}

.deal-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: end center;
  padding: calc(var(--header-space) + 0.8rem) 1rem 1rem;
  background: rgba(5, 8, 14, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.deal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.deal-sheet {
  width: min(620px, 100%);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(255, 109, 31, 0.2) 0%, rgba(255, 109, 31, 0) 60%),
    linear-gradient(180deg, #191d27 0%, #12151d 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
  color: #f3f6fb;
}

.overlay-close {
  margin-left: auto;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.overlay-kicker {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bac4d4;
}

.overlay-title {
  margin: 0;
  font-size: clamp(1.05rem, 4.4vw, 1.35rem);
  line-height: 1.25;
}

.overlay-price {
  margin: 0.8rem 0 0;
  display: inline-grid;
  place-items: center;
  min-height: 2.2rem;
  min-width: 6.2rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: linear-gradient(155deg, #ff9d40 0%, #ff6b1f 85%);
  border: 2px solid rgba(255, 241, 225, 0.92);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.overlay-copy {
  margin: 0.7rem 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #d4dbea;
}

.overlay-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.overlay-cancel,
.overlay-buy {
  min-height: 2.8rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.overlay-cancel {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5fc;
}

.overlay-buy {
  background: linear-gradient(155deg, #ff9d40 0%, #ff6b1f 85%);
  color: #fff;
  border: 1px solid rgba(255, 241, 225, 0.9);
}

@media (min-width: 760px) {
  .feed {
    padding: 0 10px;
  }

  .reel-card {
    height: min(92svh, calc(100% - 0.9rem));
  }

  .heart-button {
    right: 1.2rem;
    width: 3.2rem;
    height: 3.2rem;
  }
}

@keyframes price-pop {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes badge-float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes reel-pan-zoom {
  0% {
    transform: translateX(var(--pan-start)) scale(var(--zoom-start));
  }
  35% {
    transform: translateX(var(--pan-end)) scale(var(--zoom-peak));
  }
  70% {
    transform: translateX(var(--pan-start)) scale(var(--zoom-end));
  }
  100% {
    transform: translateX(var(--pan-start)) scale(var(--zoom-start));
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-badge,
  .price-badge,
  .reel-image {
    animation: none !important;
  }
}
