/* ==========================================
   ChatGPT Work 中文网 - 全局样式 (OpenAI浅色系)
   版本: 2.0
   ========================================== */

/* ---- CSS Variables ---- */
:root {
  --white: #ffffff;
  --bg-light: #f7f7f8;
  --bg-card: #ffffff;
  --text-primary: #101010;
  --text-secondary: #404040;
  --text-muted: #6e6e80;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --openai-green: #10a37f;
  --openai-green-hover: #0d8c6d;
  --openai-green-light: rgba(16, 163, 127, 0.1);
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 100px;
  --space-2xl: 140px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.2s ease;
}

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

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

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--white);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ---- Typography ---- */
.text-gradient {
  background: linear-gradient(135deg, var(--openai-green), #0d8c6d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.display {
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.h1 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.h2 {
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.h3 {
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.body {
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-muted);
}

.small {
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
  position: relative;
}

.section-lg {
  padding: var(--space-2xl) 0;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.grid {
  display: grid;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--openai-green);
  color: white;
  border: none;
}

.btn-primary:hover {
  background: var(--openai-green-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: var(--bg-light);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: var(--transition);
}

.card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--openai-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.card-icon svg {
  width: 20px;
  height: 20px;
  color: var(--openai-green);
}

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--openai-green);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--openai-green);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--openai-green);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--openai-green-hover);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 360px;
  height: 100vh;
  background: var(--white);
  z-index: 1001;
  padding: 80px var(--space-md) var(--space-md);
  transition: right 0.25s ease;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu a:hover {
  color: var(--openai-green);
}

/* ---- Recharge Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.2s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.modal-close:hover {
  background: var(--border);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.modal-text {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.modal-qr {
  width: 180px;
  height: 180px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- Footer ---- */
.footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
}

.footer-brand .logo {
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.footer-links h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  padding: 5px 0;
  transition: var(--transition);
}

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

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.footer-friends {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-friends span {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-friends a {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
}

.footer-friends a:hover {
  color: var(--openai-green);
}

/* ---- Page Hero ---- */
.page-hero {
  padding: 140px 0 var(--space-xl);
  background: var(--bg-light);
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-hero p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-md);
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--openai-green);
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Visitor Guide Content ---- */
.seo-content-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.seo-content-section.alt {
  background: var(--bg-light);
}

.seo-content-wrap {
  max-width: 920px;
  margin: 0 auto;
}

.seo-content-wrap > p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 18px;
}

.seo-content-wrap h2 {
  margin-bottom: 20px;
}

.seo-content-wrap h3 {
  margin: 0 0 10px;
  color: var(--text-primary);
}

.seo-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.seo-answer-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.seo-answer-card p {
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

.seo-guide-list {
  margin: 24px 0;
  padding-left: 24px;
}

.seo-guide-list li {
  list-style: decimal;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 10px;
}

.seo-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.seo-related-links a {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--openai-green);
  background: var(--white);
  font-size: 14px;
  font-weight: 500;
}

.seo-related-links a:hover {
  border-color: var(--openai-green);
  background: var(--openai-green-light);
}

.page-updated {
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---- Background Effects ---- */
.bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 163, 127, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Tags ---- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--openai-green-light);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--openai-green);
}

/* ---- Pricing Cards ---- */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.pricing-card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.pricing-card.featured {
  border-color: var(--openai-green);
  box-shadow: 0 0 0 1px var(--openai-green);
}

.pricing-card .featured-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--openai-green);
  color: white;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.pricing-card h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.pricing-card .price {
  font-size: 36px;
  font-weight: 700;
  margin: var(--space-sm) 0;
  color: var(--text-primary);
}

.pricing-card .price span {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card ul {
  text-align: left;
  margin: var(--space-md) 0;
}

.pricing-card ul li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.pricing-card ul li:last-child {
  border-bottom: none;
}

/* ---- FAQ Accordion ---- */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--openai-green);
}

.faq-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: var(--space-md);
}

.faq-answer p {
  color: var(--text-muted);
  line-height: 1.8;
}

/* ---- Changelog ---- */
.changelog-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.changelog-date {
  min-width: 100px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.changelog-content h4 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.changelog-content p {
  color: var(--text-muted);
  font-size: 15px;
}

.changelog-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ---- Blog Cards ---- */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.blog-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.blog-card-content {
  padding: var(--space-md);
}

.blog-card-meta {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.blog-card h3 {
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.5;
}

.blog-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ---- Particle Canvas ---- */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ---- Code Blocks ---- */
pre {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  overflow-x: auto;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

code {
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.9em;
  background: var(--openai-green-light);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--openai-green);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ---- Tables ---- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-light);
}

td {
  color: var(--text-secondary);
}

tr:hover td {
  background: rgba(16, 163, 127, 0.03);
}

/* ---- Custom Cursor (disabled) ---- */
.custom-cursor {
  display: none;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 60px;
    --space-2xl: 80px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .pricing-card .price {
    font-size: 28px;
  }

  .changelog-item {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .page-hero {
    padding: 120px 0 60px;
  }

  .seo-content-section {
    padding: 60px 0;
  }

  .seo-answer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .modal {
    padding: var(--space-md);
  }

  .modal-qr {
    width: 140px;
    height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
