:root {
  /* liteapks.com palette */
  --bg: #f1f3f4;
  --bg-soft: #e8eaed;
  --card: #ffffff;
  --card-hover: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --muted-soft: #a1a1a1;
  --green: #7bbf3a;
  --green-deep: #68a82f;
  --green-soft: #f0fdf4;
  --orange: #ff8a3d;
  --orange-deep: #f07320;
  --blue: #4a90e2;
  --blue-deep: #357abd;
  --teal: #14b8a6;
  --teal-deep: #0d9488;
  --line: rgba(32, 33, 36, 0.08);
  --shadow: 0 10px 28px rgba(32, 33, 36, 0.08);
  --radius: 22px;
  --font: "Nunito", system-ui, sans-serif;
  --header-h: 4.1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(32, 33, 36, 0.04);
}

.header-inner {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  min-width: 0;
  z-index: 46;
  color: var(--green);
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  box-shadow: 0 8px 18px rgba(123, 191, 58, 0.28);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border-radius: 0.45rem;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 60;
  flex-shrink: 0;
}

.menu-toggle__bar {
  display: block;
  width: 1.15rem;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 0;
}

.nav-label {
  display: none;
}

.nav-link {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: rgba(32, 33, 36, 0.05);
  outline: none;
}

.nav-link.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  box-shadow: 0 8px 18px rgba(123, 191, 58, 0.28);
}

.nav-backdrop {
  display: none;
}

.hero,
.featured-slot,
.toolbar,
.app-grid,
.site-footer,
.empty-state,
.error-msg,
.gate-box {
  width: min(1100px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding: 2rem 1.6rem;
  border-radius: calc(var(--radius) + 6px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: none;
  animation: rise-in 0.7s ease both;
}

.hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  color: var(--text);
}

.hero p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 3.4vw, 1.05rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.gift-hero .hero-badge {
  background: #fff4ec;
  color: var(--orange-deep);
}

.featured-slot {
  margin-bottom: 1.25rem;
}

.featured-slot .app-card--featured {
  background: var(--card);
  border-color: rgba(123, 191, 58, 0.35);
  box-shadow: 0 14px 36px rgba(123, 191, 58, 0.12);
  animation: soft-pulse 3.5s ease-in-out infinite;
}

.featured-tag {
  margin: 0 0 0.35rem;
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fff4ec;
  color: var(--orange-deep);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.toolbar {
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  letter-spacing: -0.02em;
  color: var(--text);
}

.search {
  width: min(100%, 280px);
  max-width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.search::placeholder {
  color: var(--muted-soft);
}

.search:focus {
  outline: 2px solid rgba(123, 191, 58, 0.45);
  outline-offset: 2px;
}

.app-grid {
  margin-bottom: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: rise-in 0.55s ease both;
  min-width: 0;
}

.app-card:nth-child(1) { animation-delay: 0.05s; }
.app-card:nth-child(2) { animation-delay: 0.1s; }
.app-card:nth-child(3) { animation-delay: 0.15s; }
.app-card:nth-child(4) { animation-delay: 0.2s; }
.app-card:nth-child(5) { animation-delay: 0.25s; }
.app-card:nth-child(6) { animation-delay: 0.3s; }

@media (hover: hover) {
  .app-card:hover {
    transform: translateY(-3px);
    border-color: rgba(123, 191, 58, 0.28);
    box-shadow: 0 16px 34px rgba(32, 33, 36, 0.12);
  }
}

.app-card__top {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  min-width: 0;
}

.app-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.app-card--featured .app-icon {
  width: 84px;
  height: 84px;
  border-radius: 22px;
}

.app-meta {
  min-width: 0;
  flex: 1;
}

.app-name {
  margin: 0 0 0.15rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  color: var(--text);
}

.app-card--featured .app-name {
  font-size: clamp(1.15rem, 4vw, 1.35rem);
}

.app-version {
  margin: 0 0 0.35rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
}

.app-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.app-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.88rem;
  text-align: center;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
  word-break: break-word;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
  }
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.btn-mobile {
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #ffffff;
}

.btn-tv {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #ffffff;
}

.btn-firestick {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #ffffff;
}

.btn-online {
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #ffffff;
}

.empty-state,
.error-msg,
.gate-box {
  margin-top: 2rem;
  margin-bottom: 3rem;
  padding: 1.6rem;
  text-align: center;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  box-shadow: var(--shadow);
}

.gate-box h1 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 1.5rem;
}

.gate-box p {
  margin: 0;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted-soft);
  font-size: 0.9rem;
  text-align: center;
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  opacity: 0.95;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-pulse {
  0%,
  100% {
    box-shadow: 0 14px 36px rgba(123, 191, 58, 0.12);
  }
  50% {
    box-shadow: 0 16px 40px rgba(123, 191, 58, 0.2);
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(280px, 82vw);
    height: 100dvh;
    height: 100vh;
    margin: 0;
    padding: 5rem 1.1rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.45rem;
    background: #ffffff;
    border-left: 1px solid var(--line);
    box-shadow: -16px 0 40px rgba(32, 33, 36, 0.12);
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    opacity: 1;
    transition: transform 0.25s ease, visibility 0.25s ease;
    z-index: 55;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-label {
    display: block;
    margin: 0 0 0.4rem;
    color: var(--muted-soft);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .nav-link {
    text-align: left;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    width: 100%;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(32, 33, 36, 0.35);
    display: none;
    border: 0;
    padding: 0;
    margin: 0;
  }

  .nav-backdrop:not([hidden]) {
    display: block;
  }

  body.menu-open .nav-backdrop {
    display: block;
  }
}

@media (max-width: 640px) {
  .hero {
    margin-top: 1.25rem;
    padding: 1.25rem 1rem;
  }

  .app-card {
    padding: 1rem;
  }

  .app-card__top {
    gap: 0.75rem;
  }

  .app-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .app-card--featured .app-icon {
    width: 64px;
    height: 64px;
  }

  .app-actions {
    grid-template-columns: 1fr;
  }

  .btn {
    min-height: 3rem;
    font-size: 0.95rem;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }
}

@media (min-width: 861px) {
  .menu-toggle {
    display: none !important;
  }

  .site-nav {
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .nav-backdrop {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .btn {
    min-height: 2.9rem;
  }
}
