#reading-progress {
  backdrop-filter: blur(4px);
}

.article-content {
  color: #374151;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans SC",
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin: 2em 0 1em;
  color: #1f2937;
  font-weight: 600;
  line-height: 1.4;
  scroll-margin-top: 80px;
}

.article-content h1 {
  border-bottom: 2px solid #d1fae5;
  font-size: 2rem;
  padding-bottom: 12px;
}

.article-content h2 {
  position: relative;
  color: #1f2937;
  font-size: 1.625rem;
  padding-left: 20px;
}

.article-content h2::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #10b981, #34d399);
  content: "";
}

.article-content h3 {
  color: #374151;
  font-size: 1.375rem;
  font-weight: 600;
}

.article-content h4 {
  color: #4b5563;
  font-size: 1.125rem;
  font-weight: 600;
}

.article-content p {
  margin: 1.25em 0;
  color: #4b5563;
  line-height: 1.85;
  text-align: justify;
  word-break: break-word;
}

.article-content > p:first-of-type {
  color: #374151;
  font-size: 1.125rem;
  line-height: 1.9;
}

.article-content > p:first-of-type::first-letter {
  float: left;
  margin: 0.1em 0.15em 0 0;
  color: #10b981;
  font-size: 3.5em;
  font-weight: 700;
  line-height: 0.8;
}

.article-content ul,
.article-content ol {
  margin: 1.25em 0;
  padding-left: 1.5em;
}

.article-content li {
  margin: 0.625em 0;
  padding-left: 0.5em;
  color: #4b5563;
  line-height: 1.75;
}

.article-content li::marker,
.article-content ol li::marker {
  color: #10b981;
  font-weight: 600;
}

.article-content blockquote {
  position: relative;
  margin: 1.75em 0;
  padding: 1.25em 1.5em;
  border-left: 4px solid #10b981;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #475569;
}

.article-content blockquote::before {
  position: absolute;
  top: -8px;
  left: 16px;
  color: #10b981;
  font-family: Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  opacity: 0.25;
  content: '"';
}

.article-content blockquote p {
  margin: 0;
  color: #475569;
}

.article-content code {
  border-radius: 6px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  font-family:
    "SF Mono",
    Monaco,
    "Cascadia Code",
    "Roboto Mono",
    Consolas,
    "Courier New",
    monospace;
  font-size: 0.875em;
  font-weight: 500;
  padding: 3px 8px;
}

.article-content pre {
  margin: 1.75em 0;
  overflow-x: auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  color: #e2e8f0;
  font-family:
    "SF Mono",
    Monaco,
    "Cascadia Code",
    "Roboto Mono",
    Consolas,
    "Courier New",
    monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 1.5em;
}

.article-content pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-weight: 400;
}

.article-content a {
  background: linear-gradient(transparent 70%, rgba(16, 185, 129, 0.15) 70%);
  color: #059669;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-content a:hover {
  background: linear-gradient(transparent 60%, rgba(16, 185, 129, 0.25) 60%);
  color: #047857;
}

.article-content a[target="_blank"]::after {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23059669'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14'/%3E%3C/svg%3E");
  background-size: contain;
  content: "";
  vertical-align: middle;
}

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.75em auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.article-content table {
  width: 100%;
  margin: 1.75em 0;
  overflow: hidden;
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-content th,
.article-content td {
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 18px;
  text-align: left;
}

.article-content th {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #374151;
  font-size: 0.9375rem;
  font-weight: 600;
}

.article-content tr:last-child td {
  border-bottom: 0;
}

.article-content tr:hover td {
  background-color: #f0fdf4;
}

.article-content hr {
  height: 1px;
  margin: 2.5em 0;
  border: 0;
  background: linear-gradient(90deg, transparent, #a7f3d0, transparent);
}

.article-content strong {
  color: #1f2937;
  font-weight: 600;
}

.article-content em {
  color: #6b7280;
}

.article-content ::selection {
  background: rgba(16, 185, 129, 0.2);
}

.reading-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  background: #ecfdf5;
  color: #059669;
  font-size: 0.875rem;
  padding: 4px 12px;
}

#article-toc a.active {
  color: #10b981;
  font-weight: 500;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #6b7280;
  transition: all 0.2s ease;
}

.share-button:hover {
  background: #d1fae5;
  color: #059669;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 4px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  border-radius: 2px;
  background: #ecfdf5;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background: #a7f3d0;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: #6ee7b7;
}

.article-card-hover {
  transition: all 0.3s ease;
}

.article-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.cta-banner {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.94), rgba(20, 184, 166, 0.92)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 38%);
}

.cta-banner::before {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  animation: ctaShine 8s ease-in-out infinite;
  content: "";
}

@keyframes ctaShine {
  0%,
  100% {
    transform: translate(-30%, -30%);
  }

  50% {
    transform: translate(10%, 10%);
  }
}

.article-mini-footer,
.article-feedback-card,
.article-inline-links {
  border: 1px solid #d1fae5;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f0fdf4, #ecfeff);
}

.article-mini-footer {
  padding: 1.5rem;
}

.article-inline-links {
  padding: 1.25rem;
}

.article-inline-links ul {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.article-inline-links a {
  display: block;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.9rem 1rem;
}

.article-feedback-card {
  padding: 1.25rem 1.5rem;
}

.article-notice-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #d1fae5;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f8fffb, #ecfeff);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 1.25rem 1.5rem;
}

.article-notice-card h4 {
  margin: 0 0 0.9rem;
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
}

.article-notice-card dl,
.article-notice-card dd {
  margin: 0;
}

.article-notice-card dl {
  display: grid;
  gap: 0.95rem;
}

.article-notice-card dd {
  color: #4b5563;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.article-notice-card a {
  color: #059669;
  text-decoration: none;
}

.article-notice-card a:hover {
  color: #047857;
  text-decoration: underline;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

@media (max-width: 768px) {
  .article-content {
    font-size: 1rem;
    line-height: 1.85;
  }

  .article-content h1 {
    font-size: 1.75rem;
  }

  .article-content h2 {
    font-size: 1.375rem;
    padding-left: 16px;
  }

  .article-content h3 {
    font-size: 1.25rem;
  }

  .article-content h4 {
    font-size: 1.0625rem;
  }

  .article-content p {
    font-size: 1rem;
  }

  .article-content > p:first-of-type {
    font-size: 1.0625rem;
  }

  .article-content pre {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 1em;
  }

  .article-content blockquote {
    padding: 1em 1.25em;
  }

  #floating-cta {
    right: 16px;
    bottom: 20px;
  }
}

@media (max-width: 640px) {
  #reading-progress {
    height: 3px;
  }

  #floating-cta .flex-col {
    gap: 0.5rem;
  }

  #floating-cta button,
  #floating-cta a > div {
    width: 44px;
    height: 44px;
  }

  .cta-banner {
    padding: 1.25rem;
  }

  .article-content > p:first-of-type::first-letter {
    float: none;
    margin: 0;
    font-size: inherit;
  }
}

@media print {
  #reading-progress,
  #floating-cta,
  .cta-banner,
  .share-button,
  aside {
    display: none !important;
  }

  .article-content {
    max-width: 100%;
  }
}
