/* ============================================
   Magazine Strip Detail Page — 详情页样式
   电影杂志风格 × 胶片卡片 × 文章展示
   ============================================ */

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ===== CSS Variables (继承主页) ===== */
:root {
  --mag-bg: #0a0a0f;
  --mag-bg-strip: #1a1a24;
  --mag-bg-film: #141418;
  --mag-text-primary: #ffffff;
  --mag-text-secondary: #e8e8e8;
  --mag-text-muted: #888898;
  --mag-text-overlay: rgba(255, 255, 255, 0.95);
  --mag-accent: #ff3d00;
  --mag-accent-glow: rgba(255, 61, 0, 0.3);
  --mag-accent-subtle: rgba(255, 61, 0, 0.08);
  --mag-border: rgba(255, 255, 255, 0.08);
  --mag-border-strong: rgba(255, 255, 255, 0.15);
  --mag-shadow-film: 0 0 80px rgba(255, 61, 0, 0.15);
  --mag-font-display: 'Playfair Display', 'Georgia', serif;
  --mag-font-body: 'Crimson Text', 'Georgia', serif;
  --mag-font-mono: 'Courier New', 'Courier', monospace;
  --mag-max-width: 1200px;
}

/* ===== Body ===== */
body {
  font-family: var(--mag-font-body);
  background: var(--mag-bg);
  color: var(--mag-text-primary);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--mag-bg) 0%, var(--mag-bg-strip) 50%, var(--mag-bg) 100%);
  opacity: 0.8;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='filmGrain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23filmGrain)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ===== Navigation ===== */
.mag-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 80px;
  background: linear-gradient(180deg, var(--mag-bg-film) 0%, transparent 100%);
  backdrop-filter: blur(20px);
}

.mag-nav::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--mag-accent) 50%, transparent 100%);
  opacity: 0.3;
}

.mag-nav-inner {
  max-width: var(--mag-max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 32px;
}

.mag-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.mag-logo-mark {
  font-family: var(--mag-font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--mag-accent);
  letter-spacing: -2px;
  text-shadow: 0 0 20px var(--mag-accent-glow);
}

.mag-logo-text {
  font-family: var(--mag-font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--mag-text-primary);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.mag-nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin-left: auto;
}

.mag-nav-links a {
  text-decoration: none;
  color: var(--mag-text-secondary);
  font-family: var(--mag-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.mag-nav-links a:hover {
  color: var(--mag-accent);
}

.mag-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mag-search-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--mag-border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.mag-search-btn:hover {
  background: var(--mag-accent-subtle);
  border-color: var(--mag-accent);
}

.mag-search-btn svg {
  width: 16px;
  height: 16px;
  color: var(--mag-text-secondary);
}

.mag-search-btn:hover svg {
  color: var(--mag-accent);
}

.mag-mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--mag-border);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mag-mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--mag-text-primary);
}

/* ===== Search Overlay ===== */
.mag-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(30px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mag-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mag-search-overlay-inner {
  width: 100%;
  max-width: 700px;
  padding: 0 40px;
}

.mag-search-close {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 44px;
  height: 44px;
  border: 2px solid var(--mag-accent);
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--mag-accent);
  transition: all 0.3s ease;
}

.mag-search-close:hover {
  background: var(--mag-accent);
  color: var(--mag-bg);
}

.mag-search-box {
  position: relative;
  margin-bottom: 32px;
}

.mag-search-box svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--mag-accent);
}

.mag-search-input {
  width: 100%;
  padding: 20px 20px 20px 50px;
  font-family: var(--mag-font-mono);
  font-size: 14px;
  border: 2px solid var(--mag-accent);
  background: transparent;
  color: var(--mag-text-primary);
}

.mag-search-input:focus {
  outline: none;
  box-shadow: 0 0 20px var(--mag-accent-glow);
}

.mag-search-results {
  max-height: 400px;
  overflow-y: auto;
}

.mag-search-empty {
  color: var(--mag-text-muted);
  font-family: var(--mag-font-mono);
  font-size: 12px;
  padding: 20px;
}

.mag-search-result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid var(--mag-border);
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mag-search-result-item:hover {
  background: var(--mag-accent-subtle);
}

.mag-search-result-thumb {
  width: 60px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--mag-border);
}

.mag-search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mag-search-result-cat {
  font-family: var(--mag-font-mono);
  font-size: 9px;
  color: var(--mag-accent);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.mag-search-result-title {
  font-family: var(--mag-font-display);
  font-size: 14px;
  color: var(--mag-text-primary);
}

/* ===== Detail Article ===== */
.mag-detail {
  position: relative;
  z-index: 1;
  max-width: var(--mag-max-width);
  margin: 0 auto;
  padding: 100px 40px 60px;
}

.mag-detail-back {
  margin-bottom: 32px;
}

.mag-back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--mag-accent);
  text-decoration: none;
  font-family: var(--mag-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid var(--mag-accent);
  transition: all 0.3s ease;
}

.mag-back-link::before {
  content: '←';
}

.mag-back-link:hover {
  background: var(--mag-accent);
  color: var(--mag-bg);
}

/* ===== Hero Image ===== */
.mag-detail-hero {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 40px;
  background: var(--mag-bg-film);
}

.mag-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 15, 0.7) 100%);
  z-index: 2;
}

.mag-detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(0.9);
}

.mag-detail-frame-number {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-family: var(--mag-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--mag-accent);
  letter-spacing: 2px;
  z-index: 3;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--mag-accent);
}

