/* WinAutoX Plaza — contemporary product-gallery UI */
@import url("https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --surface: #ffffff;
  --bg: #f3f4f6;
  --canvas: #fafafa;
  --accent: #0d9488;
  --accent-bright: #14b8a6;
  --accent-deep: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-glow: rgba(20, 184, 166, 0.22);
  --coral: #f97316;
  --danger: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 12px 32px rgba(17, 24, 39, 0.06);
  --shadow-hover: 0 12px 40px rgba(17, 24, 39, 0.12);
  --font: "Sora", "Noto Sans SC", "PingFang SC", sans-serif;
  --shell: 1280px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-bright); }

.wrap {
  width: min(var(--shell), calc(100% - 48px));
  margin: 0 auto;
}

.wrap.narrow { width: min(720px, calc(100% - 48px)); }

/* —— Top nav —— */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(250, 250, 250, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
  width: min(var(--shell), calc(100% - 48px));
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink) !important;
  flex-shrink: 0;
}

.brand-text {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, #2dd4bf 0%, #0d9488 55%, #0f766e 100%);
  box-shadow: 0 6px 16px var(--accent-glow);
  position: relative;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px 8px 9px 12px;
  border: 2.5px solid #fff;
  border-radius: 3px;
  border-left: none;
  transform: skewX(-14deg);
}

.top nav {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.top nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
}

.top nav a:hover,
.top nav a.is-active {
  color: var(--ink);
  background: rgba(17, 24, 39, 0.05);
}

.auth-slot {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

.auth-slot .user-chip {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-weight: 600;
}

/* —— Buttons —— */
.btn,
.auth-slot button,
.search button,
.mine-tabs button,
.filter-tabs button {
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn,
.auth-slot button:not(.ghost),
.search button {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.18);
}

.btn:hover,
.auth-slot button:not(.ghost):hover,
.search button:hover {
  transform: translateY(-1px);
  background: #000;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.22);
}

.btn.ghost,
.auth-slot .ghost {
  background: #fff;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.ghost:hover,
.auth-slot .ghost:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
}
a.btn.ghost { color: var(--ink-soft); }
.auth-slot a.btn {
  text-decoration: none;
}

/* —— Hero —— */
.hero-band {
  position: relative;
  overflow: hidden;
  padding: 56px 0 48px;
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(45, 212, 191, 0.18), transparent 60%),
    radial-gradient(700px 380px at 90% 20%, rgba(249, 115, 22, 0.1), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
  border-bottom: 1px solid var(--line);
}

.hero-band__glow {
  position: absolute;
  inset: auto auto -40% 30%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.16), transparent 68%);
  pointer-events: none;
  animation: floatGlow 8s ease-in-out infinite;
}

.hero-band__inner {
  position: relative;
  text-align: center;
  animation: rise 0.6s ease both;
}

.hero-eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  background: rgba(204, 251, 241, 0.85);
  border: 1px solid rgba(45, 212, 191, 0.35);
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.08;
  color: var(--ink);
}

.hero-sub {
  margin: 0 auto 28px;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 500;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.search--hero {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 8px 8px 18px;
}

.search-ico {
  color: #9ca3af;
  flex-shrink: 0;
}

.search input,
.auth-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}

.auth-form input {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.search input::placeholder { color: #9ca3af; }

.search button {
  padding: 11px 20px;
  font-size: 14px;
}

/* —— Plaza list —— */
.plaza-main {
  padding: 28px 0 80px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
}

.filter-tabs button {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  padding: 8px 16px;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.filter-tabs button.active {
  color: #fff;
  background: var(--ink);
  box-shadow: none;
}

.filter-bar {
  position: relative;
  z-index: 3;
}

.list-meta {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* —— Cards —— */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  animation: rise 0.55s ease both;
  text-decoration: none !important;
}

a.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: #cfd4dc;
}

.card-preview {
  position: relative;
  height: 190px;
  background:
    linear-gradient(160deg, #ecfeff 0%, #f0fdf4 42%, #fff7ed 100%);
  overflow: hidden;
}

.card-preview__stage {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  width: 112px;
  height: 196px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
  overflow: hidden;
}

.card-preview__notch {
  height: 10px;
  margin: 8px auto 0;
  width: 36px;
  border-radius: 999px;
  background: #e5e7eb;
}

.card-preview__screen {
  margin: 10px 8px 0;
  display: grid;
  gap: 6px;
}

.card-preview__screen span {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.18), rgba(249, 115, 22, 0.12));
}

.card-preview__screen span:nth-child(1) { height: 28px; }
.card-preview__screen span:nth-child(2) { height: 10px; width: 78%; }
.card-preview__screen span:nth-child(3) { height: 10px; width: 62%; }
.card-preview__screen span:nth-child(4) { height: 44px; margin-top: 4px; }
.card-preview__screen span:nth-child(5) { height: 10px; width: 70%; }

.card-preview__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(13, 148, 136, 0.2);
  padding: 4px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid #f3f4f6;
  margin-top: 2px;
}

.card .author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
}

.card .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.card .author-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .stat {
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.card .card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.muted { color: var(--muted); }
.hidden { display: none !important; }

.empty-state {
  margin-top: 24px;
  text-align: center;
  padding: 64px 28px;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: rise 0.45s ease both;
}

.empty-illus {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin-bottom: 8px;
  background:
    linear-gradient(145deg, rgba(45, 212, 191, 0.35), rgba(249, 115, 22, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.empty-state strong {
  color: var(--ink);
  font-size: 17px;
}

/* —— Detail / mine leftovers —— */
.plaza-toolbar {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: end;
  padding: 8px 0;
}

.hero-kicker {
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.detail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
  margin-top: 28px;
}

.detail-preview {
  height: 220px;
  border-radius: 18px;
  margin: 0 0 24px;
  background:
    linear-gradient(160deg, #ecfeff 0%, #f0fdf4 50%, #fff7ed 100%);
  border: 1px solid var(--line);
}

.detail h1 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.detail .lead {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 16px;
}

.detail .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--muted);
}

.detail .actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.msg { color: var(--danger); min-height: 1.2em; font-size: 13px; }
.msg.ok { color: var(--accent-deep); }

dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  width: min(420px, 92vw);
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.2);
}

dialog::backdrop {
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(6px);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
}

.auth-form h2 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.auth-form .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-head p { margin: 0; }

.mine-tabs {
  display: flex;
  gap: 4px;
  margin: 24px 0 12px;
  padding: 4px;
  width: fit-content;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.mine-tabs button {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.mine-tabs button.active {
  color: #fff;
  background: var(--ink);
}

.member-gate {
  margin-top: 40px;
  text-align: center;
  padding: 72px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.member-gate h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.member-gate p {
  margin: 0 0 22px;
  color: var(--muted);
}

.member-gate .row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}

.table th {
  background: #f9fafb;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tr:last-child td { border-bottom: none; }

.table button {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  margin-right: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 12px;
  color: #9ca3af;
}

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

.footer-inner .brand-text {
  color: var(--ink);
  font-size: 13px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(24px, -18px); }
}

@media (max-width: 900px) {
  .plaza-toolbar { grid-template-columns: 1fr; }
  .wrap, .top-inner, .footer-inner { width: calc(100% - 32px); }
  .hero-band { padding: 40px 0 36px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}

@media (max-width: 640px) {
  .top-inner {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding: 10px 0;
    gap: 10px;
  }
  .top nav { order: 3; width: 100%; overflow-x: auto; }
  .card-preview { height: 160px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
