@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600&family=ZCOOL+XiaoWei&display=swap');

:root {
  --bg-1: #f6f1e8;
  --bg-2: #f0f7ff;
  --ink: #1b1b1f;
  --muted: #5c6470;
  --accent: #e65100;
  --accent-2: #2a6df4;
  --card: rgba(255, 255, 255, 0.85);
  --shadow: 0 18px 45px rgba(20, 24, 31, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 800px at 10% -10%, #ffe9d4 0%, transparent 60%),
    radial-gradient(1200px 800px at 90% 10%, #d7e7ff 0%, transparent 55%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 60px;
}

.shell {
  width: min(1060px, 100%);
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.brand {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 248, 240, 0.9);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.brand::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(230, 81, 0, 0.25), transparent 70%);
  transform: rotate(8deg);
  pointer-events: none;
}

.brand h1 {
  margin: 0 0 8px;
  font-family: "ZCOOL XiaoWei", "STSong", serif;
  font-size: clamp(26px, 3.8vw, 36px);
  letter-spacing: 0.04em;
}

.brand p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #fff1e4;
  color: #8f4a1c;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.product {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.product::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  bottom: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 109, 244, 0.2), transparent 70%);
  pointer-events: none;
}

.product h2 {
  margin: 0;
  font-size: 22px;
}

.price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
}

.price strong {
  font-size: 28px;
  color: var(--accent-2);
}

.meta {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

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

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2f6ff;
  color: #1d3f8f;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  position: relative;
}

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

label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="text"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(60, 66, 77, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(42, 109, 244, 0.2);
}

.row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.platform-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-btn {
  border: 1px solid rgba(42, 109, 244, 0.3);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  background: #f6f9ff;
  color: #2450b4;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platform-btn.active {
  background: linear-gradient(135deg, #2a6df4, #1e4fb5);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(42, 109, 244, 0.28);
}

.actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #ff8f00);
  color: #fff;
  box-shadow: 0 12px 24px rgba(230, 81, 0, 0.25);
}

.secondary {
  background: #edf3ff;
  color: #0b3ea8;
}

button:hover {
  transform: translateY(-1px);
}

.ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid rgba(42, 109, 244, 0.35);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

.status {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  font-size: 13px;
  color: var(--muted);
  min-height: 44px;
}

.status strong {
  color: var(--ink);
}

.result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(236, 245, 255, 0.7);
  font-size: 13px;
  color: #1b2a44;
  display: none;
}

.result pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
  color: #1b1b1f;
}

.hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(27, 27, 31, 0.2);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -3px;
  margin-right: 6px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  body {
    padding: 24px 12px 40px;
  }

  .panel,
  .brand,
  .product {
    padding: 22px;
  }
}