/* ===== Article Header ===== */
.mag-detail-header {
  margin-bottom: 40px;
}

.mag-detail-tag {
  display: inline-block;
  padding: 8px 16px;
  background: var(--mag-accent);
  font-family: var(--mag-font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--mag-bg);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.mag-detail-title {
  font-family: var(--mag-font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--mag-text-primary);
  line-height: 1.2;
  letter-spacing: -1px;
}

/* ===== Article Body ===== */
.mag-detail-body {
  max-width: 800px;
  margin-bottom: 60px;
}

.mag-detail-body p {
  font-family: var(--mag-font-body);
  font-size: 18px;
  color: var(--mag-text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.mag-detail-body p:first-child {
  font-size: 20px;
  color: var(--mag-text-primary);
}

.mag-detail-body h2 {
  font-family: var(--mag-font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--mag-text-primary);
  margin-top: 40px;
  margin-bottom: 16px;
}

.mag-detail-body strong {
  color: var(--mag-accent);
  font-weight: 600;
}

/* ===== Related Section ===== */
.mag-related {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--mag-border);
}

.mag-related-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.mag-related-title {
  font-family: var(--mag-font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--mag-text-primary);
}

.mag-related-label {
  font-family: var(--mag-font-mono);
  font-size: 10px;
  color: var(--mag-accent);
  letter-spacing: 2px;
}

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

.mag-related-card {
  position: relative;
  overflow: hidden;
  background: var(--mag-bg-film);
  border: 1px solid var(--mag-border);
  transition: all 0.4s ease;
  display: block;
  text-decoration: none;
  height: 240px;
}

.mag-related-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 15, 0.85) 100%);
  z-index: 2;
  opacity: 0.8;
}

.mag-related-card:hover {
  transform: translateY(-4px);
  border-color: var(--mag-accent);
  box-shadow: var(--mag-shadow-film);
}

.mag-related-card-img {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.mag-related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.92);
  transition: transform 0.6s ease;
}

.mag-related-card:hover .mag-related-card-img img {
  transform: scale(1.05);
}

.mag-related-card-number {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mag-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--mag-accent);
  letter-spacing: 1px;
  z-index: 4;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--mag-accent);
}

.mag-related-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 3;
}

.mag-related-card-title {
  font-family: var(--mag-font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--mag-text-overlay);
  line-height: 1.3;
}

.mag-related-card::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 6px;
  height: 6px;
  background: transparent;
  border: 1px solid var(--mag-border);
  border-radius: 50%;
  z-index: 4;
  opacity: 0.5;
}

.mag-related-card:hover::after {
  opacity: 1;
  border-color: var(--mag-accent);
  background: var(--mag-accent);
}

/* ===== Footer ===== */
.mag-footer {
  position: relative;
  z-index: 1;
  padding: 60px 40px;
  background: var(--mag-bg-film);
  border-top: 2px solid var(--mag-border);
  margin-top: 60px;
}

.mag-footer::before {
  content: 'END';
  position: absolute;
  top: 16px;
  left: 40px;
  font-family: var(--mag-font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--mag-accent);
  letter-spacing: 3px;
}

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

.mag-footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 32px;
}

.mag-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mag-footer-brand-mark {
  font-family: var(--mag-font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--mag-accent);
}

.mag-footer-brand-text {
  font-family: var(--mag-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--mag-text-primary);
  letter-spacing: 2px;
}

.mag-footer-desc {
  font-family: var(--mag-font-body);
  font-size: 14px;
  color: var(--mag-text-muted);
  line-height: 1.6;
  margin-top: 12px;
}

.mag-footer-heading {
  font-family: var(--mag-font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--mag-accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.mag-footer-links {
  list-style: none;
}

.mag-footer-links a {
  font-family: var(--mag-font-mono);
  font-size: 11px;
  color: var(--mag-text-secondary);
  text-decoration: none;
  letter-spacing: 1px;
  display: block;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.mag-footer-links a:hover {
  color: var(--mag-accent);
}

.mag-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--mag-border);
  text-align: center;
}

.mag-footer-bottom span {
  font-family: var(--mag-font-mono);
  font-size: 10px;
  color: var(--mag-text-muted);
  letter-spacing: 1px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .mag-nav-inner { padding: 0 30px; }
  .mag-detail { padding: 90px 30px 60px; }
  .mag-detail-hero { height: 400px; }
  .mag-detail-title { font-size: 36px; }
  .mag-related-grid { grid-template-columns: repeat(2, 1fr); }
  .mag-footer { padding: 40px 30px; }
}

@media (max-width: 768px) {
  .mag-nav { height: 60px; }
  .mag-nav-links { display: none; }
  .mag-mobile-menu-btn { display: flex; }
  .mag-nav-inner { padding: 0 20px; }
  
  .mag-detail { padding: 80px 20px 40px; }
  .mag-detail-hero { height: 300px; }
  .mag-detail-title { font-size: 28px; }
  
  .mag-detail-body p { font-size: 16px; }
  .mag-detail-body p:first-child { font-size: 18px; }
  
  .mag-related-grid { grid-template-columns: 1fr; }
  .mag-related-card { height: 200px; }
  
  .mag-footer { padding: 30px 20px; }
  .mag-footer-top { flex-direction: column; gap: 24px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--mag-bg); }
::-webkit-scrollbar-thumb { background: var(--mag-accent); border-radius: 2px; }

::selection { background: var(--mag-accent); color: var(--mag-bg); }
a { color: inherit; }