:root {
  --blue: #1f63ff;
  --blue-dark: #174be6;
  --blue-soft: #eaf2ff;
  --cyan: #2ec5ff;
  --ink: #07173f;
  --muted: #687795;
  --line: #dce6f7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --bg: #eef6ff;
  --shadow: 0 18px 48px rgba(35, 86, 156, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(92, 157, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 52%, #f9fcff 100%);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: 100vh;
  padding: 18px 18px 18px 0;
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid rgba(217, 229, 249, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #1e6fff, #62a1ff);
  box-shadow: 0 10px 24px rgba(31, 99, 255, 0.3);
}

.brand strong {
  display: block;
  font-size: 17px;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #22345d;
  font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
  color: var(--blue);
  background: #edf4ff;
  border-color: #dceaff;
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  color: var(--blue);
  background: #f4f8ff;
}

.upload-card {
  position: absolute;
  right: 16px;
  bottom: 24px;
  left: 16px;
  display: grid;
  gap: 9px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(160deg, #eef5ff, #ffffff);
  box-shadow: 0 12px 32px rgba(35, 86, 156, 0.1);
}

.upload-card strong {
  color: var(--blue);
  font-size: 15px;
}

.upload-card span {
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  padding-left: 22px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(320px, 580px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 10px 0 14px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.94), rgba(244, 249, 255, 0.7));
  backdrop-filter: blur(10px);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(50, 95, 160, 0.08);
}

.search-box input {
  width: 100%;
  height: 100%;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1a356c;
  background: #fff;
}

.icon-btn.primary {
  width: 48px;
  height: 44px;
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  border-radius: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  background: linear-gradient(135deg, #183774, #3479ff);
}

.view {
  padding-bottom: 44px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  min-height: 245px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(207, 224, 250, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.94), rgba(230, 241, 255, 0.78)),
    url("../img/hero-lines.svg");
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero h1 {
  max-width: 520px;
  margin: 0;
  font-size: 38px;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 14px 0 24px;
  color: #506384;
  font-size: 16px;
  line-height: 1.8;
}

.hero-visual {
  position: relative;
  min-height: 180px;
}

.glass-stack {
  position: absolute;
  right: 8%;
  top: 12%;
  width: 210px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(54, 125, 255, 0.85), rgba(143, 197, 255, 0.5));
  box-shadow: 0 30px 70px rgba(31, 99, 255, 0.26);
  transform: rotate(-8deg);
}

.glass-stack::before,
.glass-stack::after {
  content: "";
  position: absolute;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.glass-stack::before {
  inset: 26px 34px;
}

.glass-stack::after {
  right: -24px;
  bottom: -26px;
  width: 140px;
  height: 52px;
  background: linear-gradient(90deg, rgba(31, 99, 255, 0.16), rgba(255, 255, 255, 0.8));
}

.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat {
  min-width: 110px;
  padding: 12px 14px;
  border: 1px solid #dceaff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.stat strong {
  display: block;
  color: var(--blue);
  font-size: 18px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  border: 1px solid rgba(215, 228, 247, 0.94);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(42, 83, 145, 0.08);
}

.panel-pad {
  padding: 20px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 20px;
}

.panel-title a,
.link-btn {
  border: 0;
  color: var(--blue);
  background: transparent;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(84px, 1fr));
  gap: 10px;
}

.quick-item {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 92px;
  border: 1px solid #e0eaff;
  border-radius: 8px;
  color: #22345d;
  background: #fff;
}

.quick-item span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #69a6ff);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  overflow: hidden;
  border: 1px solid #dce7f7;
  border-radius: 8px;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  box-shadow: 0 16px 36px rgba(36, 82, 150, 0.13);
  transform: translateY(-2px);
}

.card-img {
  position: relative;
  height: 140px;
  overflow: hidden;
  background: linear-gradient(135deg, #dfeeff, #9ec5ff);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--blue);
  font-size: 12px;
  background: #eef5ff;
}

.card-img .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  background: rgba(31, 99, 255, 0.88);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  min-height: 42px;
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.45;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.price {
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
}

.side-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
}

.rank-item:hover {
  background: #f4f8ff;
}

.rank-num {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  background: var(--blue);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud span {
  padding: 7px 10px;
  border-radius: 7px;
  color: #2350a0;
  background: #eef5ff;
  font-size: 12px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filters select {
  height: 38px;
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #273c66;
  background: #fff;
}

.page-title {
  margin: 0 0 18px;
}

.page-title h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.page-title p {
  margin: 0;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(420px, 560px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.gallery-main {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #dfeeff, #94bcff);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.thumbs button {
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.28;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.detail-tags .badge {
  min-height: 30px;
  color: #1d67e8;
  background: #e5f0ff;
}

.detail-intro {
  margin: 0 0 14px;
  padding: 0;
  color: #51647f;
  font-size: 16px;
  line-height: 1.8;
}

.info-table {
  display: grid;
  gap: 8px;
  margin: 14px 0 10px;
  padding: 18px;
  border-radius: 8px;
  background: #f6f9ff;
}

.info-line {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  color: #30456f;
}

.info-line span:first-child {
  color: var(--muted);
}

.info-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1e3768;
  background: #fff;
}

.btn-primary {
  color: #fff;
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 12px 28px rgba(31, 99, 255, 0.24);
}

.btn-soft {
  color: var(--blue);
  border-color: #dceaff;
  background: #eef5ff;
}

.btn.active {
  color: #fff;
  border-color: var(--app-blue);
  background: linear-gradient(135deg, #347cff, #1f62ff);
  box-shadow: 0 12px 28px rgba(31, 99, 255, 0.24);
}

.btn-sm {
  min-width: 88px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.tabs {
  display: flex;
  gap: 22px;
  margin-top: 22px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 14px 4px;
  border: 0;
  color: #455979;
  background: transparent;
}

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

.tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--blue);
}

.tab-content {
  padding-top: 18px;
  color: #405273;
  line-height: 1.9;
}

.auth-page {
  min-height: calc(100vh - 110px);
  padding: 28px 0;
}

.auth-shell {
  max-width: 1080px;
  min-height: 640px;
  margin: 0 auto;
  padding: 56px 72px;
  border: 1px solid #dbe8fb;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.9)),
    url("../img/hero-lines.svg");
  background-size: cover;
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(320px, 1fr);
  gap: 52px;
  align-items: center;
}

.auth-form h1 {
  margin: 0 0 12px;
  font-size: 32px;
}

.auth-form p {
  margin: 0 0 28px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: #1b2f59;
  font-weight: 700;
  font-size: 14px;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #cfdcf1;
  border-radius: 8px;
  outline: 0;
  background: #fff;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 138px;
  gap: 12px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.checkbox-line input {
  width: 16px;
  height: 16px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  color: var(--blue);
}

.auth-visual {
  position: relative;
  height: 340px;
}

.shield {
  position: absolute;
  top: 54px;
  right: 70px;
  width: 190px;
  height: 220px;
  border-radius: 42px 42px 64px 64px;
  background: linear-gradient(145deg, #2f78ff, #8fc0ff);
  box-shadow: 0 30px 70px rgba(31, 99, 255, 0.28);
}

.shield::before {
  content: "";
  position: absolute;
  inset: 42px 52px 72px;
  border: 14px solid rgba(255, 255, 255, 0.86);
  border-top: 0;
  border-left: 0;
  transform: rotate(42deg);
}

.member-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.member-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid #dce7f8;
  border-radius: 8px;
  background: linear-gradient(135deg, #f4f8ff, #ffffff);
}

.member-card.featured {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #1f63ff, #63a1ff);
}

.member-card.vip {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #161c2e, #32384c);
}

.member-card h3 {
  margin: 0 0 10px;
}

.member-price {
  font-size: 28px;
  font-weight: 800;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.compare-table th,
.compare-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #e3ecfa;
  text-align: left;
}

.compare-table th {
  color: #1f3767;
  background: #f3f7ff;
}

.state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 34px;
  border: 1px dashed #c7d9f5;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 60;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: rgba(7, 23, 63, 0.92);
  box-shadow: 0 16px 36px rgba(7, 23, 63, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.hide-layout [data-layout] {
  display: none;
}

.hide-layout.app-shell {
  display: block;
  padding: 0;
}

@media (max-width: 1280px) {
  .quick-grid {
    grid-template-columns: repeat(4, minmax(84px, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 0 14px 18px;
  }

  .side-nav {
    position: static;
    height: auto;
    display: block;
    border-right: 0;
    border-bottom: 1px solid rgba(217, 229, 249, 0.88);
  }

  .nav-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .upload-card {
    position: static;
    margin-top: 14px;
  }

  .main {
    padding-left: 0;
  }

  .topbar,
  .hero,
  .section-grid,
  .detail-layout,
  .auth-card,
  .member-cards {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-end;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* App library visual refresh */
:root {
  --app-blue: #2c6bff;
  --app-blue-2: #1d79ff;
  --app-bg: #edf6ff;
  --app-card: rgba(255, 255, 255, 0.93);
  --app-text: #101a33;
  --app-muted: #697999;
  --app-line: #dfe9f8;
}

body {
  color: var(--app-text);
  background:
    linear-gradient(90deg, rgba(211, 231, 255, 0.78) 0, rgba(244, 249, 255, 0.92) 24%, rgba(247, 251, 255, 0.98) 100%),
    var(--app-bg);
}

.svg-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark .svg-icon,
.category-icon .svg-icon,
.art-cube .svg-icon {
  fill: currentColor;
  stroke: none;
}

.app-shell {
  grid-template-columns: 294px minmax(0, 1fr);
  padding: 32px 42px 32px 0;
  column-gap: 34px;
}

.side-nav {
  width: 220px;
  height: calc(100vh - 64px);
  margin-left: 74px;
  padding: 28px 18px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 28px 70px rgba(41, 93, 164, 0.13);
}

.brand {
  gap: 14px;
  margin-bottom: 32px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(160deg, #2ac9c5, #226cff 76%);
  box-shadow: 0 12px 30px rgba(44, 107, 255, 0.28);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.brand strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  margin-top: 8px;
  font-size: 14px;
}

.nav-list {
  gap: 12px;
}

.nav-item {
  position: relative;
  min-height: 50px;
  padding: 0 14px;
  grid-template-columns: 24px 1fr;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #1d2b49;
}

.nav-item.active {
  color: var(--app-blue);
  font-weight: 800;
  background: linear-gradient(90deg, #e8f2ff, rgba(245, 249, 255, 0.95));
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -18px;
  width: 4px;
  height: 34px;
  border-radius: 0 4px 4px 0;
  background: var(--app-blue);
}

.nav-icon {
  color: currentColor;
  background: transparent;
}

.upload-card {
  left: 18px;
  right: 18px;
  bottom: 292px;
  min-height: 210px;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(160deg, #edf5ff, rgba(255, 255, 255, 0.75));
  box-shadow: none;
}

.upload-card::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 112px;
  height: 92px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(80, 142, 255, 0.14), rgba(80, 142, 255, 0.34));
  transform: rotate(-8deg);
  box-shadow: 0 26px 42px rgba(44, 107, 255, 0.18);
}

.upload-card strong {
  color: var(--app-blue);
  font-size: 16px;
}

.upload-card span {
  max-width: 142px;
  color: #647695;
  font-size: 14px;
  line-height: 1.7;
}

.upload-card .btn {
  display: none;
}

.main {
  padding-left: 0;
}

.topbar {
  min-height: 58px;
  grid-template-columns: minmax(520px, 650px) auto;
  justify-content: center;
  padding: 0 0 28px;
  background: transparent;
  backdrop-filter: none;
}

.search-box {
  height: 56px;
  grid-template-columns: 1fr 116px;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 18px 38px rgba(44, 107, 255, 0.1);
}

.search-box input {
  padding-left: 24px;
  font-size: 16px;
}

.icon-btn.primary {
  width: 108px;
  height: 46px;
  margin-right: 6px;
  border-radius: 23px;
  background: linear-gradient(135deg, #3177ff, #225dff);
  font-weight: 800;
}

.icon-btn.primary span {
  white-space: nowrap;
}

.top-actions {
  position: absolute;
  right: 10px;
  gap: 18px;
}

.top-actions .icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 23px;
}

.user-chip {
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 800;
}

.avatar {
  width: 46px;
  height: 46px;
  color: #1d2b49;
  border: 1px solid #d4e2f6;
  background: #eaf3ff;
  font-weight: 800;
}

.view {
  max-width: 1600px;
}

.panel {
  border: 1px solid rgba(223, 233, 248, 0.72);
  border-radius: 18px;
  background: var(--app-card);
  box-shadow: 0 18px 55px rgba(50, 92, 148, 0.08);
}

.app-hero {
  min-height: 360px;
  align-items: center;
  grid-template-columns: minmax(560px, 1fr) 520px;
  padding: 48px 58px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 247, 255, 0.94) 63%, rgba(217, 234, 255, 0.96) 100%),
    url("../img/hero-lines.svg");
  box-shadow: 0 24px 70px rgba(50, 92, 148, 0.1);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  margin-bottom: 18px;
  border-radius: 10px;
  color: #1763ff;
  background: #e7f0ff;
  font-weight: 800;
}

.hero h1 {
  max-width: 720px;
  font-size: 42px;
  line-height: 1.25;
  font-weight: 900;
}

.hero h1::first-letter {
  color: var(--app-blue);
}

.hero p {
  max-width: 860px;
  margin: 18px 0 28px;
  font-size: 18px;
  color: #536987;
}

.hero-search {
  display: grid;
  grid-template-columns: 42px 1fr 112px;
  align-items: center;
  max-width: 590px;
  height: 58px;
  padding: 0 8px 0 18px;
  border-radius: 29px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(44, 107, 255, 0.14);
}

.hero-search span {
  color: #7485a2;
}

.hero-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.hero-search button {
  height: 44px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #3177ff, #225dff);
  font-weight: 800;
}

.hot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: #63738f;
}

.hot-row button {
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  color: #60718c;
  background: #eef4fd;
}

.hero-visual {
  min-height: 270px;
}

.case-visual {
  position: relative;
  height: 270px;
}

.case-text {
  position: absolute;
  top: 86px;
  right: 92px;
  color: rgba(51, 72, 110, 0.16);
  font-size: 40px;
  font-weight: 900;
}

.case-text span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
}

.case-folder {
  position: absolute;
  right: 80px;
  bottom: 42px;
  width: 210px;
  height: 132px;
  border-radius: 18px;
  background: linear-gradient(145deg, #357cff, #2375ff);
  box-shadow: 0 26px 70px rgba(44, 107, 255, 0.24);
}

.case-folder::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 20px;
  width: 74px;
  height: 34px;
  border-radius: 12px 12px 0 0;
  background: #4e98ff;
}

.case-folder::after {
  content: "";
  position: absolute;
  inset: -52px -48px -8px -42px;
  z-index: -1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  transform: rotate(-7deg);
}

.case-lens {
  position: absolute;
  right: 50px;
  bottom: 38px;
  width: 66px;
  height: 66px;
  border: 10px solid #fff;
  border-radius: 50%;
}

.case-lens::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -24px;
  width: 48px;
  height: 9px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(45deg);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 18px;
  margin-top: 22px;
  padding: 22px;
}

.category-tile {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 118px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  color: #16233e;
  background: transparent;
}

.category-tile.active {
  background: #edf4ff;
}

.category-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
}

.category-blue { background: #2c6bff; }
.category-orange { background: linear-gradient(135deg, #ffad69, #ff7f45); }
.category-green { background: linear-gradient(135deg, #5ed7b5, #22bd91); }
.category-purple { background: linear-gradient(135deg, #8f77ff, #7258ed); }
.category-yellow { background: linear-gradient(135deg, #ffc85a, #f4a923); }
.category-sky { background: linear-gradient(135deg, #6da2ff, #4c82f0); }
.category-pink { background: linear-gradient(135deg, #ff7fa7, #f25789); }

.category-tile strong {
  font-size: 15px;
}

.category-tile small {
  color: #7484a1;
  font-size: 14px;
}

.app-section-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  margin-top: 24px;
}

.app-panel-title h2 {
  position: relative;
  font-size: 26px;
}

.app-panel-title h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: var(--app-blue);
}

.sort-tabs {
  display: flex;
  gap: 18px;
}

.sort-tabs button {
  border: 0;
  color: #6a7a96;
  background: transparent;
  font-size: 15px;
}

.sort-tabs .active {
  color: var(--app-blue);
  font-weight: 800;
}

.app-card-grid,
.app-list-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.app-list-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  position: relative;
  border-color: #dce7f4;
  border-radius: 12px;
  box-shadow: none;
}

.product-card:hover {
  box-shadow: 0 22px 48px rgba(50, 92, 148, 0.14);
}

.card-img {
  height: auto;
  aspect-ratio: 1 / 1;
  background: #dcecff;
}

.card-img img {
  object-fit: cover;
}

.badge {
  min-height: 30px;
  border-radius: 16px;
  font-weight: 800;
}

.badge-teal { background: #20b8bd !important; }
.badge-green { background: #24b894 !important; }
.badge-blue { background: #2786f9 !important; }
.badge-cyan { background: #20b8bd !important; }
.badge-orange { background: #ff8b3d !important; }
.badge-violet { background: #7165ff !important; }

.favorite-dot {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #8999ad;
  box-shadow: 0 10px 24px rgba(32, 55, 90, 0.18);
}

.favorite-dot .svg-icon {
  width: 20px;
  height: 20px;
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  min-height: 28px;
  font-size: 18px;
  font-weight: 900;
}

.card-desc {
  height: 52px;
  margin: 0 0 16px;
  overflow: hidden;
  color: #596d8a;
  line-height: 1.7;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.mini-tags span {
  padding: 7px 12px;
  border-radius: 8px;
  color: #59708e;
  background: #edf4ff;
  font-size: 13px;
}

.meta-row {
  justify-content: flex-start;
  gap: 24px;
  color: #7385a3;
}

.app-art {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #deecfb;
}

.app-art::before {
  content: "";
  position: absolute;
  right: 42px;
  top: -42px;
  width: 142px;
  height: 142px;
  border: 1px solid rgba(75, 130, 255, 0.35);
  border-radius: 50%;
}

.art-dots i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2c6bff;
}

.art-dots i:nth-child(1) { left: 58px; top: 28px; background: #58c8b6; }
.art-dots i:nth-child(2) { right: 62px; top: 42px; background: #6c84ff; }
.art-dots i:nth-child(3) { right: 42px; bottom: 34px; background: #477cff; }

.art-cube {
  position: absolute;
  left: 42px;
  top: 54px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #fff;
  border-radius: 0;
}

.art-copy {
  position: absolute;
  left: 112px;
  top: 54px;
  color: #14223f;
}

.art-copy strong {
  display: block;
  font-size: 21px;
  font-weight: 900;
}

.art-copy span {
  display: block;
  margin-top: 7px;
  color: #6f829f;
  font-size: 11px;
}

.art-copy em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 20px;
  margin-top: 12px;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  background: #16bd98;
}

.art-folder {
  position: absolute;
  right: 54px;
  top: 46px;
  width: 98px;
  height: 76px;
  background: rgba(255, 255, 255, 0.58);
}

.art-lens {
  position: absolute;
  right: 34px;
  bottom: 46px;
  width: 46px;
  height: 46px;
  border: 8px solid #fff;
  border-radius: 50%;
}

.art-lens::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -18px;
  width: 36px;
  height: 7px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(45deg);
}

.app-art-blue .art-cube,
.app-art-blue .art-copy em { background: #2c6bff; }
.app-art-teal .art-cube,
.app-art-teal .art-copy em { background: #21b9be; }
.app-art-green .art-cube,
.app-art-green .art-copy em { background: #20bd91; }
.app-art-cyan .art-cube,
.app-art-cyan .art-copy em { background: #23b8bf; }
.app-art-orange .art-cube,
.app-art-orange .art-copy em { background: #ff9445; }
.app-art-violet .art-cube,
.app-art-violet .art-copy em { background: #675fff; }

.hot-panel .rank-item {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 48px;
  border-bottom: 1px solid #e7eef8;
}

.hot-panel .rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff8b3d;
}

.hot-panel .rank-item:nth-child(n+4) .rank-num {
  color: #8494ac;
  background: #dbe6f5;
}

.app-filterbar {
  margin-bottom: 28px;
  padding: 24px;
}

.filter-lines {
  display: grid;
  gap: 18px;
  width: 100%;
}

.filter-lines div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.filter-lines span {
  min-width: 88px;
  color: #667896;
}

.filter-lines button {
  min-width: 88px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: #263855;
  background: #eef4fd;
}

.filter-lines button.active {
  color: var(--app-blue);
  background: #dfeaff;
  font-weight: 800;
}

.category-result {
  margin-top: 0;
}

.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.list-heading h1 {
  margin: 0;
  color: #263755;
  font-size: 18px;
  font-weight: 500;
}

.list-heading b,
.list-heading strong {
  color: var(--app-blue);
}

.list-heading div {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--app-blue);
}

@media (max-width: 1440px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
    padding-right: 24px;
  }

  .side-nav {
    margin-left: 30px;
  }

  .app-list-grid,
  .app-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .side-nav {
    width: auto;
    height: auto;
    margin-left: 0;
  }

  .topbar {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .top-actions {
    position: static;
  }

  .app-hero,
  .app-section-grid {
    grid-template-columns: 1fr;
  }

  .category-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

button,
.btn,
.link-btn,
.nav-item,
.category-tile,
.product-card,
.rank-item,
.thumbs button,
.tab,
.member-card,
.top-login,
.top-register {
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
}

button:focus-visible,
.nav-item:focus-visible,
.product-card:focus-visible,
.rank-item:focus-visible {
  outline: 3px solid rgba(44, 107, 255, 0.22);
  outline-offset: 3px;
}

.is-pressing,
.is-pressed {
  transform: translateY(1px) scale(0.98) !important;
}

.btn:hover,
.link-btn:hover,
.top-login:hover,
.top-register:hover,
.hero-search button:hover,
.search-box .primary:hover {
  box-shadow: 0 14px 30px rgba(44, 107, 255, 0.2);
  transform: translateY(-2px);
}

.top-login {
  min-width: 70px;
  height: 42px;
  border: 1px solid #d7e4f7;
  border-radius: 22px;
  color: #14233f;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(42, 83, 145, 0.08);
}

.top-login:hover {
  color: var(--app-blue);
  border-color: #bed3ff;
  background: #fff;
}

.top-register {
  min-width: 78px;
  height: 42px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #347cff, #1f62ff);
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(44, 107, 255, 0.26);
}

.top-register:hover {
  background: linear-gradient(135deg, #2e74ff, #174ff0);
}

.nav-item:hover {
  color: var(--app-blue);
  background: linear-gradient(90deg, #e8f2ff, rgba(245, 249, 255, 0.96));
  border-color: rgba(194, 215, 255, 0.78);
  box-shadow: 0 12px 28px rgba(44, 107, 255, 0.1);
  transform: translateX(6px);
}

.category-tile:hover {
  background: #f2f7ff;
  box-shadow: inset 0 0 0 1px #dce9ff, 0 16px 28px rgba(50, 92, 148, 0.08);
  transform: translateY(-5px);
}

.category-tile:hover .category-icon,
.category-tile.active .category-icon {
  box-shadow: 0 14px 26px rgba(44, 107, 255, 0.22);
  transform: translateY(-2px);
}

.product-card {
  cursor: pointer;
}

.product-card:hover {
  border-color: #bad1f8;
  box-shadow: 0 28px 62px rgba(50, 92, 148, 0.18);
  transform: translateY(-8px);
}

.product-card:hover .card-img img,
.product-card:hover .app-art {
  transform: scale(1.035);
}

.card-img img,
.app-art,
.category-icon {
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.favorite-dot:hover,
.favorite-dot.active {
  background: linear-gradient(135deg, #347cff, #1f62ff);
  box-shadow: 0 16px 30px rgba(44, 107, 255, 0.28);
  transform: translateY(-3px) scale(1.06);
}

.sort-tabs button:hover,
.filter-lines button:hover,
.sort-tabs button.active,
.filter-lines button.active {
  color: var(--app-blue);
  background: #e5efff;
  box-shadow: inset 0 0 0 1px #d6e6ff;
}

.rank-item:hover {
  color: var(--app-blue);
  background: #f3f8ff;
  transform: translateX(6px);
}

.thumbs button:hover,
.thumbs button.active {
  border-color: var(--app-blue);
  box-shadow: 0 10px 24px rgba(44, 107, 255, 0.16);
  transform: translateY(-3px);
}

.tab:hover {
  color: var(--app-blue);
}

.info-line:hover {
  background: rgba(255, 255, 255, 0.72);
}

@media (min-width: 1081px) {
  .app-shell {
    width: min(1604px, calc(100vw - 64px));
    grid-template-columns: 234px minmax(0, 1344px);
    column-gap: 26px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 0;
  }

  .side-nav {
    top: 32px;
    width: 234px;
    height: calc(100vh - 64px);
    margin-left: 0;
    padding: 28px 18px;
  }

  .main {
    width: 1344px;
    max-width: 100%;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr 650px 1fr;
    gap: 22px;
    min-height: 56px;
    padding: 0 0 28px;
  }

  .search-box {
    grid-column: 2;
    width: 650px;
    justify-self: center;
  }

  .top-actions {
    position: static;
    grid-column: 3;
    justify-self: end;
    gap: 18px;
  }

  .view {
    max-width: 1344px;
  }

  .app-hero {
    grid-template-columns: minmax(0, 1fr) 500px;
    min-height: 365px;
    padding: 46px 60px;
  }

  .hero h1 {
    max-width: 720px;
  }

  .hero-search {
    max-width: 590px;
  }

  .category-strip {
    grid-template-columns: repeat(7, 1fr);
    min-height: 160px;
    margin-top: 22px;
    padding: 22px 24px;
  }

  .category-tile {
    min-height: 116px;
  }

  .app-section-grid {
    grid-template-columns: minmax(0, 902px) 384px;
    gap: 26px;
    margin-top: 24px;
    align-items: start;
  }

  .app-section-grid .panel-pad {
    padding: 24px;
  }

  .hot-panel {
    min-height: 430px;
  }

  .app-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .app-list-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }

  .detail-layout {
    grid-template-columns: 600px minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
  }

  .gallery-main {
    max-width: 600px;
    border-radius: 12px;
  }

  .detail-info {
    padding: 14px 8px 0;
  }

  .info-table {
    border-radius: 12px;
    padding: 20px;
  }
}
