@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Inter:wght@300;400;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #1a1a1a;
  color: #e8e0d4;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 300px 300px at 5% 20%, rgba(79, 209, 197, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 200px 200px at 95% 70%, rgba(155, 89, 182, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 150px 150px at 80% 10%, rgba(79, 209, 197, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 250px 250px at 15% 85%, rgba(155, 89, 182, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 100px 100px at 50% 50%, rgba(255, 140, 66, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── Layout ── */
.content-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Steampunk border ── */
.page-border {
  position: fixed;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 2px solid #b87333;
  pointer-events: none;
  z-index: 10;
  border-radius: 2px;
}
.page-border::after {
  content: '';
  position: absolute;
  top: 5px; left: 5px; right: 5px; bottom: 5px;
  border: 0.5px solid rgba(184, 115, 51, 0.3);
  border-radius: 1px;
}

.corner-gear {
  position: fixed;
  width: 24px; height: 24px;
  border: 2px solid #b87333;
  border-radius: 50%;
  z-index: 11;
  pointer-events: none;
}
.corner-gear::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  background: #b87333;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.corner-gear.tl { top: 4px; left: 4px; }
.corner-gear.tr { top: 4px; right: 4px; }
.corner-gear.bl { bottom: 4px; left: 4px; }
.corner-gear.br { bottom: 4px; right: 4px; }

/* ── Header ── */
header {
  text-align: center;
  padding: 70px 20px 20px;
  max-width: 800px;
}

.mushroom-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.mushroom {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(79, 209, 197, 0.6));
  animation: mushroomPulse 3s ease-in-out infinite;
}
.mushroom:nth-child(2) { animation-delay: 0.5s; }
.mushroom:nth-child(3) { animation-delay: 1s; }
.mushroom:nth-child(4) { animation-delay: 1.5s; }
.mushroom:nth-child(5) { animation-delay: 2s; }

@keyframes mushroomPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: 3.5rem;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ff8c42, #d4a843, #b87333);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: #4fd1c5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
  text-shadow: 0 0 20px rgba(79, 209, 197, 0.3);
}

.pipe-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 20px;
  max-width: 300px;
}
.pipe-line {
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, transparent, #b87333 30%, #d4a843 50%, #b87333 70%, transparent);
  border-radius: 2px;
}
.pipe-joint {
  width: 12px; height: 12px;
  border: 2px solid #d4a843;
  border-radius: 50%;
  position: relative;
}
.pipe-joint::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: #ff8c42;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(255, 140, 66, 0.6);
}

