/* ═══════════════════════════════════════════════════════
   CARD DECKS — Page-specific styles
   ═══════════════════════════════════════════════════════ */

.header {
  text-align: center; margin-bottom: 36px; padding-bottom: 32px;
  border-bottom: 1px solid rgba(201,168,76,0.1); position: relative;
}
.header .suit-watermark {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 140px; opacity: 0.02; color: var(--antique-gold);
  pointer-events: none; user-select: none;
}
.header h1 {
  font-family: 'Cinzel', serif; font-size: 34px; font-weight: 900;
  color: var(--antique-gold); letter-spacing: 4px; margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(201,168,76,0.15);
}
.header .subtitle-text {
  color: var(--burgundy-bright); font-size: 12px; font-weight: 700;
  letter-spacing: 5px; text-transform: uppercase; margin-bottom: 10px;
  font-family: 'Cinzel', serif;
}
.header p { color: var(--ivory-dim); font-size: 14px; line-height: 1.6; max-width: 560px; margin: 0 auto; }
.header .suits-divider { margin-top: 16px; font-size: 14px; letter-spacing: 12px; }
.header .red-suit { color: var(--burgundy-bright); }
.header .dark-suit { color: var(--antique-gold-dim); opacity: 0.5; }

/* Stats */
.stats-bar { display: flex; justify-content: center; gap: 40px; margin-bottom: 32px; }
.stat-pill { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-pill .sp-val { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 800; color: var(--antique-gold); }
.stat-pill .sp-label { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ivory-faint); }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 13px; }
.bc-link { color: var(--antique-gold-dim); text-decoration: none; cursor: pointer; transition: color 0.2s; font-weight: 600; }
.bc-link:hover { color: var(--antique-gold); }
.bc-sep { color: var(--ivory-faint); opacity: 0.3; }
.bc-current { color: var(--ivory); font-weight: 700; }

/* Folder Grid */
.folder-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 40px; }
.folder-card {
  background: rgba(8,46,30,0.5); border: 1px solid rgba(201,168,76,0.1);
  border-radius: 14px; padding: 24px 16px; text-align: center;
  cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.folder-card:hover {
  transform: translateY(-6px); border-color: rgba(201,168,76,0.35);
  box-shadow: 0 16px 48px rgba(0,0,0,0.45), 0 0 20px var(--antique-gold-glow);
}
.folder-card::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.05), transparent);
  transition: left 0.5s; pointer-events: none;
}
.folder-card:hover::after { left: 160%; }
.folder-icon { width: 56px; height: 46px; margin: 0 auto 14px; position: relative; }
.folder-icon .fi-back { position: absolute; bottom: 0; left: 0; right: 0; height: 36px; border-radius: 4px 4px 6px 6px; background: var(--antique-gold-dim); opacity: 0.7; }
.folder-icon .fi-tab { position: absolute; top: 0; left: 0; width: 22px; height: 12px; border-radius: 4px 4px 0 0; background: var(--antique-gold-dim); opacity: 0.7; }
.folder-icon .fi-front { position: absolute; bottom: 0; left: 0; right: 0; height: 32px; border-radius: 2px 4px 6px 6px; background: var(--antique-gold); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.folder-card:hover .fi-front { background: var(--antique-gold-bright); }
.folder-year { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 800; color: var(--ivory); margin-bottom: 4px; }
.folder-count { font-size: 11px; color: var(--ivory-faint); font-weight: 500; }
.folder-status { margin-top: 10px; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; display: inline-block; }
.status-active { background: rgba(201,168,76,0.12); color: var(--antique-gold); border: 1px solid rgba(201,168,76,0.2); }
.status-locked { background: rgba(109,100,86,0.1); color: var(--ivory-faint); border: 1px solid rgba(109,100,86,0.15); }
.folder-card.locked { opacity: 0.35; cursor: default; }
.folder-card.locked:hover { transform: none; border-color: rgba(201,168,76,0.1); box-shadow: none; }
.folder-card.locked::after { display: none; }

/* Deck Grid */
.deck-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 40px; }
.deck-card {
  position: relative; border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s;
  aspect-ratio: 3/4; background: rgba(8,46,30,0.5); border: 1px solid rgba(201,168,76,0.1);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 10px; gap: 6px;
}
.deck-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 24px var(--antique-gold-glow);
  border-color: rgba(201,168,76,0.4); z-index: 5;
}
.deck-card::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.06), transparent);
  transition: left 0.6s ease; pointer-events: none; z-index: 2;
}
.deck-card:hover::after { left: 160%; }
.deck-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  z-index: 4; background: var(--antique-gold); opacity: 0.3;
}
.deck-card:hover::before { opacity: 0.7; }
.deck-number { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 800; color: var(--antique-gold-dim); position: absolute; top: 10px; left: 12px; z-index: 3; letter-spacing: 1px; }
.deck-name { font-family: 'Cinzel', serif; font-size: 14px; font-weight: 700; color: var(--ivory); letter-spacing: 0.8px; text-align: center; z-index: 3; padding: 0 8px; text-shadow: 0 2px 8px rgba(0,0,0,0.5); line-height: 1.3; margin-top: auto; margin-bottom: auto; }
.deck-strip { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px 12px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.45)); display: flex; justify-content: space-between; align-items: center; z-index: 3; }
.deck-year-badge { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; color: var(--antique-gold-dim); }
.deck-view-hint { font-size: 9px; font-weight: 600; color: var(--ivory-faint); opacity: 0; transition: opacity 0.3s; }
.deck-card:hover .deck-view-hint { opacity: 1; }

