/* ========================================
   Notepad++ 中文官网 - 共享样式表
   ======================================== */

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

:root {
  --primary: #6AB04C;
  --primary-light: #90BE6D;
  --primary-dark: #27AE60;
  --white: #FFFFFF;
  --bg-gray: #F8FAFB;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --footer-bg: #1F2937;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ============ Navigation ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.nav-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-dark);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 1px;
}

/* ============ Hero Section ============ */
.hero {
  background: linear-gradient(135deg, #6AB04C 0%, #90BE6D 50%, #B8E6A0 100%);
  padding: 120px 24px 80px;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-text p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-screenshot {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.hero-screenshot img {
  width: 100%;
  display: block;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

.btn-secondary {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}

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

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

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

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 2px solid var(--primary);
}

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

/* ============ Section ============ */
.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--bg-gray);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* ============ Cards ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.2s;
}

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

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============ Tabs ============ */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

.tab-content {
  display: none;
}

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

/* ============ Version Card ============ */
.version-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 32px;
}

.version-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.version-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.version-meta span {
  margin-right: 16px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 8px;
}

.badge-new {
  background: #E8F5E9;
  color: #2E7D32;
}

.badge-improve {
  background: #E3F2FD;
  color: #1565C0;
}

.badge-fix {
  background: #FFF3E0;
  color: #E65100;
}

.changelog-list {
  list-style: none;
  margin-top: 16px;
}

.changelog-list li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.changelog-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* ============ Steps ============ */
.steps {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  text-align: center;
  padding: 32px 24px;
}

.step-number {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* ============ Download Section ============ */
.download-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 24px;
}

.download-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.download-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.download-option {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.download-option:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.download-option .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.download-option h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.download-option p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.portable-features {
  list-style: none;
  margin-top: 20px;
}

.portable-features li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
}

.portable-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-dark);
  font-weight: 700;
}

/* ============ Tutorial ============ */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.tutorial-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.2s;
}

.tutorial-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}

.tutorial-icon {
  width: 40px;
  height: 40px;
  background: #E8F5E9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tutorial-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.tutorial-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.code-block {
  background: #1E293B;
  color: #E2E8F0;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-x: auto;
  margin: 16px 0;
}

.code-block .keyword { color: #C084FC; }
.code-block .tag { color: #7DD3FC; }
.code-block .attr { color: #FCD34D; }
.code-block .string { color: #86EFAC; }
.code-block .comment { color: #64748B; }

/* ============ Table ============ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}

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

.data-table th {
  background: var(--bg-gray);
  font-weight: 600;
  color: var(--text-primary);
}

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

.data-table code {
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary-dark);
}

/* ============ FAQ ============ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.faq-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============ Feature Grid ============ */
.feature-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-detail {
  padding: 24px;
}

.feature-detail h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-detail p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
}

/* ============ CTA Banner ============ */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  color: white;
  margin-top: 48px;
}

.cta-banner h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.cta-banner .btn {
  margin: 0 8px;
}

/* ============ Footer ============ */
.footer {
  background: var(--footer-bg);
  color: #9CA3AF;
  padding: 48px 24px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

.footer-brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.footer-desc {
  font-size: 0.9rem;
  max-width: 300px;
  line-height: 1.6;
}

.footer-links-group h4 {
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links-group a {
  display: block;
  color: #9CA3AF;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-links-group a:hover {
  color: white;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid #374151;
  text-align: center;
  font-size: 0.85rem;
  color: #6B7280;
}

/* ============ Page Header (inner pages) ============ */
.page-header {
  background: linear-gradient(135deg, #6AB04C 0%, #90BE6D 50%, #B8E6A0 100%);
  padding: 120px 24px 60px;
  text-align: center;
  color: white;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* ============ Platform Cards ============ */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.platform-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.platform-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.platform-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* ============ History Timeline ============ */
.history-list {
  margin-top: 32px;
}

.history-item {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.history-item .date {
  min-width: 120px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-top: 2px;
}

.history-item .content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.history-item .content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============ Step Guide ============ */
.step-guide {
  max-width: 800px;
  margin: 32px auto;
}

.step-guide-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.step-guide-item .step-num {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-guide-item h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-guide-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============ Hash Verify ============ */
.hash-block {
  background: #F1F5F9;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 8px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--text-secondary);
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

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

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

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

  .download-options {
    grid-template-columns: 1fr;
  }

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

  .feature-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
    display: block;
  }

  .nav-toggle {
    display: block;
  }

  .footer-inner {
    flex-direction: column;
  }

  .cta-banner {
    padding: 32px 20px;
  }

  .history-item {
    flex-direction: column;
    gap: 8px;
  }

  .step-guide-item {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 48px 16px;
  }

  .hero {
    padding: 120px 16px 60px;
  }

  .download-card {
    padding: 24px;
  }

  .version-card {
    padding: 24px;
  }
}
