/* ==========================================================================
   MineAge 2 — Interactive Devlog (Master-Detail UX & Lightbox Slider)
   ========================================================================== */

.devlog-app {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

/* Two-column master-detail layout */
.devlog-layout {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 32px;
  align-items: start;
}

/* ==========================================================================
   SIDEBAR (Post List)
   ========================================================================== */

.devlog-sidebar {
  position: sticky;
  top: 86px;
  height: calc(100vh - 108px);
  min-height: 640px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 18, 27, 0.95) 0%, rgba(6, 9, 14, 0.92) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 162, 74, 0.22);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(201, 162, 74, 0.15);
  overflow: hidden;
  z-index: 10;
}

.devlog-sidebar-header {
  flex-shrink: 0;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line, #1c2030);
  background: linear-gradient(135deg, rgba(201, 162, 74, 0.1) 0%, rgba(13, 17, 25, 0.6) 100%);
  position: relative;
}

.devlog-sidebar-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 74, 0.45), transparent);
}

.devlog-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.devlog-sidebar-title {
  font-family: var(--serif, "Cinzel", Georgia, serif);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text, #d6d3c6);
  display: flex;
  align-items: center;
  gap: 10px;
}

.devlog-sidebar-title svg {
  color: var(--gold, #c9a24a);
  filter: drop-shadow(0 0 6px rgba(201, 162, 74, 0.4));
}

.devlog-counter-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-2, #e8c97a);
  background: rgba(201, 162, 74, 0.14);
  border: 1px solid rgba(201, 162, 74, 0.35);
  border-radius: 20px;
  padding: 4px 12px;
  letter-spacing: 0.05em;
}

/* Post list scroll container */
.devlog-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding: 14px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 74, 0.35) rgba(5, 7, 11, 0.6);
}

.devlog-list-scroll::-webkit-scrollbar {
  width: 6px;
}

.devlog-list-scroll::-webkit-scrollbar-track {
  background: rgba(5, 7, 11, 0.6);
  border-radius: 4px;
}

.devlog-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 74, 0.35);
  border-radius: 4px;
}

.devlog-list-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--gold, #c9a24a);
}

/* Post list item card */
.devlog-card-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  min-height: 72px;
  background: rgba(13, 17, 25, 0.65);
  border: 1px solid var(--line, #1c2030);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  user-select: none;
  box-sizing: border-box;
}

.devlog-card-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background 0.25s ease;
}

