/* Devlog & Article Detail Styles */

:root {
  --article-width: 860px;
}

.article-container {
  width: 100%;
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* Article Hero & Header */
    .article-hero {
      padding: 130px 0 30px;
    }
    .back-nav-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--text-muted);
      font-size: 0.9rem;
      font-weight: 600;
      margin-bottom: 24px;
      padding: 8px 14px;
      border-radius: var(--radius-sm);
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-subtle);
    }
    .back-nav-link:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.2);
      transform: translateX(-3px);
    }
    .article-badges {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .article-title {
      font-size: clamp(2rem, 4.5vw, 3rem);
      font-weight: 800;
      line-height: 1.22;
      letter-spacing: -0.025em;
      margin-bottom: 24px;
      color: #FFFFFF;
    }
    .article-meta {
      display: flex;
      align-items: center;
      gap: 20px;
      padding-bottom: 24px;
      border-bottom: 1px solid var(--border-subtle);
      margin-bottom: 36px;
      flex-wrap: wrap;
    }
    .author-info {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .author-avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 700;
    }
    .author-text strong {
      display: block;
      font-size: 0.95rem;
      color: var(--text-main);
    }
    .author-text span {
      font-size: 0.82rem;
      color: var(--text-muted);
    }
    .meta-divider {
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--text-dim);
    }
    .meta-stat {
      font-size: 0.88rem;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* Article Cover Banner */
    .article-cover {
      width: 100%;
      height: 340px;
      border-radius: var(--radius-lg);
      overflow: hidden;
      margin-bottom: 48px;
      border: 1px solid var(--border-subtle);
      background: linear-gradient(135deg, #181534 0%, #0F172A 50%, #080D18 100%);
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
    .cover-art-overlay {
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at center, rgba(167, 139, 250, 0.15) 0%, transparent 70%);
      pointer-events: none;
    }
    .cover-icon-box {
      width: 110px;
      height: 110px;
      border-radius: var(--radius-lg);
      background: linear-gradient(135deg, #312E81, #1E1B4B);
      border: 1px solid rgba(167, 139, 250, 0.35);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #A78BFA;
      box-shadow: 0 10px 30px rgba(49, 46, 129, 0.5);
    }

    /* Article Content Typography (Prose) */
    .article-prose {
      font-size: 1.08rem;
      line-height: 1.85;
      color: #CBD5E1;
      margin-bottom: 60px;
    }
    .article-prose p {
      margin-bottom: 24px;
    }
    .article-prose strong {
      color: #FFFFFF;
      font-weight: 700;
    }
    .article-prose h2 {
      font-size: 1.8rem;
      font-weight: 800;
      color: #FFFFFF;
      letter-spacing: -0.02em;
      margin: 44px 0 18px;
      line-height: 1.3;
    }
    .article-prose h3 {
      font-size: 1.35rem;
      font-weight: 700;
      color: #FFFFFF;
      letter-spacing: -0.01em;
      margin: 32px 0 14px;
    }
    .article-prose ul {
      margin-bottom: 26px;
      padding-left: 24px;
    }
    .article-prose ul li {
      margin-bottom: 10px;
    }

    /* Blockquote */
    .article-blockquote {
      background: rgba(99, 102, 241, 0.08);
      border-left: 4px solid var(--accent-indigo);
      border-radius: 0 var(--radius-md) var(--radius-md) 0;
      padding: 24px 28px;
      margin: 36px 0;
      font-style: italic;
      color: #E2E8F0;
      font-size: 1.12rem;
      line-height: 1.7;
    }

    /* Highlight Feature Box */
    .highlight-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 28px;
      margin: 36px 0;
    }
    .highlight-card h4 {
      font-size: 1.15rem;
      font-weight: 700;
      margin-bottom: 14px;
      color: #FFFFFF;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .highlight-card h4 svg {
      color: var(--accent-cyan);
    }
    .feature-points-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-top: 16px;
    }
    .point-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-size: 0.95rem;
      color: var(--text-muted);
    }
    .point-item svg {
      color: var(--accent-emerald);
      flex-shrink: 0;
      margin-top: 4px;
    }

    /* Share & Article Actions */
    .article-footer-actions {
      border-top: 1px solid var(--border-subtle);
      border-bottom: 1px solid var(--border-subtle);
      padding: 28px 0;
      margin-bottom: 60px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 20px;
    }
    .share-group {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .share-group span {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    .share-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border-subtle);
      color: var(--text-main);
      padding: 8px 16px;
      border-radius: var(--radius-full);
      font-size: 0.85rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      transition: var(--transition);
    }
    .share-btn:hover {
      background: rgba(255, 255, 255, 0.12);
      border-color: rgba(255, 255, 255, 0.25);
      transform: translateY(-2px);
    }

    /* Community Discord Callout Banner */
    .discord-cta-box {
      background: linear-gradient(135deg, rgba(88, 101, 242, 0.15) 0%, rgba(20, 22, 32, 0.9) 100%);
      border: 1px solid rgba(88, 101, 242, 0.35);
      border-radius: var(--radius-lg);
      padding: 36px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 28px;
      margin-bottom: 80px;
      flex-wrap: wrap;
    }
    .discord-cta-text h3 {
      font-size: 1.4rem;
      font-weight: 800;
      margin-bottom: 8px;
      color: #FFFFFF;
    }
    .discord-cta-text p {
      color: var(--text-muted);
      font-size: 0.95rem;
      max-width: 520px;
    }

    /* Related Articles Section */
    .related-section {
      padding: 70px 0 90px;
      background: rgba(255, 255, 255, 0.015);
      border-top: 1px solid var(--border-subtle);
    }
    .related-title {
      font-size: 1.6rem;
      font-weight: 800;
      margin-bottom: 30px;
      color: #FFFFFF;
    }
    .related-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 28px;
    }
    .news-card {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: var(--transition);
    }
    .news-card:hover {
      border-color: rgba(99, 102, 241, 0.35);
      transform: translateY(-4px);
    }
    .news-banner {
      height: 160px;
      background: #1E293B;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-dim);
      overflow: hidden;
    }
    .news-banner-mhw {
      background: linear-gradient(135deg, #0F172A, #1E293B);
    }
    .news-banner-studio {
      background: linear-gradient(135deg, #064E3B, #0F172A);
    }
    .news-tag {
      position: absolute;
      top: 14px;
      left: 14px;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(8px);
      padding: 4px 12px;
      border-radius: var(--radius-full);
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .news-content {
      padding: 24px;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      justify-content: space-between;
    }
    .news-date {
      font-size: 0.8rem;
      color: var(--text-dim);
      margin-bottom: 8px;
    }
    .news-title-link {
      font-size: 1.15rem;
      font-weight: 700;
      margin-bottom: 12px;
      line-height: 1.4;
      color: var(--text-main);
    }
    .news-title-link:hover {
      color: var(--accent-cyan);
    }
    .news-excerpt {
      color: var(--text-muted);
      font-size: 0.88rem;
      margin-bottom: 20px;
    }
    .news-link {
      color: var(--accent-cyan);
      font-size: 0.88rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .news-link:hover {
      gap: 10px;
    }

/* =============================================================
   Article Image Zoom & Lightbox Modal (No Caption)
   ============================================================= */
.article-prose img,
.article-cover img {
  cursor: zoom-in;
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
  border-radius: var(--radius-md, 12px);
  max-width: 100%;
  height: auto;
}

.article-prose img:hover,
.article-cover img:hover {
  filter: brightness(1.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.devlog-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.devlog-lightbox.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.devlog-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 19, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.devlog-lightbox-wrapper {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  z-index: 2;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.devlog-lightbox.is-active .devlog-lightbox-wrapper {
  transform: scale(1);
}

.devlog-lightbox-img {
  display: block;
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  user-select: none;
  -webkit-user-select: none;
}

.devlog-lightbox-close {
  position: fixed;
  top: max(20px, env(safe-area-inset-top, 20px));
  right: max(20px, env(safe-area-inset-right, 20px));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(18, 24, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  padding: 0;
}

.devlog-lightbox-close:hover {
  background: #EF4444;
  border-color: #EF4444;
  transform: scale(1.08);
}

body.lightbox-open {
  overflow: hidden !important;
}

@media (max-width: 768px) {
  .devlog-lightbox-wrapper {
    max-width: 95vw;
    max-height: 85vh;
  }
  .devlog-lightbox-img {
    max-width: 95vw;
    max-height: 85vh;
    border-radius: 8px;
  }
  .devlog-lightbox-close {
    top: max(16px, env(safe-area-inset-top, 16px));
    right: max(16px, env(safe-area-inset-right, 16px));
    width: 40px;
    height: 40px;
    font-size: 24px;
    background: rgba(15, 23, 42, 0.92);
  }
}
