/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fc;
  --bg-link: rgba(99, 102, 241, 0.04);
  --bg-link-hover: rgba(99, 102, 241, 0.08);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent-purple: #8b5cf6;
  --accent-blue: #6366f1;
  --warning-color: #d97706;
  --border-color: rgba(0, 0, 0, 0.06);
  --border-card: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background gradient effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: radial-gradient(
      ellipse 80% 50% at 50% -20%,
      rgba(99, 102, 241, 0.07),
      transparent
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 10%,
      rgba(139, 92, 246, 0.05),
      transparent
    );
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
.header {
  padding: 64px 0 48px;
}

.hero {
  text-align: center;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-logo {
  height: 96px;
  object-fit: contain;
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 500;
  background: #000;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.12em;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ===== Sections ===== */
.section {
  margin-top: 48px;
}

.section:last-child {
  margin-bottom: 60px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px 6px 14px;
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.08) 0%, 
    rgba(139, 92, 246, 0.06) 100%);
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  position: relative;
}

.section-bar {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
  margin-left: 4px;
}

.section-title h2 {
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}

/* ===== Grid Layouts ===== */
.nav-grid {
  display: grid;
  gap: 20px;
}

.nav-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.nav-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ===== Product Cards (创作工具) ===== */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
  overflow: hidden;
}

.product-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.product-screenshot {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.product-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.4s ease;
}

.product-card:hover .product-screenshot img {
  transform: scale(1.03);
}

/* Gray placeholder for missing screenshots */
.product-screenshot-placeholder {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
}

.placeholder-content svg {
  width: 36px;
  height: 36px;
  opacity: 0.5;
}

.placeholder-content span {
  font-size: 0.78rem;
  color: #b0bec5;
  letter-spacing: 0.05em;
}

.product-info {
  padding: 18px 20px 20px;
}

.product-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  letter-spacing: 0.02em;
}

.product-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Copyright Cards ===== */
.copyright-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.copyright-card:hover {
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: var(--shadow-card-hover);
}

.copyright-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.copyright-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.copyright-icon svg {
  width: 22px;
  height: 22px;
}

.copyright-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.copyright-card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.copyright-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.copyright-warning {
  font-size: 0.78rem;
  color: var(--warning-color);
  line-height: 1.6;
  margin-bottom: 18px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid rgba(217, 119, 6, 0.5);
}

.copyright-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.copyright-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-link);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  transition: all var(--transition);
}

.copyright-link:hover {
  background: var(--bg-link-hover);
  border-color: rgba(99, 102, 241, 0.15);
}

.link-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.copyright-link:hover .link-arrow {
  color: var(--accent-purple);
  transform: translateX(3px);
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.footer p {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .nav-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .header {
    padding: 40px 0 32px;
  }

  .hero-logo {
    height: 48px;
  }

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

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .section {
    margin-top: 32px;
  }

  .nav-grid-4,
  .nav-grid-3 {
    grid-template-columns: 1fr;
  }

  .product-info {
    padding: 14px 16px 16px;
  }

  .copyright-card {
    padding: 20px;
  }
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  margin: 5% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 24px 28px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 16px 16px 0 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.close {
  color: #ffffff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 8px;
  border-radius: 4px;
}

.close:hover,
.close:focus {
  background-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

.platform-info h3 {
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.platform-info h3:first-child {
  margin-top: 0;
}

.platform-info p {
  color: #475569;
  line-height: 1.7;
  margin: 8px 0;
}

.platform-info ol,
.platform-info ul {
  margin: 12px 0;
  padding-left: 24px;
}

.platform-info li {
  color: #475569;
  line-height: 1.8;
  margin: 8px 0;
}

.platform-info a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.platform-info a:hover {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.platform-info .warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 6px;
  color: #92400e;
  font-weight: 500;
}

.copyright-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.copyright-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

@media (max-width: 640px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
    max-height: 80vh;
  }

  .modal-header {
    padding: 20px 20px;
  }

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

  .modal-body {
    padding: 20px;
  }

  .platform-info h3 {
    font-size: 1rem;
  }
}
