:root {
  --accent: #059669;
  --accent-dark: #047857;
  --muted: #6b7280;
  --ink: #0f172a;
  --panel: rgba(255, 255, 255, 0.95);
  --line: rgba(15, 23, 42, 0.1);
  --red: #dc2626;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 110%, rgba(8, 145, 178, 0.18), transparent 30%),
    linear-gradient(180deg, #040b18 0%, #08182f 56%, #020813 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  background:
    radial-gradient(ellipse at bottom, rgba(15, 60, 88, 0.36), rgba(2, 6, 23, 0.97) 66%),
    linear-gradient(180deg, #040b18, #08182f 58%, #01050d);
}

.site {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.admin-link,
.button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.link-button:hover,
.admin-link:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: #334155;
}

.button.danger {
  background: #dc2626;
}

.card,
.hero,
.notice,
.admin-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 14px;
  box-shadow:
    0 8px 30px rgba(2, 6, 23, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.38) inset;
  backdrop-filter: blur(7px) saturate(120%);
}

.hero {
  padding: 22px 18px;
  text-align: center;
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
}

.hero p {
  margin: 10px auto 0;
  max-width: 900px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.hero-subline {
  margin: 12px auto 0;
  max-width: 980px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.hero-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.22);
}

.hero-link-button:hover {
  background: var(--accent-dark);
}

.section {
  margin: 26px 0;
}

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

.section h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

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

.card {
  padding: 16px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 36px rgba(2, 6, 23, 0.36),
    0 1px 0 rgba(255, 255, 255, 0.44) inset;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.42;
  font-weight: 800;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  color: var(--red);
  font-weight: 800;
  line-height: 1.5;
  white-space: pre-line;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.feature-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.feature-list li::before {
  content: "· ";
}

.device-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
  background: #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.notice {
  padding: 18px;
  text-align: center;
  color: var(--red);
  font-weight: 800;
  line-height: 1.7;
  font-size: 18px;
}

.notice p {
  margin: 4px 0;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.12);
}

.field,
.select,
.textarea {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  outline: 0;
}

.field:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(5, 150, 105, 0.58);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.textarea-compact {
  min-height: 54px;
}

.country-group-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.country-card {
  display: flex;
  align-items: center;
  min-height: 74px;
  gap: 12px;
}

.flag {
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.country-meta {
  flex: 1;
  min-width: 0;
}

.country-name {
  font-weight: 800;
}

.country-price {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.country-contact {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.footer {
  margin: 28px 0 10px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  line-height: 1.7;
  font-size: 13px;
}

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(8, 145, 178, 0.16), transparent 36%),
    linear-gradient(180deg, #f8fafc, #eef2f7);
  color: var(--ink);
}

.admin-body .site {
  width: min(1180px, calc(100% - 28px));
}

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

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-login {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
}

.admin-login-card {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-login-card h1 {
  margin: 0;
  font-size: 28px;
}

.admin-login-card p {
  margin: 8px 0 20px;
  color: var(--muted);
}

.admin-loading-card {
  text-align: center;
}

.login-form {
  display: grid;
  gap: 14px;
}

.admin-back-link {
  display: inline-flex;
  margin-top: 18px;
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.admin-header h1 {
  margin: 0;
  font-size: 26px;
}

.admin-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-panel {
  padding: 18px;
  margin-bottom: 18px;
}

.admin-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

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

.form-row {
  display: grid;
  gap: 7px;
}

.form-row label {
  color: #334155;
  font-weight: 700;
  font-size: 14px;
}

.editor-list {
  display: grid;
  gap: 14px;
}

.editor-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.savebar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(8px);
}

.status {
  color: var(--muted);
  font-weight: 700;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 860px) {
  .grid,
  .country-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .price-row,
  .admin-header,
  .admin-actions,
  .savebar {
    align-items: stretch;
    flex-direction: column;
  }

  .controls {
    flex-direction: column;
  }

  .hero-subline {
    flex-direction: column;
  }
}
