* {
  box-sizing: border-box;
}

:root {
  --bg: #f6f9ff;
  --ink: #0f172f;
  --muted: #7e879d;
  --blue: #2f74ff;
  --purple: #8a55f6;
  --card: rgba(255, 255, 255, 0.84);
  --line: rgba(214, 222, 242, 0.7);
  --shadow: 0 18px 42px rgba(44, 63, 118, 0.12);
}

html {
  min-height: 100%;
  background: #e9eef8;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-rounded, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 98% 20%, rgba(127, 103, 255, 0.15) 0 16%, transparent 17%),
    radial-gradient(circle at 72% 2%, rgba(136, 101, 250, 0.16) 0 28%, transparent 29%),
    linear-gradient(145deg, #ffffff 0%, var(--bg) 46%, #eef5ff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px 106px;
  overflow: hidden;
  background:
    radial-gradient(circle at 112% 10%, rgba(138, 96, 255, 0.13) 0 23%, transparent 24%),
    radial-gradient(circle at 105% 36%, rgba(128, 129, 255, 0.12) 0 16%, transparent 17%);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 30px;
  text-align: center;
}

.status-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #050816;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-icons svg {
  width: 20px;
  height: 20px;
  color: #050816;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-icons svg:nth-child(2) {
  fill: none;
}

.status-icons .battery {
  width: 28px;
  height: 18px;
  fill: none;
}

.status-icons .battery rect:last-child {
  fill: currentColor;
}

.search-button {
  position: absolute;
  top: 58px;
  right: -9px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #0c1327;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(36, 45, 84, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.search-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.apple-stack {
  position: relative;
  width: 94px;
  height: 94px;
  margin-top: 34px;
  filter: drop-shadow(0 18px 18px rgba(62, 84, 201, 0.25));
  transform: rotate(-1deg);
}

.stack-layer {
  position: absolute;
  left: 11px;
  width: 72px;
  height: 58px;
  border-radius: 18px;
  transform: rotate(45deg) skew(-9deg, -9deg);
  box-shadow: inset -12px -14px 26px rgba(33, 33, 126, 0.2), inset 8px 10px 20px rgba(255, 255, 255, 0.28);
}

