.magazine-page-wrapper {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
  display: flex;
  position: relative;
  background-color: var(--bg-deep, #050b14);
  overflow: hidden;
}

/* --- Retractable Sidebar --- */
.year-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 280px;
  background: var(--bg-card, #111c33);
  border-right: 1px solid rgba(59, 130, 246, 0.2);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
  display: flex;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.year-sidebar.collapsed {
  transform: translateX(-280px);
}

.sidebar-content {
  padding: 40px 20px 20px 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.sidebar-content h3 {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  color: var(--text-main, #fff);
  font-size: 1.2rem;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-content h3 i {
  color: var(--accent-primary, #3b82f6);
}

.year-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.year-btn {
  width: 100%;
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 14px 18px;
  border-radius: 8px;
  color: var(--text-muted, #94a3b8);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.year-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-main, #fff);
  border-color: rgba(59, 130, 246, 0.3);
}

.year-btn.active {
  background: var(--accent-primary, #3b82f6);
  color: #fff;
  border-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Sidebar Toggle Tab Button */
.sidebar-toggle-btn {
  position: absolute;
  right: -45px;
  top: 30px;
  width: 45px;
  height: 45px;
  background: var(--bg-card, #111c33);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-left: none;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  color: var(--accent-primary, #3b82f6);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
}

.sidebar-download {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cyber-btn-small {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--accent-primary, #3b82f6);
  color: var(--accent-primary, #3b82f6);
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.cyber-btn-small:hover {
  background: var(--accent-primary, #3b82f6);
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* --- Main Viewer Area --- */
.viewer-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 30px 40px;
  margin-left: 280px; /* Matches sidebar width */
  transition: margin-left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: calc(100vh - 80px);
}

.year-sidebar.collapsed ~ .viewer-container {
  margin-left: 0;
}

.viewer-header {
  margin-bottom: 20px;
}

.space-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text-main, #fff);
  letter-spacing: -1px;
}

.tech-subheading {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  color: var(--accent-primary, #3b82f6);
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 5px;
  opacity: 0.8;
}

.flipbook-frame-wrapper {
  flex-grow: 1;
  background: var(--bg-card, #111c33);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Responsive Handling */
@media (max-width: 900px) {
  .year-sidebar {
    transform: translateX(-280px);
  }
  .year-sidebar.collapsed {
    transform: translateX(0);
  }
  .viewer-container {
    margin-left: 0 !important;
    padding: 20px 15px;
  }
}