.devlog-card-item:hover {
  background: rgba(24, 30, 46, 0.85);
  border-color: rgba(201, 162, 74, 0.3);
  transform: translateX(3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.devlog-card-item.is-active {
  background: linear-gradient(135deg, rgba(201, 162, 74, 0.2) 0%, rgba(13, 17, 25, 0.95) 100%);
  border-color: rgba(201, 162, 74, 0.55);
  box-shadow: 0 0 24px rgba(201, 162, 74, 0.22), inset 0 1px 0 rgba(201, 162, 74, 0.25);
}

.devlog-card-item.is-active::before {
  background: linear-gradient(180deg, #f6e7b8 0%, #c9a24a 100%);
  box-shadow: 0 0 8px var(--gold, #c9a24a);
}

.devlog-card-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  border-radius: 50%;
  background: rgba(5, 7, 11, 0.85);
  border: 1px solid var(--line-2, #2a3045);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2, #a59e8b);
  transition: all 0.25s ease;
  margin-top: 1px;
}

.devlog-card-item:hover .devlog-card-badge {
  border-color: rgba(201, 162, 74, 0.4);
  color: var(--text, #d6d3c6);
}

.devlog-card-item.is-active .devlog-card-badge {
  background: linear-gradient(135deg, #e8c97a 0%, #c9a24a 100%);
  color: #05070b;
  font-weight: 800;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(201, 162, 74, 0.5);
}

.devlog-card-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.devlog-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text, #d6d3c6);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  transition: color 0.2s ease;
}

.devlog-card-item:hover .devlog-card-title,
.devlog-card-item.is-active .devlog-card-title {
  color: #fff;
}

.devlog-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted, #6f6a5d);
  line-height: 1.2;
}

.devlog-card-meta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.devlog-card-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--muted, #6f6a5d);
  opacity: 0.35;
  margin-top: 10px;
  transition: all 0.25s ease;
}

.devlog-card-item.is-active .devlog-card-arrow {
  color: var(--gold, #c9a24a);
  opacity: 1;
  transform: translateX(3px);
}

/* ==========================================================================
   READER PANEL (Master Detail Main View)
   ========================================================================== */

.devlog-reader {
  background: linear-gradient(180deg, rgba(14, 18, 27, 0.95) 0%, rgba(6, 9, 14, 0.92) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 162, 74, 0.22);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(201, 162, 74, 0.15);
  padding: 40px 48px 48px;
  min-height: 640px;
  position: relative;
  transition: all 0.3s ease;
}

/* Mobile Back Button */
.devlog-mobile-back-bar {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line, #1c2030);
}

.devlog-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 162, 74, 0.12);
  border: 1px solid rgba(201, 162, 74, 0.3);
  color: var(--gold-2, #e8c97a);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.devlog-back-btn:hover {
  background: rgba(201, 162, 74, 0.22);
  border-color: var(--gold, #c9a24a);
  color: #fff;
}

/* Article Header */
.devlog-article-header {
  margin-bottom: 26px;
}

.devlog-header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.devlog-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  background: rgba(201, 162, 74, 0.12);
  border: 1px solid rgba(201, 162, 74, 0.32);
  border-radius: 30px;
  color: var(--gold-2, #e8c97a);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.devlog-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold, #c9a24a);
  box-shadow: 0 0 8px var(--gold, #c9a24a);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.devlog-article-title {
  font-family: var(--serif, "Cinzel", Georgia, serif);
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.devlog-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 13px;
  color: var(--text-2, #a59e8b);
}

.devlog-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
}

.devlog-meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--gold, #c9a24a);
}

/* Glowing Accent Line */
.devlog-accent-separator {
  position: relative;
  display: flex;
  align-items: center;
  margin: 22px 0 26px;
  height: 2px;
  background: linear-gradient(90deg, rgba(201, 162, 74, 0.6) 0%, rgba(201, 162, 74, 0.1) 70%, transparent 100%);
  border-radius: 2px;
}

.devlog-accent-separator::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-2, #e8c97a);
  box-shadow: 0 0 10px var(--gold, #c9a24a);
}

/* Gallery & Media Section */
.devlog-gallery {
  position: relative;
  margin: 0 0 30px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2, #2a3045);
  background: radial-gradient(circle at center, #182030 0%, #06090e 100%);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75);
}

.devlog-gallery-stage {
  position: relative;
  width: 100%;
  min-height: 380px;
  max-height: 560px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.devlog-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.35s ease;
}

.devlog-gallery-stage:hover .devlog-gallery-img {
  transform: scale(1.02);
}

.devlog-zoom-cue {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(5, 7, 11, 0.88);
  border: 1px solid rgba(201, 162, 74, 0.4);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.devlog-gallery-stage:hover .devlog-zoom-cue {
  opacity: 1;
  transform: translateY(-2px);
  background: rgba(13, 17, 25, 0.95);
  border-color: var(--gold, #c9a24a);
}

/* Gallery Inline Carousel Controls */
.devlog-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(5, 7, 11, 0.8);
  border: 1px solid var(--line-2, #2a3045);
  color: var(--text, #d6d3c6);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.devlog-gallery-nav:hover {
  background: var(--gold, #c9a24a);
  color: #05070b;
  border-color: #fff;
  box-shadow: 0 0 16px rgba(201, 162, 74, 0.5);
}

.devlog-gallery-prev { left: 16px; }
.devlog-gallery-next { right: 16px; }

.devlog-gallery-counter {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(5, 7, 11, 0.88);
  border: 1px solid var(--line-2, #2a3045);
  color: var(--gold-2, #e8c97a);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

/* Article Body Typography */
.devlog-article-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text, #d6d3c6);
}

.devlog-section-block {
  margin-bottom: 24px;
}

.devlog-section-block h3 {
  font-family: var(--serif, "Cinzel", Georgia, serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-2, #e8c97a);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.devlog-section-block h3::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--gold, #c9a24a);
  border-radius: 2px;
}

.devlog-section-block p {
  color: var(--text, #d6d3c6);
  font-size: 15.5px;
  line-height: 1.7;
}

/* Why / Rationale Callout Card */
.devlog-why-card {
  margin: 22px 0 30px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(201, 162, 74, 0.1) 0%, rgba(13, 17, 25, 0.9) 100%);
  border: 1px solid rgba(201, 162, 74, 0.35);
  border-left: 4px solid var(--gold, #c9a24a);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.devlog-why-card h4 {
  font-family: var(--serif, "Cinzel", Georgia, serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-2, #e8c97a);
  margin-bottom: 8px;
}

.devlog-why-card p {
  font-size: 14.5px;
  color: var(--text, #d6d3c6);
  font-style: italic;
  line-height: 1.65;
  margin: 0;
}

/* Action Toolbar */
.devlog-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid var(--line, #1c2030);
}

.devlog-btn-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.devlog-btn-tg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #c9a24a 0%, #9a7628 100%);
  color: #05070b !important;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(201, 162, 74, 0.35);
  transition: all 0.25s ease;
  text-decoration: none;
}

.devlog-btn-tg:hover {
  background: linear-gradient(135deg, #e8c97a 0%, #c9a24a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(201, 162, 74, 0.55);
  color: #000 !important;
}

.devlog-btn-tg svg {
  width: 18px;
  height: 18px;
}

.devlog-btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 17, 25, 0.85);
  border: 1px solid var(--line-2, #2a3045);
  color: var(--text-2, #a59e8b);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.devlog-btn-share:hover {
  background: rgba(24, 30, 46, 0.95);
  border-color: var(--gold, #c9a24a);
  color: #fff;
}

.devlog-btn-share svg {
  width: 15px;
  height: 15px;
}

/* Post Navigation (Prev / Next) */
.devlog-nav-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px dashed var(--line, #1c2030);
}

.devlog-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  background: rgba(13, 17, 25, 0.65);
  border: 1px solid var(--line, #1c2030);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
}

.devlog-nav-btn:hover {
  background: rgba(24, 30, 46, 0.9);
  border-color: rgba(201, 162, 74, 0.35);
  transform: translateY(-2px);
}

.devlog-nav-btn--prev {
  align-items: flex-start;
  text-align: left;
}

.devlog-nav-btn--next {
  align-items: flex-end;
  text-align: right;
}

.devlog-nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold, #c9a24a);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.devlog-nav-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #d6d3c6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.devlog-nav-btn:hover .devlog-nav-title {
  color: #fff;
}

/* ==========================================================================
   LIGHTBOX MODAL & SLIDER
   ========================================================================== */

.devlog-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(3, 4, 7, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 30px;
}

.devlog-modal.is-open {
  display: flex;
  opacity: 1;
}

.devlog-modal-content {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.devlog-modal-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 82vh;
}

.devlog-modal-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 74, 0.35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.95), 0 0 40px rgba(201, 162, 74, 0.15);
  transition: opacity 0.2s ease;
}

.devlog-modal-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  gap: 16px;
}

.devlog-modal-caption {
  color: var(--text, #d6d3c6);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.devlog-modal-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-2, #e8c97a);
  background: rgba(201, 162, 74, 0.15);
  border: 1px solid rgba(201, 162, 74, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Modal Slider Navigation Buttons */
.devlog-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(8, 11, 18, 0.85);
  border: 1px solid rgba(201, 162, 74, 0.4);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.devlog-modal-nav:hover {
  background: var(--gold, #c9a24a);
  color: #05070b;
  border-color: #fff;
  box-shadow: 0 0 20px rgba(201, 162, 74, 0.6);
  transform: translateY(-50%) scale(1.08);
}

.devlog-modal-nav svg {
  width: 24px;
  height: 24px;
}

.devlog-modal-prev { left: -70px; }
.devlog-modal-next { right: -70px; }

.devlog-modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 6px 12px;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.devlog-modal-close:hover {
  opacity: 1;
  color: var(--gold, #c9a24a);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.devlog-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(8, 11, 18, 0.95);
  border: 1px solid var(--gold, #c9a24a);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(201, 162, 74, 0.3);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 30px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.devlog-toast.is-shown {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 1200px) {
  .devlog-layout {
    grid-template-columns: 360px 1fr;
    gap: 24px;
  }
  .devlog-modal-prev { left: 10px; }
  .devlog-modal-next { right: 10px; }
}

@media (max-width: 960px) {
  .devlog-app {
    padding: 0 14px;
  }
  
  .devlog-layout {
    display: block;
  }

  .devlog-sidebar {
    position: static;
    height: 540px;
    margin-bottom: 20px;
  }

  .devlog-reader {
    padding: 26px 20px;
  }

  .devlog-mobile-back-bar {
    display: flex;
  }

  .devlog-app[data-mobile-view="reader"] .devlog-sidebar {
    display: none;
  }

  .devlog-app[data-mobile-view="list"] .devlog-reader {
    display: none;
  }

  .devlog-nav-footer {
    grid-template-columns: 1fr;
  }

  .devlog-nav-btn--next {
    align-items: flex-start;
    text-align: left;
  }

  .devlog-modal-prev { left: 8px; }
  .devlog-modal-next { right: 8px; }
}