.layer-back {
  top: 34px;
  background: linear-gradient(140deg, #2b5dff 0%, #7b4ff0 52%, #132074 100%);
}

.layer-mid {
  top: 24px;
  background: linear-gradient(140deg, #3d86ff 0%, #9f5ef8 62%, #2e2b9d 100%);
}

.layer-front {
  top: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #68a8ff 0%, #8363ff 48%, #5b32d9 100%);
}

.layer-front svg {
  width: 31px;
  height: 31px;
  color: white;
  fill: currentColor;
  transform: rotate(-45deg) skew(9deg, 9deg);
  filter: drop-shadow(0 4px 7px rgba(62, 31, 150, 0.24));
}

.hero h1 {
  margin: 15px 0 4px;
  font-size: clamp(28px, 7vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 198px;
  height: 50px;
  margin-top: 21px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #2670ff 0%, #8c4ef3 100%);
  box-shadow: 0 14px 24px rgba(67, 105, 240, 0.28);
}

.primary-cta svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section {
  margin-top: 6px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-header h2,
.premium-banner h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #7d4dff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.view-all svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-card {
  min-height: 88px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 13px;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 13px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.category-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  box-shadow: 0 12px 18px rgba(51, 91, 190, 0.2);
}

.category-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-blue {
  background: linear-gradient(135deg, #2574ff, #5d8cff);
}

.icon-purple {
  background: linear-gradient(135deg, #6e56f7, #a84cf5);
}

.icon-pink {
  background: linear-gradient(135deg, #ff5c94, #ef3f84);
}

.icon-orange {
  background: linear-gradient(135deg, #ffb03b, #ff8c16);
}

.icon-green {
  background: linear-gradient(135deg, #35dd93, #22bf74);
}

.icon-dark-blue {
  background: linear-gradient(135deg, #2949e9, #6176ff);
}

.category-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.category-copy strong {
  overflow: hidden;
  color: #18213a;
  font-size: 13.2px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-copy small {
  color: #7a849a;
  font-size: 11px;
  line-height: 1.18;
  font-weight: 500;
}

.chevron {
  width: 14px;
  height: 14px;
  color: #8c95a8;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.premium-banner {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: stretch;
  margin-top: 16px;
  padding: 21px 0 21px 19px;
  overflow: hidden;
  border-radius: 17px;
  color: #ffffff;
  background:
    radial-gradient(circle at 90% 24%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(135deg, #103d9f 0%, #2348d8 50%, #6684ff 100%);
  box-shadow: 0 20px 44px rgba(26, 63, 176, 0.28);
}

.premium-banner::before,
.premium-banner::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.premium-banner::before {
  width: 250px;
  height: 250px;
  right: -112px;
  top: -80px;
}

.premium-banner::after {
  width: 170px;
  height: 170px;
  right: 74px;
  bottom: -95px;
}

.premium-copy {
  position: relative;
  z-index: 2;
  width: 53%;
}

.premium-copy p {
  max-width: 194px;
  margin: 8px 0 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.42;
  font-weight: 500;
}

.premium-typing {
  min-height: 55px;
}

.premium-typing::after {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: rgba(255, 255, 255, 0.92);
  content: "";
  animation: typingCursorBlink 0.72s steps(1, end) infinite;
}

.premium-typing.is-typing-done::after {
  opacity: 0;
  animation: none;
}

.premium-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 0 16px;
  border-radius: 11px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #ffffff 0%, #8ee8ff 16%, #5d7cff 38%, #9d5cff 62%, #ff6bd5 82%, #ffffff 100%);
  background-size: 260% 260%;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 20, 96, 0.32);
  box-shadow: 0 12px 26px rgba(14, 42, 119, 0.2), 0 0 0 rgba(109, 142, 255, 0);
  transform: translateZ(0);
  transition: transform 0.28s ease, filter 0.28s ease;
  animation: premiumButtonGradient 3.2s ease-in-out infinite, premiumButtonGlow 1.85s ease-in-out infinite;
  isolation: isolate;
}

.premium-button::before {
  position: absolute;
  content: "";
  pointer-events: none;
}

.premium-button::before {
  inset: -45% -22%;
  background: linear-gradient(110deg, transparent 26%, rgba(255, 255, 255, 0.72) 46%, transparent 66%);
  transform: translateX(-78%) rotate(8deg);
  animation: premiumButtonShine 2.45s ease-in-out infinite;
}

.premium-button:hover {
  transform: translateY(-4px) scale(1.06);
  filter: brightness(1.12) saturate(1.2);
}

.premium-button:active {
  transform: translateY(-1px) scale(0.98);
  filter: brightness(1.02) saturate(1.08);
}

.premium-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.76);
  outline-offset: 3px;
}

.premium-button svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0, 26, 112, 0.34));
  animation: premiumButtonIcon 1.2s ease-in-out infinite;
}

@keyframes premiumButtonGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes premiumButtonGlow {
  0%,
  100% {
    box-shadow: 0 12px 26px rgba(14, 42, 119, 0.2), 0 0 0 rgba(109, 142, 255, 0);
  }

  50% {
    box-shadow: 0 18px 32px rgba(14, 42, 119, 0.3), 0 0 22px rgba(255, 118, 220, 0.56);
  }
}

@keyframes premiumButtonShine {
  0% {
    transform: translateX(-88%) rotate(8deg);
    opacity: 0;
  }

  24%,
  62% {
    opacity: 0.95;
  }

  100% {
    transform: translateX(88%) rotate(8deg);
    opacity: 0;
  }
}

@keyframes premiumButtonIcon {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  50% {
    transform: translateY(-2px) rotate(-8deg) scale(1.12);
  }
}

@keyframes typingCursorBlink {
  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-button,
  .premium-button::before,
  .premium-button svg,
  .premium-img,
  .premium-typing::after {
    animation: none;
  }

  .premium-typing::after {
    opacity: 0;
  }
}

.premium-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.premium-img {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: right bottom;
  transform-origin: right bottom;
  animation: premiumImageBreath 3.6s ease-in-out infinite;
}

@keyframes premiumImageBreath {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.045);
  }
}

.glow-card {
  position: absolute;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: linear-gradient(135deg, rgba(117, 137, 255, 0.32), rgba(178, 81, 255, 0.15));
  transform: rotate(-24deg);
}

.card-one {
  width: 158px;
  height: 72px;
  right: 5px;
  bottom: 13px;
}

.card-two {
  width: 114px;
  height: 58px;
  right: 95px;
  bottom: -24px;
}

.mock-device {
  position: absolute;
  right: -22px;
  bottom: -18px;
  width: 205px;
  height: 98px;
  padding: 11px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(246, 250, 255, 0.48), rgba(38, 53, 167, 0.55));
  box-shadow: -18px 8px 40px rgba(12, 29, 109, 0.38);
  transform: perspective(330px) rotateX(47deg) rotateZ(-16deg);
}

.device-screen {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  padding: 13px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(70, 93, 221, 0.94), rgba(86, 128, 239, 0.72));
}

.device-screen span,
.device-screen i {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.device-screen span {
  height: 17px;
}

.device-screen i {
  height: 8px;
}

.popular {
  margin-top: 19px;
}

.resource-card {
  min-height: 78px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 12px 17px rgba(10, 18, 46, 0.2);
}

.swiftui-icon {
  position: relative;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(145deg, #151a3a, #061127);
  box-shadow: 0 12px 17px rgba(10, 18, 46, 0.2);
}

.mark {
  position: absolute;
  display: block;
  width: 10px;
  height: 38px;
  border-radius: 999px;
  transform-origin: bottom center;
}

.mark-pink {
  left: 13px;
  top: 8px;
  background: linear-gradient(#ff776f, #bc4fff);
  transform: rotate(30deg);
}

.mark-blue {
  right: 13px;
  top: 8px;
  background: linear-gradient(#41bfff, #4c6aff);
  transform: rotate(-30deg);
}

.mark-purple {
  left: 17px;
  top: 19px;
  height: 29px;
  background: linear-gradient(#e55cff, #7854ff);
  transform: rotate(-30deg);
}

.resource-copy h3 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.resource-copy p {
  margin: 0;
  color: #7c8496;
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 500;
}

.resource-meta {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.pill {
  padding: 5px 8px;
  border-radius: 7px;
  color: #7759ff;
  background: #f0ecff;
  font-size: 10px;
  font-weight: 750;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #697289;
  font-size: 11px;
  font-weight: 650;
}

.rating svg {
  width: 11px;
  height: 11px;
  color: #ffb72b;
  fill: currentColor;
}

.qq-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.qq-modal:target {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 15, 35, 0.48);
  backdrop-filter: blur(14px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 330px);
  padding: 26px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 70px rgba(17, 27, 68, 0.26);
  backdrop-filter: blur(20px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #697289;
  background: #f4f6fb;
}

.modal-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.modal-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 3px auto 15px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff5c94, #ef3f84);
  box-shadow: 0 16px 26px rgba(239, 63, 132, 0.26);
}

.modal-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.modal-panel p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.modal-actions {
  display: grid;
  gap: 10px;
}

.modal-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #2670ff 0%, #8c4ef3 100%);
  box-shadow: 0 12px 24px rgba(67, 105, 240, 0.22);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 9px 22px 22px;
  border-top: 1px solid rgba(210, 218, 234, 0.72);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 -14px 34px rgba(47, 62, 103, 0.08);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-nav::after {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 132px;
  height: 4px;
  border-radius: 999px;
  background: #050505;
  content: "";
  transform: translateX(-50%);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #7d8499;
  font-size: 10.5px;
  font-weight: 600;
}

.nav-item svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active {
  color: var(--blue);
}

.nav-item.active svg {
  fill: currentColor;
  stroke: currentColor;
}

@media (max-width: 390px) {
  .app-shell {
    padding-inline: 18px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 78px;
    grid-template-columns: 48px minmax(0, 1fr) 16px;
  }

  .premium-copy {
    width: 60%;
  }

  .mock-device {
    right: -72px;
  }
}

@media (min-width: 431px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    border-radius: 34px;
    box-shadow: 0 24px 80px rgba(20, 37, 86, 0.18);
  }

  .bottom-nav {
    bottom: 24px;
    border-radius: 0 0 34px 34px;
  }
}
