:root {
  --bg: #f7f7f5;
  --surface: rgba(255, 255, 255, 0.96);
  --card: #ffffff;
  --text: #1d1f23;
  --muted: #7a818c;
  --line: #e7e9ee;
  --line-strong: #d9dde5;
  --dark: #202327;
  --shadow: 0 18px 48px rgba(22, 26, 34, 0.08);
  --shadow-soft: 0 6px 18px rgba(22, 26, 34, 0.06);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 76px;
  border-bottom: 1px solid rgba(20, 23, 28, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-icon,
.hero-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--dark);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
}

.brand-icon svg,
.hero-brand-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 42px;
  margin: 0 auto;
}

.site-nav a {
  color: #676f7c;
  font-size: 16px;
  font-weight: 600;
  transition: color 0.18s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.header-right {
  min-width: 116px;
  display: flex;
  justify-content: flex-end;
}

.header-login-btn,
.submit-btn,
.dark-btn {
  border: 1px solid var(--dark);
  background: var(--dark);
  color: #fff;
}

.header-login-btn,
.light-btn,
.submit-btn,
.dark-btn {
  min-height: 44px;
  border-radius: 10px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.header-login-btn:hover,
.light-btn:hover,
.submit-btn:hover,
.dark-btn:hover,
.ghost-toggle:hover,
.auth-tab:hover {
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 16px;
}

.auth-hero {
  min-height: calc(100vh - 76px);
  padding: 72px 24px 64px;
}

.auth-shell {
  max-width: 1320px;
  margin: 0 auto;
  min-height: calc(100vh - 76px - 156px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-brand {
  margin-bottom: 44px;
}

.hero-brand h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: -0.03em;
}

.auth-card {
  width: min(100%, 860px);
  padding: 42px 42px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow:
    0 1px 3px rgba(16, 20, 28, 0.03),
    0 14px 34px rgba(16, 20, 28, 0.04);
}

.auth-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 32px);
  letter-spacing: -0.02em;
}

.auth-head p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.auth-tabs {
  margin-top: 28px;
  padding: 4px;
  border-radius: 12px;
  background: #eceef2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.auth-tab {
  height: 56px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #666f7b;
  font-size: 17px;
  font-weight: 700;
}

.auth-tab.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(15, 18, 25, 0.08);
}

.auth-panel {
  margin-top: 32px;
}

.auth-form,
.user-panel {
  display: flex;
  flex-direction: column;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.field span {
  font-size: 17px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 58px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder {
  color: #a0a7b1;
}

.field input:focus {
  border-color: #afb6c1;
  box-shadow: 0 0 0 3px rgba(32, 35, 39, 0.06);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 84px;
}

.ghost-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #6a7380;
  font-size: 14px;
  font-weight: 700;
}

.form-hint,
.form-message {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.65;
}

.form-hint {
  color: var(--muted);
}

.form-message {
  min-height: 22px;
  color: #d14c4c;
}

.form-message.success {
  color: #1d7b49;
}

.submit-btn {
  width: 100%;
  height: 56px;
  font-size: 17px;
  box-shadow: var(--shadow-soft);
  border-radius: 8px;
}

.is-hidden {
  display: none;
}

.role-block {
  margin-bottom: 22px;
}

.section-label {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 700;
}

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

.role-card {
  min-height: 194px;
  padding: 26px 20px 22px;
  border: 4px solid #e0e4ea;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  box-shadow: none;
}

.role-card strong {
  font-size: 22px;
}

.role-card span:last-child {
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.role-card.is-active {
  border-color: var(--dark);
  background: linear-gradient(180deg, #f9f9fa 0%, #f5f5f7 100%);
}

.role-icon {
  width: 40px;
  height: 40px;
  color: #5d6570;
  display: grid;
  place-items: center;
}

.role-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.agreement-field {
  margin: 2px 0 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: #515864;
}

.agreement-field input {
  width: 24px;
  height: 24px;
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: #202327;
}

.agreement-field a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.user-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.user-panel-header h3 {
  margin: 0;
  font-size: 24px;
}

.user-panel-header p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-badge {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ebf7ef;
  color: #1d7b49;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.user-stats {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.showcase-card,
.creator-card,
.contest-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
}

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

.light-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: none;
}

body.has-dashboard .content-section {
  display: block;
}

.section-soft {
  max-width: none;
  background: rgba(255, 255, 255, 0.44);
  border-top: 1px solid rgba(20, 23, 28, 0.04);
  border-bottom: 1px solid rgba(20, 23, 28, 0.04);
}

.section-soft > * {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading span {
  display: inline-block;
  margin-bottom: 10px;
  color: #6d7480;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.showcase-card,
.creator-card {
  padding: 18px;
}

.cover {
  height: 220px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.cover-dark {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 22%),
    linear-gradient(135deg, #101216 0%, #474c57 100%);
}

.cover-light {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #d7dbe3 0%, #7a808d 100%);
}

.cover-grid {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(135deg, #20242c 0%, #7a808a 100%);
  background-size: 26px 26px, 26px 26px, auto;
}

.showcase-card h3,
.creator-card h3,
.contest-item h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.showcase-card p,
.creator-card p,
.contest-item p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.meta-line,
.creator-top,
.tag-row,
.contest-item,
.contest-side {
  display: flex;
}

.meta-line {
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: #5e6672;
  font-size: 14px;
  font-weight: 600;
}

.creator-top {
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--dark);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.tag-row {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tag-row span {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f2f4f7;
  display: inline-flex;
  align-items: center;
  color: #646d79;
  font-size: 13px;
  font-weight: 700;
}

.contest-list {
  display: grid;
  gap: 16px;
}

.contest-item {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
}

.contest-side {
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.contest-side strong {
  font-size: 18px;
}

.contest-side span {
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  min-width: 220px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(26, 29, 34, 0.94);
  color: #fff;
  font-size: 14px;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1024px) {
  .header-inner {
    padding: 0 20px;
  }

  .site-nav {
    gap: 22px;
  }

  .showcase-grid,
  .creator-grid,
  .user-stats,
  .role-options {
    grid-template-columns: 1fr;
  }

  .auth-card {
    width: min(100%, 760px);
  }
}

@media (max-width: 760px) {
  .site-header {
    height: auto;
    position: static;
  }

  .header-inner {
    padding: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px 22px;
    margin-top: 4px;
  }

  .header-right {
    min-width: auto;
  }

  .auth-hero {
    padding: 46px 16px 56px;
  }

  .auth-card {
    padding: 24px 18px 22px;
    border-radius: 18px;
  }

  .hero-brand {
    margin-bottom: 26px;
  }

  .hero-brand h1 {
    font-size: 28px;
  }

  .role-card {
    min-height: 164px;
    padding: 20px 16px;
  }

  .role-card strong,
  .role-card span:last-child,
  .section-label,
  .agreement-field {
    font-size: 16px;
  }

  .contest-item,
  .user-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .contest-side {
    align-items: flex-start;
  }

  .user-actions > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