@media (max-width: 800px) {
  .lb-viewer img {
    transform: rotate(90deg);
    max-width: calc(100vh - 140px);
    max-height: 90vw;
  }
}

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(5,5,5,0.96); backdrop-filter: blur(16px); z-index: 200; flex-direction: column; }
.lightbox.open { display: flex; }
.lb-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: rgba(14,14,14,0.9); border-bottom: 1px solid rgba(201,168,76,0.1); z-index: 201; flex-shrink: 0; }
.lb-info { display: flex; flex-direction: column; gap: 2px; }
.lb-title { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; color: var(--antique-gold); letter-spacing: 2px; }
.lb-subtitle { font-size: 11px; color: var(--ivory-faint); font-family: 'JetBrains Mono', monospace; }
.lb-close { width: 40px; height: 40px; border-radius: 10px; background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.15); color: var(--ivory-dim); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.lb-close:hover { background: rgba(201,168,76,0.15); color: var(--ivory); border-color: rgba(201,168,76,0.3); }
.lb-viewer { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; position: relative; }
.lb-viewer img { max-width: 100%; max-height: calc(100vh - 120px); box-shadow: 0 12px 60px rgba(0,0,0,0.6); object-fit: contain; animation: imgFadeIn 0.4s ease-out; }
.lb-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.lbp-icon { width: 120px; height: 160px; border-radius: 12px; background: repeating-linear-gradient(45deg, var(--burgundy-dim), var(--burgundy-dim) 2px, transparent 2px, transparent 8px), var(--burgundy); border: 3px solid var(--antique-gold-dim); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.lbp-icon .lbp-text { font-family: 'Cinzel', serif; font-size: 12px; font-weight: 900; color: var(--antique-gold); letter-spacing: 2px; text-shadow: 0 1px 4px rgba(0,0,0,0.5); text-align: center; line-height: 1.4; }
.lb-placeholder .lbp-title { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; color: var(--ivory-dim); letter-spacing: 1.5px; }
.lb-placeholder .lbp-desc { font-size: 13px; color: var(--ivory-faint); max-width: 360px; }
.lb-placeholder .lbp-path { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--antique-gold-dim); background: rgba(0,0,0,0.3); padding: 8px 14px; border-radius: 8px; margin-top: 4px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(14,14,14,0.7); border: 1px solid rgba(201,168,76,0.15); color: var(--ivory-dim); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; z-index: 202; }
.lb-nav:hover { background: rgba(201,168,76,0.15); color: var(--ivory); border-color: rgba(201,168,76,0.3); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-counter { flex-shrink: 0; text-align: center; padding: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ivory-faint); background: rgba(14,14,14,0.6); border-top: 1px solid rgba(201,168,76,0.06); }

@keyframes imgFadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes deckAppear { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.deck-anim { animation: deckAppear 0.4s ease-out both; }

@media (max-width: 1000px) { .folder-grid, .deck-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px) {
  .folder-grid, .deck-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .header h1 { font-size: 26px; letter-spacing: 2px; }
  .stats-bar { gap: 24px; }
  .stat-pill .sp-val { font-size: 22px; }
  .folder-icon { width: 44px; height: 36px; }
  .folder-icon .fi-back { height: 28px; }
  .folder-icon .fi-tab { width: 18px; height: 10px; }
  .folder-icon .fi-front { height: 25px; }
  .folder-year { font-size: 16px; }
  .deck-name { font-size: 11px; }
  .lb-topbar { padding: 12px 16px; }
  .lb-title { font-size: 15px; }
  .lb-nav { width: 36px; height: 36px; font-size: 16px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}
@media (max-width: 500px) {
  .folder-grid, .deck-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .folder-card { padding: 18px 12px; }
  .folder-year { font-size: 15px; }
  .deck-name { font-size: 10px; }
}
