:root {
  --ink: #15171a;
  --muted: #66707a;
  --line: #e6ebef;
  --paper: #f5f7fa;
  --white: #ffffff;
  --gold: #f0b429;
  --red: #e64b3c;
  --green: #12a779;
  --blue: #2864d8;
  --dark: #111827;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 6vw;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border-radius: 8px;
}

.nav {
  display: flex;
  gap: 30px;
  color: #333b45;
  font-size: 15px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 430px);
  gap: 52px;
  align-items: center;
  padding: 82px 6vw;
  background:
    linear-gradient(120deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.5)),
    repeating-linear-gradient(135deg, #263142 0 16px, #1f2937 16px 32px);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
  line-height: 1.8;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 650px;
  margin-top: 34px;
  padding: 8px;
  background: var(--white);
  border-radius: 8px;
}

.search-bar input {
  min-width: 0;
  border: 0;
  padding: 0 16px;
  font: inherit;
  outline: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.button.primary {
  color: var(--white);
  background: var(--red);
}

.button.secondary {
  color: var(--red);
  background: #fff1ef;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

.hero-stats span {
  padding: 13px 16px;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.hero-stats strong {
  display: block;
  color: var(--white);
  font-size: 24px;
}

.deal-board {
  padding: 22px;
  color: var(--ink);
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.board-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.board-top span {
  color: var(--muted);
}

.deal-board article {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.deal-board article:last-child {
  border-bottom: 0;
}

.deal-board article span,
.muted {
  color: var(--muted);
}

.deal-board article strong {
  color: var(--red);
  font-size: 22px;
}

.notice {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 6vw;
  background: #fff7df;
  border-bottom: 1px solid #f8dfa2;
}

.notice span {
  flex: 0 0 auto;
  padding: 5px 10px;
  color: #7a4b00;
  background: #ffe7a3;
  border-radius: 8px;
  font-weight: 900;
}

.notice p {
  margin: 0;
  color: #60440b;
  line-height: 1.6;
}

.section {
  padding: 78px 6vw;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading.row {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.category {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.category.active {
  color: var(--white);
  background: var(--dark);
  border-color: var(--dark);
}

.accounts {
  background: var(--white);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.account-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
}

.account-card.hidden {
  display: none;
}

.card-media {
  display: flex;
  align-items: end;
  min-height: 150px;
  padding: 20px;
  color: var(--white);
  font-size: 28px;
  font-weight: 900;
}

.card-media img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin: -20px;
}

.card-media.short {
  background: linear-gradient(135deg, #111827, #e64b3c);
}

.card-media.facebook {
  background: linear-gradient(135deg, #1b4f9c, #1877f2);
}

.card-media.bm {
  background: linear-gradient(135deg, #111827, #2864d8);
}

.card-media.instagram {
  background: linear-gradient(135deg, #7c3aed, #f43f5e 56%, #f59e0b);
}

.card-media.tiktok {
  background: linear-gradient(135deg, #111827, #00d1ff 48%, #ff3366);
}

.card-media.mail {
  background: linear-gradient(135deg, #0f9d58, #4285f4);
}

.card-media.page {
  background: linear-gradient(135deg, #1877f2, #12a779);
}

.card-media.social {
  background: linear-gradient(135deg, #ff4f78, #ff9f1c);
}

.card-media.shop {
  background: linear-gradient(135deg, #e64b3c, #f0b429);
}

.card-media.game {
  background: linear-gradient(135deg, #2864d8, #6c4bd8);
}

.card-media.local {
  background: linear-gradient(135deg, #12a779, #2864d8);
}

.card-media.video {
  background: linear-gradient(135deg, #07a0c3, #12a779);
}

.card-body {
  padding: 20px;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.card-title h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.card-title span {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--red);
  background: #fff1ef;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.card-body p,
.guarantee p,
.contact p {
  color: var(--muted);
  line-height: 1.7;
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

dl div {
  padding: 10px;
  background: var(--paper);
  border-radius: 8px;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.guarantee-grid article {
  min-height: 220px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.guarantee-grid strong {
  color: var(--red);
}

.contact {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 56px;
  padding: 78px 6vw;
  color: var(--white);
  background: var(--dark);
}

.order-check {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
  padding: 78px 6vw;
  background: #fff7df;
  border-top: 1px solid #f8dfa2;
}

.order-check p {
  color: #60440b;
  line-height: 1.75;
}

.order-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border: 1px solid #f8dfa2;
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(96, 68, 11, 0.08);
}

.order-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.order-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}

.order-result {
  min-height: 24px;
  margin: 0;
  color: #60440b;
  font-weight: 800;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.62);
}

.detail-dialog {
  position: relative;
  width: min(720px, 100%);
  padding: 30px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.detail-grid div,
.detail-note {
  padding: 16px;
  background: var(--paper);
  border-radius: 8px;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.detail-note p {
  margin: 8px 0 0;
}

.admin-page {
  background: #eef2f6;
}

.admin-nav {
  align-items: center;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.text-button.danger {
  color: var(--red);
}

.file-action {
  position: relative;
  overflow: hidden;
}

.file-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-shell {
  padding: 54px 6vw 80px;
}

.admin-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-intro h1 {
  color: var(--ink);
}

.admin-intro p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.admin-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
}

.admin-list,
.admin-editor {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.admin-list-head h2 {
  font-size: 22px;
}

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

.product-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  background: var(--paper);
  cursor: pointer;
}

.product-list-item.active {
  color: var(--white);
  background: var(--dark);
  border-color: var(--dark);
}

.product-list-item span {
  color: var(--muted);
}

.product-list-item.active span {
  color: rgba(255, 255, 255, 0.72);
}

.product-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.product-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.product-form .wide,
.image-preview,
.form-actions {
  grid-column: 1 / -1;
}

.product-form input,
.product-form textarea,
.product-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 15px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}

.image-preview {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed #b9c4ce;
  border-radius: 8px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.save-status {
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 15px 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 6vw;
  color: var(--muted);
  background: var(--white);
}

.footer span {
  color: var(--ink);
  font-weight: 900;
}

.footer p {
  margin: 0;
}

.telegram-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 12px 16px 12px 12px;
  color: var(--white);
  background: #229ed9;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(34, 158, 217, 0.34);
}

.telegram-float:hover {
  background: #168bc4;
}

.telegram-icon {
  display: block;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  overflow: hidden;
  background: #0ea5d7;
  border-radius: 8px;
}

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

.telegram-float strong,
.telegram-float small {
  display: block;
}

.telegram-float strong {
  font-size: 15px;
  line-height: 1.2;
}

.telegram-float small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 6vw 20px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 15px 0;
  }

  .hero,
  .order-check,
  .contact,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-intro {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 640px) {
  .site-header,
  .hero,
  .section,
  .order-check,
  .contact,
  .notice,
  .footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .search-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .search-bar input {
    min-height: 44px;
  }

  .notice,
  .section-heading.row,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .account-grid,
  .guarantee-grid,
  .product-form,
  dl {
    grid-template-columns: 1fr;
  }

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

  .telegram-float {
    right: 18px;
    bottom: 18px;
    min-width: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .telegram-float:hover {
    background: transparent;
  }

  .telegram-icon {
    width: 58px;
    height: 58px;
    background: transparent;
  }

  .telegram-float span:last-child {
    display: none;
  }
}
