:root {
  --ink: #1f2235;
  --muted: #75798d;
  --line: #e9e9f2;
  --surface: rgba(255, 255, 255, 0.94);
  --purple: #6556d9;
  --purple-dark: #5143c2;
  --purple-soft: #f2f0ff;
  --telegram: #279bd7;
  --red: #ef5350;
  --green: #1da675;
  --green-soft: #e9f8f2;
  --gray-soft: #f2f3f6;
  --amber: #b57616;
  --shadow: 0 22px 60px rgba(54, 47, 118, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f7f7fc; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(111, 92, 224, 0.16), transparent 36%),
    linear-gradient(180deg, #fbfaff 0, #f7f7fc 430px, #f7f7fc 100%);
  overflow-x: hidden;
}

button, input { font: inherit; }
a { color: inherit; }
.page-glow { position: fixed; border-radius: 999px; filter: blur(70px); opacity: .32; pointer-events: none; z-index: -1; }
.glow-one { width: 360px; height: 360px; background: #b8a9ff; top: -150px; left: -120px; }
.glow-two { width: 300px; height: 300px; background: #c5e6ff; top: 150px; right: -130px; }

.hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px 24px 34px;
  text-align: center;
}
.brand-row { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; color: white; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(145deg, #7969ed, #5040c0);
  box-shadow: 0 10px 24px rgba(91, 75, 207, .32);
}
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--purple-dark); background: var(--purple-soft);
  border: 1px solid #e3dfff; border-radius: 999px;
  padding: 7px 12px; font-size: 13px; font-weight: 700;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(29, 166, 117, .12); }
.hero h1 { margin: 18px 0 12px; font-size: clamp(34px, 5.6vw, 56px); line-height: 1.12; letter-spacing: -2px; }
.hero p { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: 16px; line-height: 1.8; }

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.subscribe-card, .monitor-card, .notice-card {
  background: var(--surface);
  border: 1px solid rgba(229, 227, 241, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.subscribe-card { padding: 22px; margin-bottom: 22px; }
.subscribe-copy { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.section-icon {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  border-radius: 13px; color: var(--purple); background: var(--purple-soft);
}
.section-icon svg, .button svg, .search-wrap svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.subscribe-copy h2 { margin: 0 0 4px; font-size: 18px; }
.subscribe-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.subscribe-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; }
.subscribe-form input[type="email"] {
  width: 100%; min-width: 0; height: 46px; border: 1px solid #dedfeb; border-radius: 9px;
  padding: 0 14px; outline: none; color: var(--ink); background: white;
  transition: border-color .2s, box-shadow .2s;
}
.subscribe-form input[type="email"]:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(101, 86, 217, .12); }
.button {
  min-height: 46px; border: 0; border-radius: 9px; padding: 0 17px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: white; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .16s, box-shadow .16s, opacity .16s;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { background: linear-gradient(135deg, #7162e5, #5b4bc8); box-shadow: 0 8px 18px rgba(91, 75, 200, .22); }
.button.telegram { background: linear-gradient(135deg, #32abe2, #208fc9); box-shadow: 0 8px 18px rgba(39, 155, 215, .2); }
.button[disabled] { opacity: .6; cursor: wait; transform: none; }
.form-message { min-height: 20px; margin-top: 8px; font-size: 13px; color: var(--green); }
.form-message.error { color: var(--red); }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; left: -10000px !important; opacity: 0 !important; }

.monitor-card { overflow: hidden; margin-bottom: 18px; }
.monitor-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 24px 18px; }
.monitor-kicker { color: var(--purple); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; margin-bottom: 5px; }
.monitor-head h2 { margin: 0; font-size: 22px; letter-spacing: -.4px; }
.source-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.state-dot { width: 9px; height: 9px; border-radius: 50%; background: #aaa; }
.source-state.ok .state-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(29, 166, 117, .11); }
.source-state.error .state-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(239, 83, 80, .1); }
.source-state.checking .state-dot { background: var(--purple); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }

.toolbar { padding: 0 24px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.search-wrap { position: relative; width: min(390px, 100%); }
.search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; color: #989bad; }
.search-wrap input {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 13px 0 40px; background: #fafaff; outline: none;
}
.search-wrap input:focus { border-color: #c2bbf4; background: white; box-shadow: 0 0 0 3px rgba(101, 86, 217, .09); }
.filters { display: inline-flex; padding: 4px; background: #f3f3f8; border-radius: 10px; }
.filter { border: 0; background: transparent; color: #737689; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 700; }
.filter span { margin-left: 3px; opacity: .7; }
.filter.active { background: white; color: var(--purple-dark); box-shadow: 0 2px 7px rgba(55, 56, 84, .1); }

.table-shell { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
thead { background: linear-gradient(90deg, #6b5bd8, #7666df); color: white; }
th { text-align: left; padding: 14px 17px; font-size: 13px; font-weight: 700; }
td { padding: 15px 17px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
tbody tr { transition: background .16s; }
tbody tr:hover { background: #fbfaff; }
.product-name { display: flex; align-items: center; gap: 11px; min-width: 185px; }
.region-badge {
  width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center;
  border-radius: 10px; color: var(--purple-dark); background: var(--purple-soft); font-size: 11px; font-weight: 900;
}
.product-title { font-weight: 800; color: #292b40; word-break: break-word; }
.product-region { margin-top: 3px; color: var(--muted); font-size: 11px; }
.spec-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 340px; }
.spec-chip { background: #f5f5f9; color: #626577; border: 1px solid #ececf2; border-radius: 6px; padding: 4px 7px; font-size: 11px; white-space: nowrap; }
.price { font-weight: 900; font-size: 15px; color: #2e3044; white-space: nowrap; }
.cycle { color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 3px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 7px 10px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.status-pill.in_stock { color: #147653; background: var(--green-soft); }
.status-pill.in_stock::before { background: var(--green); }
.status-pill.out_of_stock { color: #7c7f8c; background: var(--gray-soft); }
.status-pill.out_of_stock::before { background: #a2a5af; }
.status-pill.unknown { color: var(--amber); background: #fff7e7; }
.status-pill.unknown::before { background: #d99a34; }
.buy-button { display: inline-flex; align-items: center; justify-content: center; min-width: 82px; padding: 8px 12px; border-radius: 7px; background: var(--red); color: white; font-weight: 800; text-decoration: none; font-size: 12px; box-shadow: 0 6px 14px rgba(239, 83, 80, .18); }
.buy-button.disabled { background: #d7d8df; color: #8b8e9a; box-shadow: none; pointer-events: none; }
.loading-row td { height: 160px; text-align: center; color: var(--muted); }
.loading-row td span { margin-left: 10px; }
.loader { display: inline-block; width: 22px; height: 22px; border: 3px solid #e3e0f8; border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.mobile-cards { display: none; }
.empty-state { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: #4a4c60; margin: 8px 0 5px; }
.empty-icon { font-size: 34px; color: #b1abc9; }
.update-bar { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 13px 24px; color: var(--muted); font-size: 12px; background: #fafafe; }
.update-bar strong { color: #55586b; }
.text-button { border: 0; background: transparent; color: var(--purple); font-weight: 700; cursor: pointer; padding: 0; }
.text-button[disabled] { opacity: .55; cursor: wait; }

.notice-card { display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; box-shadow: none; background: rgba(255,255,255,.7); }
.notice-icon { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; display: grid; place-items: center; background: var(--purple-soft); color: var(--purple); font-weight: 900; font-family: Georgia, serif; }
.notice-card p { margin: 1px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
footer { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 34px 18px 40px; color: #9295a5; font-size: 12px; }
.footer-dot { opacity: .45; }
.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; }

@media (max-width: 760px) {
  .hero { padding: 30px 18px 26px; }
  .brand-row { margin-bottom: 25px; }
  .hero h1 { letter-spacing: -1.3px; }
  .container { width: min(100% - 22px, 1120px); }
  .subscribe-card { padding: 18px; }
  .subscribe-form { grid-template-columns: 1fr 1fr; }
  .subscribe-form input[type="email"] { grid-column: 1 / -1; }
  .monitor-head { align-items: flex-start; padding: 20px 18px 15px; }
  .monitor-head h2 { font-size: 19px; }
  .source-state { margin-top: 4px; }
  .toolbar { flex-direction: column; align-items: stretch; padding: 0 18px 16px; }
  .search-wrap { width: 100%; }
  .filters { align-self: flex-start; }
  .table-shell { display: none; }
  .mobile-cards { display: grid; gap: 11px; padding: 0 12px 12px; border-top: 1px solid var(--line); padding-top: 12px; }
  .mobile-product { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: white; }
  .mobile-product-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
  .mobile-product .product-name { min-width: 0; }
  .mobile-product .region-badge { width: 34px; height: 34px; flex-basis: 34px; }
  .mobile-price-row { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line); }
  .mobile-actions { display: flex; align-items: center; gap: 8px; }
  .mobile-product .spec-list { margin-top: 12px; max-width: none; }
  .update-bar { flex-wrap: wrap; justify-content: flex-start; gap: 7px 14px; padding: 13px 17px; }
}

@media (max-width: 430px) {
  .subscribe-form { grid-template-columns: 1fr; }
  .subscribe-form input[type="email"] { grid-column: auto; }
  .button { width: 100%; }
  .monitor-head { flex-direction: column; gap: 9px; }
  .filters { width: 100%; }
  .filter { flex: 1; }
  footer { flex-wrap: wrap; }
}