.tagline {
  font-size: 0.95rem;
  color: #a0998e;
  font-weight: 300;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

.warning-sign {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 16px;
  background: #2a2520;
  border: 1px solid #5a4a30;
  border-radius: 3px;
  font-size: 0.7rem;
  color: #ff8c42;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

/* ── Week navigation bar ── */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 700px;
  width: 100%;
  padding: 16px 40px 4px;
  position: relative;
  z-index: 1;
  gap: 12px;
}
.week-nav-link {
  color: #6b6575;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #3a3045;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.week-nav-link:hover {
  color: #c0b8aa;
  border-color: #b87333;
}
.week-nav-link.home { color: #4fd1c5; border-color: rgba(79,209,197,0.25); }
.week-nav-link.home:hover { border-color: #4fd1c5; }
.week-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: #b87333;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Main content ── */
main {
  max-width: 700px;
  width: 100%;
  padding: 24px 40px 80px;
}

/* ── Section labels ── */
.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label:first-child { margin-top: 0; }
.section-label .label-text {
  color: #4fd1c5;
  text-shadow: 0 0 15px rgba(79, 209, 197, 0.3);
}
.section-label .label-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(79, 209, 197, 0.4), transparent);
}

/* ── Search bar ── */
.search-wrap {
  margin-bottom: 12px;
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: #6b6575;
  pointer-events: none;
}
.search-input {
  width: 100%;
  box-sizing: border-box;
  background: #1e1e24;
  border: 1px solid #3a3045;
  border-radius: 8px;
  padding: 12px 16px 12px 42px;
  color: #f7fafc;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.search-input:focus { border-color: #b87333; }
.search-input::placeholder { color: #4a4450; }
.search-status {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #6b6575;
  min-height: 18px;
}

/* ── Search scope toggle ── */
.search-scope {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.scope-btn {
  background: transparent;
  border: 1px solid #3a3045;
  color: #6b6575;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.scope-btn:hover { border-color: #4fd1c5; color: #4fd1c5; }
.scope-btn.active { background: rgba(79,209,197,0.1); border-color: #4fd1c5; color: #4fd1c5; }

/* ── Type filter buttons ── */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-btn {
  background: transparent;
  border: 1px solid #3a3045;
  color: #6b6575;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: #b87333; color: #c0b8aa; }
.filter-btn.active { background: linear-gradient(135deg, #b87333, #d4a843); border-color: transparent; color: #1a1a1a; }

/* ── Resource cards ── */
.file-card {
  background: linear-gradient(135deg, #1e1e24 0%, #232028 100%);
  border: 1px solid #3a3045;
  border-radius: 10px;
  padding: 28px 30px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.file-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, #4fd1c5, #9b59b6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.file-card:hover { border-color: rgba(79, 209, 197, 0.3); box-shadow: 0 0 30px rgba(79, 209, 197, 0.05), 0 4px 20px rgba(0,0,0,0.3); }
.file-card:hover::before { opacity: 1; }

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.file-title {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: #ff8c42;
  text-shadow: 0 0 20px rgba(255, 140, 66, 0.2);
}
.file-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: #4fd1c5;
  background: rgba(79, 209, 197, 0.1);
  border: 1px solid rgba(79, 209, 197, 0.25);
  padding: 3px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  white-space: nowrap;
}
.file-desc {
  font-size: 0.9rem;
  color: #c0b8aa;
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 300;
}
.file-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.file-meta span {
  font-size: 0.75rem;
  color: #6b6575;
  display: flex;
  align-items: center;
  gap: 4px;
}
.meta-dot {
  width: 4px; height: 4px;
  background: #9b59b6;
  border-radius: 50%;
  display: inline-block;
}

/* ── Topic pills ── */
.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.pill {
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  font-weight: 400;
}
.pill-teal { color: #4fd1c5; background: rgba(79, 209, 197, 0.08); border: 1px solid rgba(79, 209, 197, 0.15); }
.pill-purple { color: #b87dd8; background: rgba(155, 89, 182, 0.08); border: 1px solid rgba(155, 89, 182, 0.15); }
.pill-amber { color: #ff8c42; background: rgba(255, 140, 66, 0.08); border: 1px solid rgba(255, 140, 66, 0.15); }

/* ── Buttons ── */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff8c42, #d4a843);
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 11px 26px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(255, 140, 66, 0.35); }
.download-btn svg { width: 16px; height: 16px; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(155,89,182,0.15);
  color: #b87dd8;
  border: 1px solid rgba(155,89,182,0.3);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
}
.copy-btn:hover { background: rgba(155,89,182,0.25); border-color: rgba(155,89,182,0.5); }
.copy-btn.copied { background: rgba(79,209,197,0.15); color: #4fd1c5; border-color: rgba(79,209,197,0.3); }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Prompt preview ── */
.prompt-preview {
  display: none;
  margin-top: 16px;
  background: #15151a;
  border: 1px solid #3a3045;
  border-radius: 6px;
  padding: 16px;
  font-size: 0.82rem;
  color: #c0b8aa;
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: 'Inter', sans-serif;
  max-height: 300px;
  overflow-y: auto;
}

/* ── Week map cards (homepage) ── */
.week-card {
  display: block;
  text-decoration: none;
  background: linear-gradient(135deg, #1e1e24 0%, #232028 100%);
  border: 1px solid #3a3045;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.week-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, #ff8c42, #b87333);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.week-card:hover { border-color: rgba(255,140,66,0.3); box-shadow: 0 0 30px rgba(255, 140, 66, 0.05), 0 4px 20px rgba(0,0,0,0.3); }
.week-card:hover::before { opacity: 1; }

.week-card.coming-soon {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.week-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.week-number-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: #b87333;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.week-status {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 10px;
}
.week-status.live { color: #4fd1c5; background: rgba(79,209,197,0.1); border: 1px solid rgba(79,209,197,0.25); }
.week-status.soon { color: #6b6575; background: rgba(107,101,117,0.1); border: 1px solid rgba(107,101,117,0.2); }

.week-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: #ff8c42;
  margin-bottom: 8px;
}
.week-card-desc {
  font-size: 0.88rem;
  color: #c0b8aa;
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 14px;
}
.week-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
.resource-count {
  font-size: 0.74rem;
  color: #6b6575;
}
.enter-mine {
  font-size: 0.78rem;
  font-weight: 600;
  color: #b87333;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.week-card:hover .enter-mine { color: #ff8c42; }

/* ── Bottom week navigation ── */
.bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #2a2a30;
  gap: 12px;
}
.bottom-nav-link {
  color: #6b6575;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid #3a3045;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.bottom-nav-link:hover { color: #c0b8aa; border-color: #b87333; }
.bottom-nav-link.next { justify-content: flex-end; text-align: right; }
.bottom-nav-link.home-center { justify-content: center; flex: 0 0 auto; font-size: 0.74rem; }

/* ── Support compact card ── */
.support-compact {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.support-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79,209,197,0.06);
  border: 1px solid rgba(79,209,197,0.2);
  border-radius: 8px;
  padding: 10px 16px;
  text-decoration: none;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 200px;
}
.support-pill:hover { background: rgba(79,209,197,0.1); border-color: rgba(79,209,197,0.35); }
.support-pill-title { font-size: 0.8rem; font-weight: 600; color: #4fd1c5; }
.support-pill-sub { font-size: 0.7rem; color: #6b6575; }

/* ── Global search results ── */
.search-results {
  display: none;
}
.search-result-card {
  background: #1e1e24;
  border: 1px solid #3a3045;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
}
.search-result-card:hover { border-color: rgba(79,209,197,0.3); }
.result-week { font-size: 0.68rem; color: #b87333; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; font-family: 'Cinzel', serif; }
.result-title { font-size: 0.95rem; color: #ff8c42; font-family: 'Cinzel', serif; margin-bottom: 4px; }
.result-desc { font-size: 0.82rem; color: #c0b8aa; line-height: 1.4; }
.result-type { display: inline-block; margin-top: 6px; font-size: 0.62rem; font-weight: 600; color: #4fd1c5; background: rgba(79,209,197,0.1); border: 1px solid rgba(79,209,197,0.2); padding: 2px 8px; border-radius: 8px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 50px 20px 40px;
  position: relative;
  z-index: 1;
}
.footer-pipes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}
.footer-pipe { flex: 1; height: 2px; background: linear-gradient(90deg, transparent, #5a4a30, transparent); }
.footer-bolt { width: 6px; height: 6px; background: #b87333; border-radius: 50%; }
footer p { font-size: 0.8rem; color: #4a4450; }
footer a { color: #b87333; text-decoration: none; transition: color 0.3s; }
footer a:hover { color: #ff8c42; }
.footer-tagline { font-family: 'Cinzel', serif; font-size: 0.75rem; color: #3a3045; letter-spacing: 0.15em; text-transform: uppercase; margin-top: 8px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  h1 { font-size: 2.2rem; }
  .file-header { flex-direction: column; gap: 8px; }
  main { padding: 20px 20px 60px; }
  header { padding: 50px 20px 15px; }
  .week-nav { padding: 12px 20px 4px; }
  .bottom-nav { flex-wrap: wrap; }
}

/* ── Shared animation ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
