/**
 * style.css
 * OpenCore 开源社区官网全局样式
 */

/* ==================== 变量系统 ==================== */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #60a5fa;
  --color-accent: #10b981;
  --color-accent-dark: #059669;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-surface-2: #f1f5f9;
  --color-text: #1f2937;
  --color-text-secondary: #4b5563;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --header-height: 64px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 重置与基础 ==================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

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

img {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  margin: 0;
  padding-left: 1.5em;
}

.hidden {
  display: none !important;
}

.mt-4 {
  margin-top: 2rem;
}

/* ==================== 布局容器 ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  display: none;
  min-height: calc(100vh - var(--header-height) - 200px);
  padding-bottom: 4rem;
}

.section.active {
  display: block;
}

.section-block {
  padding-top: 3rem;
}

.page-header {
  padding: 3.5rem 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #06b6d4 100%);
  color: white;
  text-align: center;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.125rem;
  opacity: 0.92;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--color-muted);
  font-size: 1rem;
  margin-top: 0.25rem;
}

.link-more {
  font-weight: 500;
  white-space: nowrap;
}

/* ==================== 顶部导航 ==================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.25rem;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-text {
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 36px;
  height: 36px;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-menu {
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 140px;
  overflow: hidden;
}

.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  text-align: left;
  color: var(--color-text);
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
}

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

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

.btn-ghost {
  color: var(--color-text-secondary);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--color-surface-2);
}

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

.btn-white:hover {
  background: var(--color-surface-2);
}

.btn-outline-white {
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: white;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

/* ==================== Hero 轮播 ==================== */
.hero-carousel {
  position: relative;
  height: 480px;
  overflow: hidden;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  max-width: 720px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1.25rem;
  opacity: 0.92;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: var(--transition);
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.35);
}

.carousel-arrow svg {
  width: 22px;
  height: 22px;
}

.carousel-prev {
  left: 1.5rem;
}

.carousel-next {
  right: 1.5rem;
}

.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  background: white;
  width: 24px;
  border-radius: 5px;
}

/* ==================== 渐变背景 ==================== */
.gradient-1 {
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
}

.gradient-2 {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
}

.gradient-3 {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.gradient-4 {
  background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
}

.gradient-5 {
  background: linear-gradient(135deg, #0369a1 0%, #38bdf8 100%);
}

.gradient-6 {
  background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
}

/* ==================== 社区简介 ==================== */
.intro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.intro-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.intro-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.intro-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.intro-icon svg {
  width: 24px;
  height: 24px;
}

.intro-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.intro-card p {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* ==================== 卡片 ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.card-cover {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: 700;
  position: relative;
}

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.card-category {
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-weight: 500;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-desc {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background: var(--color-surface-2);
  color: var(--color-text-secondary);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.card-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-actions .btn {
  flex: 1;
  min-width: 0;
}

/* ==================== 工具栏 ==================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-muted);
}

.search-input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select {
  padding: 0.625rem 2rem 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  min-width: 140px;
  outline: none;
}

.filter-select:focus {
  border-color: var(--color-primary);
}

/* ==================== 时间轴 ==================== */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--color-primary);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

.timeline-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
}

.timeline-content:hover {
  box-shadow: var(--shadow);
}

.timeline-content h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.timeline-content p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

/* ==================== 合作伙伴 ==================== */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: var(--transition);
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.partner-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.partner-card h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.partner-card p {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.partner-card a {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ==================== 贡献者排名 ==================== */
.contributor-rank {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  background: var(--color-surface-2);
  color: var(--color-muted);
}

.rank-item:nth-child(1) .rank-number {
  background: #fde047;
  color: #854d0e;
}

.rank-item:nth-child(2) .rank-number {
  background: #e5e7eb;
  color: #374151;
}

.rank-item:nth-child(3) .rank-number {
  background: #fdba74;
  color: #7c2d12;
}

.rank-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.rank-name {
  flex: 1;
  font-weight: 500;
}

.rank-score {
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ==================== 指南卡片 ==================== */
.guide-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.guide-card h3 {
  margin-bottom: 1rem;
}

.guide-card ol {
  color: var(--color-text-secondary);
}

.guide-card li {
  margin-bottom: 0.5rem;
}

/* ==================== 关于社区 ==================== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.about-card h2,
.about-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.about-card p,
.about-card ul,
.about-section p {
  color: var(--color-text-secondary);
}

.about-section {
  margin-bottom: 2rem;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-secondary);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ==================== 用户中心 ==================== */
.user-profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.user-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
}

.user-profile-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.user-profile-info p {
  color: var(--color-muted);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.75rem 1rem;
  color: var(--color-muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--color-primary);
}

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.list-plain {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.list-item-title {
  font-weight: 500;
}

.list-item-meta {
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ==================== 表单 ==================== */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 480px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-error {
  display: block;
  color: var(--color-danger);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-muted);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-size: 1.25rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==================== Toast ==================== */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 1rem);
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: white;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.875rem 1.25rem;
  min-width: 260px;
  max-width: 360px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: auto;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  border-left-color: var(--color-accent);
}

.toast.error {
  border-left-color: var(--color-danger);
}

.toast.info {
  border-left-color: var(--color-primary);
}

/* ==================== Loading ==================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(255, 255, 255, 0.85);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==================== 页脚 ==================== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand .logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-brand p {
  color: var(--color-muted);
  font-size: 0.9375rem;
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--color-text-secondary);
}

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

.footer-copy {
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ==================== 空状态 ==================== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1023px) {
  .intro-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 60px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 0.75rem 1rem;
  }

  .auth-area .btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
  }

  .hero-carousel {
    height: 420px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .carousel-arrow {
    display: none;
  }

  .intro-grid,
  .card-grid,
  .partner-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box,
  .filter-select,
  .toolbar .btn {
    width: 100%;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.375rem;
  }

  .modal {
    max-height: calc(100vh - 2rem);
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1rem;
  }

  .card-actions {
    flex-direction: column;
  }

  .card-actions .btn {
    width: 100%;
  }
}
