/* 与官网 Base.astro 共用 :root 变量（浅绿底 + 深字） */
.community-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 0 40px;
  line-height: 1.65;
  color: var(--fg);
  font-family: inherit;
}

.community-hero {
  text-align: center;
  margin-bottom: 40px;
}

.community-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.2rem);
  margin-bottom: 12px;
  color: var(--fg);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.community-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 auto 16px;
}

.community-stats {
  font-size: 0.95rem;
  color: var(--muted);
}

.community-stats strong {
  color: var(--green-700);
  font-weight: 700;
}

.community-marquee {
  overflow: hidden;
  margin: 0 0 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(90deg, var(--green-100), #fff, var(--green-100));
  padding: 10px 0;
}

.community-marquee__track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: community-marquee 28s linear infinite;
  padding-left: 16px;
}

.community-marquee__track span {
  white-space: nowrap;
  font-size: 0.92rem;
  color: var(--green-900);
  font-weight: 600;
}

@keyframes community-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .community-marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

.community-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(14, 122, 86, 0.08);
}

.community-card h2 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--fg);
  font-weight: 700;
}

.community-card label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.community-card input[type="text"],
.community-card textarea,
.community-card select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.community-card input::placeholder,
.community-card textarea::placeholder {
  color: #94a3b8;
}

.community-card input:focus,
.community-card textarea:focus,
.community-card select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(22, 192, 122, 0.18);
}

.community-card textarea {
  min-height: 110px;
  resize: vertical;
}

.community-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.community-check input {
  margin-top: 3px;
  accent-color: var(--green-700);
}

.community-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.community-btn:hover {
  filter: brightness(1.08);
}

.community-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.community-tip {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.55;
}

.community-board,
.community-honor {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(14, 122, 86, 0.08);
}

.community-board-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.community-board h2,
.community-honor h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--fg);
  font-weight: 700;
}

.community-board-head h2 {
  margin-bottom: 0;
}

.community-filters {
  display: flex;
  gap: 8px;
}

.community-filters select {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
}

.community-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.community-item:last-child {
  border-bottom: none;
}

.community-item-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.community-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-700);
  background: var(--green-100);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

.community-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-adopted {
  color: var(--green-900);
  background: var(--green-100);
  border: 1px solid var(--border);
}

.status-community {
  color: #5b3d8f;
  background: #f3ecff;
  border: 1px solid #e2d4ff;
}

.status-reviewing {
  color: #9a5b00;
  background: #fff6e8;
  border: 1px solid #ffe2b8;
}

.status-revenue {
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.status-open {
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
}

.status-declined {
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

.community-tier {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.community-tier.regular {
  color: #166534;
  background: #ecfdf5;
  border: 1px solid var(--border);
}

.community-tier.star {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.community-admin-note {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 13px;
  line-height: 1.5;
}

.community-my {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, var(--green-100) 100%);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 28px;
}

.community-my h2 {
  margin-bottom: 12px;
  font-size: 1.15rem;
  color: var(--fg);
}

.community-my-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--fg);
}

.community-my-item:last-child {
  border-bottom: none;
}

.honor-card.honor-star {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}

.honor-card.honor-regular {
  background: linear-gradient(180deg, #fff 0%, var(--green-100) 100%);
}

.honor-tier-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.honor-card.honor-star .honor-tier-label {
  color: #b45309;
}

.community-item-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--fg);
}

.community-item-body {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.community-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.community-vote {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

.community-vote:hover {
  border-color: var(--green-500);
  color: var(--green-700);
  background: var(--green-100);
}

.community-honor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.honor-card {
  background: linear-gradient(180deg, #fff 0%, var(--green-100) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  position: relative;
}

.honor-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 2px 8px;
}

.honor-name {
  display: block;
  margin-bottom: 6px;
  color: var(--fg);
  font-weight: 700;
}

.honor-meta {
  font-size: 12px;
  color: var(--muted);
}

.community-disclaimer {
  margin-top: 32px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  line-height: 1.6;
  display: grid;
  gap: 10px;
}

.community-disclaimer p {
  margin: 0;
}

.community-empty {
  color: var(--muted);
  font-size: 14px;
}

.community-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 520px);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(14, 122, 86, 0.18);
}

.community-toast.ok {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--green-900);
}

.community-toast.err {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #991b1b;
}

@media (max-width: 768px) {
  .community-grid {
    grid-template-columns: 1fr;
  }
}
