:root {
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: #e4e7ec;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #ca8a04;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

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

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

a.brand:hover strong {
  color: var(--primary-dark);
}

.brand-badge {
  background: #dbeafe;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.top-nav a {
  color: #344054;
  text-decoration: none;
  font-size: 14px;
}

.top-nav a:hover {
  color: var(--primary);
}

.top-nav a.is-active {
  color: var(--primary-dark);
  font-weight: 700;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  border-color: #cfd4dc;
  color: #344054;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-nickname {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.auth-modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.auth-modal__panel {
  position: relative;
  width: min(420px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  padding: 22px 22px 20px;
}

.auth-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-modal__head h2 {
  margin: 0;
  font-size: 18px;
}

.auth-modal__close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 4px;
}

.auth-modal__close:hover {
  color: var(--text);
}

.auth-modal__hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}

.auth-modal__hint code {
  font-size: 11px;
  background: #f2f4f7;
  padding: 2px 6px;
  border-radius: 6px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-tab {
  flex: 1;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #475467;
}

.auth-tab--active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--primary-dark);
}

.auth-toast {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #065f46;
  margin-bottom: 12px;
}

.auth-toast--error {
  background: #fef2f2;
  color: #991b1b;
}

.auth-panel__note {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.auth-pwd-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.auth-pwd-subtab {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #475467;
}

.auth-pwd-subtab--active {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: var(--primary-dark);
}

.auth-lock-hint {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.auth-pwd-strength {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.auth-pwd-strength__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.auth-pwd-strength__list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-pwd-strength__list li.ok {
  color: var(--success);
}

.auth-pwd-strength__list li.bad {
  color: #b45309;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #344054;
}

.auth-field input,
.auth-field textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
}

.auth-field textarea {
  resize: vertical;
  min-height: 96px;
}

.auth-field--row .auth-sms-row {
  display: flex;
  gap: 8px;
}

.auth-field--row .auth-sms-row input {
  flex: 1;
  min-width: 0;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-page-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.auth-page-main {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-page-card {
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.1);
}

.developer-register-card {
  width: min(560px, 100%);
}

.developer-form .auth-field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
  background: #fff;
}

.tech-stack-chips,
.expertise-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.chip-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  background: #f8fafc;
}

.chip-option:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.chip-option:has(input:checked) {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary-dark);
}

.chip-option input {
  margin: 0;
}

.auth-field-extra {
  margin-top: 8px;
}

.auth-field em {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
}

.auth-page-head h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.auth-page-head p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.auth-page-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
}

.auth-page-actions a {
  color: var(--primary);
  text-decoration: none;
}

.auth-page-actions a:hover {
  text-decoration: underline;
}

.hero {
  padding: 56px 0 36px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 60%, #f2f5ff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
}

.hero-tag {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0 0 14px;
  line-height: 1.25;
}

.hero-desc {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: var(--card);
}

.section {
  padding: 46px 0;
}

.section-muted {
  background: #f8fafc;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0 0 6px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

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

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.card h3,
.card h4 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: #475467;
}

.meta-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 12px;
  border-radius: 8px;
  padding: 3px 8px;
  background: #f2f4f7;
  color: #344054;
}

.chip.type-web {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip.type-download {
  background: #fef3c7;
  color: #92400e;
}

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

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

.metric strong {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

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

.developer-overview p {
  margin-top: 0;
  color: #475467;
}

.developer-overview p a {
  color: var(--primary);
  text-decoration: none;
}

.developer-overview p a:hover {
  text-decoration: underline;
}

.developer-profile-block {
  margin-bottom: 16px;
}

.developer-profile-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: #f8fafc;
}

.developer-profile-name {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.developer-profile-intro {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #475467;
}

.developer-profile-tags {
  margin-bottom: 8px;
  font-size: 13px;
}

.developer-profile-tags:last-of-type {
  margin-bottom: 0;
}

.developer-profile-tags .chip {
  margin-right: 6px;
  margin-bottom: 4px;
}

.developer-profile-exp {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

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

.wallet-balance {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}

.money {
  margin: 6px 0 14px;
  font-size: 32px;
  font-weight: 700;
  color: #0f766e;
}

.wallet-actions {
  display: flex;
  gap: 10px;
}

.tx-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.tx-table th,
.tx-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  font-size: 13px;
}

.tx-table th {
  background: #f8fafc;
  color: #344054;
}

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

.tx-in {
  color: var(--success);
}

.tx-out {
  color: #dc2626;
}

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

.safety-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #667085;
  gap: 12px;
}

.footer-inner a {
  color: inherit;
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--primary);
}

@media (max-width: 980px) {
  .hero-grid,
  .wallet-layout,
  .card-grid,
  .safety-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .top-nav {
    display: none;
  }
}
