/* ── Reset & tokens ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --void:   #080810;
  --panel:  #0f0f1a;
  --edge:   #1a1a2e;
  --glow:   #7c3aed;
  --pulse:  #a855f7;
  --hot:    #ec4899;
  --gold:   #f59e0b;
  --mint:   #10b981;
  --slate1: #e2e8f0;
  --slate4: #94a3b8;
  --slate5: #64748b;
  --slate6: #475569;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius-card: 1rem;
  --radius-btn:  0.75rem;
  --radius-pill: 9999px;

  --shadow-glow:   0 0 40px rgba(124,58,237,.4);
  --shadow-pulse:  0 0 60px rgba(168,85,247,.6);
  --shadow-hot:    0 0 40px rgba(236,72,153,.4);
  --shadow-gold:   0 0 60px rgba(245,158,11,.5), 0 0 120px rgba(245,158,11,.15);
  --shadow-mint:   0 0 30px rgba(16,185,129,.3);
}

/* ── Base ────────────────────────────────────────────────────────────── */
html, body { height: 100%; }

body {
  background: var(--void);
  color: var(--slate1);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--panel); }
::-webkit-scrollbar-thumb { background: var(--glow); border-radius: 2px; }

/* ── Layout ──────────────────────────────────────────────────────────── */
#pz-root { min-height: 100vh; display: flex; flex-direction: column; }
#pz-main { flex: 1; }

/* ── Header ──────────────────────────────────────────────────────────── */
#pz-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,16,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}

.pz-header-inner {
  max-width: 32rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ── Logo ────────────────────────────────────────────────────────────── */
.pz-logo { font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.pz-logo-poof { color: var(--pulse); }
.pz-logo-zz   { color: var(--hot); }

/* ── Streak badge ────────────────────────────────────────────────────── */
.pz-streak-badge {
  display: flex;
  align-items: center;
  gap: .375rem;
  background: var(--edge);
  border-radius: var(--radius-pill);
  padding: .25rem .75rem;
}
.pz-streak-icon  { font-size: .875rem; }
.pz-streak-count { font-family: var(--font-mono); font-weight: 700; color: var(--gold); font-size: .875rem; }
.pz-streak-label { color: var(--slate4); font-size: .75rem; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
#pz-nav { display: flex; align-items: center; gap: .75rem; }
.pz-nav-link {
  font-size: .875rem;
  font-weight: 500;
  color: var(--slate4);
  transition: color .15s;
}
.pz-nav-link:hover, .pz-nav-link.active { color: var(--pulse); }
.pz-nav-logout {
  font-size: .75rem;
  color: var(--slate5);
  transition: color .15s;
}
.pz-nav-logout:hover { color: #f87171; }

/* ── Footer ──────────────────────────────────────────────────────────── */
#pz-footer {
  border-top: 1px solid var(--edge);
  padding: 1.5rem 1rem;
}
.pz-footer-inner {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
}
.pz-footer-brand { font-weight: 700; font-size: 1rem; margin-bottom: .25rem; }
.pz-footer-copy  { font-size: .75rem; color: var(--slate5); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.pz-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .875rem 1.5rem;
  background: linear-gradient(135deg, var(--glow), var(--hot));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .05em;
  border-radius: var(--radius-btn);
  transition: opacity .15s, transform .1s;
  box-shadow: var(--shadow-glow);
  animation: glow-ring 2s ease-in-out infinite;
  border: none;
}
.pz-btn-primary:hover  { opacity: .9; }
.pz-btn-primary:active { transform: scale(.96); }
.pz-btn-primary:disabled { opacity: .5; cursor: wait; animation: none; }
.pz-btn-full { width: 100%; }

.pz-btn-claimed {
  display: block;
  width: 100%;
  padding: .875rem;
  border-radius: var(--radius-btn);
  background: rgba(16,185,129,.1);
  border: 1px solid var(--mint);
  color: var(--mint);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  cursor: default;
}

/* ── Feed page ───────────────────────────────────────────────────────── */
.pz-feed-page    { position: relative; }
.pz-feed-container, .pz-auth-wall { min-height: calc(100vh - 3.5rem); }

/* ── Auth wall ───────────────────────────────────────────────────────── */
.pz-auth-wall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}
.pz-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.pz-glow-orb--1 {
  width: 24rem; height: 24rem;
  top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(124,58,237,.1);
}
.pz-glow-orb--2 {
  width: 16rem; height: 16rem;
  top: 50%; left: 50%;
  transform: translate(-50%);
  background: rgba(236,72,153,.05);
}
.pz-auth-wall-content { position: relative; z-index: 1; text-align: center; }
.pz-auth-wall-logo {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: .5rem;
}
.pz-auth-wall-tag {
  color: var(--slate4);
  font-size: .9375rem;
  margin-bottom: 2rem;
}

/* ── Feed ────────────────────────────────────────────────────────────── */
.pz-feed-container { position: relative; }
.pz-pulse-bar {
  position: fixed;
  top: 3.5rem;
  left: 0; right: 0;
  height: 2px;
  background: var(--pulse);
  opacity: 0;
  transition: opacity .3s;
  z-index: 99;
  pointer-events: none;
}
.pz-pulse-bar.active { opacity: 1; }

.pz-feed {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pz-feed-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 0;
  text-align: center;
}
.pz-watching-icon {
  width: 4rem; height: 4rem;
  background: var(--edge);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  animation: pulse-opacity 2s ease-in-out infinite;
}
.pz-watching-label { color: var(--slate4); font-weight: 500; margin-bottom: .25rem; }
.pz-watching-sub   { color: var(--slate5); font-size: .875rem; }

/* ── Drop card ───────────────────────────────────────────────────────── */
.pz-card {
  position: relative;
  border-radius: var(--radius-card);
  border: 2px solid;
  background: var(--panel);
  overflow: hidden;
  animation: card-in .4s cubic-bezier(.34,1.56,.64,1);
  transition: transform .3s, opacity .3s, box-shadow .3s;
}
.pz-card--common    { border-color: #475469; }
.pz-card--rare      { border-color: #3b82f6; box-shadow: 0 0 30px rgba(59,130,246,.3); }
.pz-card--ultra     { border-color: #a855f7; box-shadow: var(--shadow-pulse); }
.pz-card--legendary {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.pz-card--legendary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,transparent,rgba(245,158,11,.1),transparent);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  pointer-events: none;
  border-radius: var(--radius-card);
}
.pz-card--exiting { transform: scale(.93); opacity: 0; }
.pz-card--claimed { transform: scale(1.03); border-color: var(--mint) !important; box-shadow: var(--shadow-mint) !important; }

.pz-card-img {
  width: 100%; height: 12rem;
  object-fit: cover;
  display: block;
}

.pz-card-body { padding: 1.25rem; }

/* Timer bar */
.pz-timer-track {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--edge);
}
.pz-timer-bar {
  height: 100%;
  transition: width 1s linear, background .5s;
}
.pz-timer-bar--ok     { background: var(--mint); }
.pz-timer-bar--warn   { background: var(--gold); }
.pz-timer-bar--danger { background: var(--hot); animation: pulse-opacity 1s ease-in-out infinite; }

/* Card header row */
.pz-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  margin-top: .25rem;
}
.pz-card-type-row { display: flex; align-items: center; gap: .5rem; }
.pz-card-icon { font-size: 1.5rem; }
.pz-rarity-badge {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .125rem .5rem;
  border-radius: var(--radius-pill);
}
.pz-rarity-badge--common    { background: #1e293b; color: var(--slate4); }
.pz-rarity-badge--rare      { background: rgba(59,130,246,.15); color: #60a5fa; }
.pz-rarity-badge--ultra     { background: rgba(168,85,247,.15); color: #c084fc; }
.pz-rarity-badge--legendary { background: rgba(245,158,11,.15); color: var(--gold); }
.pz-card-type-label { font-size: .75rem; color: var(--slate5); margin-top: .125rem; }

/* Countdown number */
.pz-countdown {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.875rem;
  color: #fff;
  line-height: 1;
  tabular-nums: true;
  transition: color .3s;
}
.pz-countdown--danger { color: var(--hot); animation: pulse-opacity 1s ease-in-out infinite; }

/* Card content */
.pz-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  margin-bottom: .5rem;
}

/* Product block */
.pz-product-block {
  background: var(--edge);
  border-radius: .75rem;
  padding: .75rem;
  margin-bottom: .75rem;
}
.pz-product-price-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .375rem; }
.pz-product-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gold);
}
.pz-product-stock {
  font-size: .75rem;
  color: var(--mint);
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: var(--radius-pill);
  padding: .125rem .5rem;
}
.pz-product-sku      { font-family: var(--font-mono); font-size: .75rem; color: var(--slate5); }
.pz-product-category {
  display: inline-block;
  font-size: .75rem;
  color: var(--slate4);
  background: #1e293b;
  border-radius: var(--radius-pill);
  padding: .125rem .5rem;
  margin-top: .25rem;
}

.pz-card-body-text { color: #cbd5e1; font-size: .875rem; line-height: 1.6; margin-bottom: 1.25rem; }

/* Claim button */
.pz-claim-btn {
  width: 100%;
  padding: 1rem;
  border-radius: .75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: .05em;
  color: #fff;
  background: linear-gradient(135deg, var(--glow), var(--hot));
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  animation: glow-ring 2s ease-in-out infinite;
}
.pz-claim-btn--product { background: linear-gradient(135deg, var(--gold), var(--hot)); }
.pz-claim-btn:hover    { opacity: .9; }
.pz-claim-btn:active   { transform: scale(.97); }
.pz-claim-btn:disabled { background: var(--edge); color: var(--slate4); cursor: wait; animation: none; }

/* ── Vault page ───────────────────────────────────────────────────────── */
.pz-vault-page { max-width: 32rem; margin: 0 auto; padding: 1.5rem 1rem; }

.pz-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.pz-stat-card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: .75rem;
  padding: .75rem;
  text-align: center;
}
.pz-stat-icon  { font-size: 1.125rem; margin-bottom: .125rem; }
.pz-stat-value { font-family: var(--font-mono); font-weight: 700; font-size: 1.25rem; }
.pz-stat-value--gold   { color: var(--gold); }
.pz-stat-value--amber  { color: #fbbf24; }
.pz-stat-value--mint   { color: var(--mint); }
.pz-stat-label { color: var(--slate5); font-size: .75rem; }

.pz-vault-title { font-weight: 700; font-size: 1.0625rem; color: #cbd5e1; margin-bottom: 1rem; }
.pz-vault-count { color: var(--slate5); font-weight: 400; font-size: .875rem; margin-left: .25rem; }

.pz-vault-list { display: flex; flex-direction: column; gap: .75rem; }

.pz-vault-item {
  background: var(--panel);
  border: 1px solid;
  border-radius: .75rem;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.pz-vault-item--common    { border-color: #334155; }
.pz-vault-item--rare      { border-color: #2563eb; }
.pz-vault-item--ultra     { border-color: #9333ea; }
.pz-vault-item--legendary { border-color: #d97706; }

.pz-vault-item-icon { font-size: 1.25rem; margin-top: .125rem; flex-shrink: 0; }
.pz-vault-item-name { font-weight: 600; font-size: .875rem; color: #fff; margin-bottom: .25rem; }
.pz-vault-item-body { color: var(--slate4); font-size: .75rem; line-height: 1.5; }
.pz-vault-item-meta {
  font-family: var(--font-mono);
  font-size: .6875rem;
  color: var(--slate5);
  margin-top: .375rem;
}
.pz-vault-rarity {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: .1875rem;
}
.pz-vault-rarity--common    { color: var(--slate4); }
.pz-vault-rarity--rare      { color: #60a5fa; }
.pz-vault-rarity--ultra     { color: #c084fc; }
.pz-vault-rarity--legendary { color: var(--gold); }

.pz-vault-empty { text-align: center; padding: 6rem 0; color: var(--slate4); }
.pz-vault-empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }

/* Pagination */
.pz-pagination { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.pz-page-btn {
  padding: .4375rem 1rem;
  background: var(--edge);
  border-radius: .5rem;
  font-size: .875rem;
  color: #cbd5e1;
  transition: background .15s;
  border: none;
  cursor: pointer;
}
.pz-page-btn:hover:not(:disabled) { background: var(--panel); }
.pz-page-btn:disabled { opacity: .4; cursor: default; }
.pz-page-info { font-family: var(--font-mono); font-size: .875rem; color: var(--slate4); }

/* ── 404 page ──────────────────────────────────────────────────────────── */
.pz-404 {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: calc(100vh - 7rem);
  text-align: center; padding: 2rem;
}
.pz-404-icon  { font-size: 3rem; margin-bottom: 1rem; }
.pz-404-title { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: .5rem; }
.pz-404-sub   { color: var(--slate4); margin-bottom: 2rem; }

/* ── Page content ──────────────────────────────────────────────────────── */
.pz-page-content { max-width: 40rem; margin: 0 auto; padding: 2rem 1rem; }
.pz-article-title { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 1rem; }
.pz-article-body { color: #cbd5e1; line-height: 1.8; }
.pz-article-body a { color: var(--pulse); text-decoration: underline; }
.pz-article-body h2 { font-size: 1.25rem; font-weight: 600; color: #fff; margin: 1.5rem 0 .5rem; }
.pz-article-body p  { margin-bottom: 1rem; }

/* ── Auth modal ────────────────────────────────────────────────────────── */
.pz-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  z-index: 200;
}
.pz-modal-overlay[hidden] { display: none; }

.pz-modal-box {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 1.25rem;
  padding: 1.75rem;
  width: 100%; max-width: 22rem;
  position: relative;
}
.pz-auth-logo {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: .375rem;
}
.pz-auth-tagline {
  text-align: center;
  color: var(--slate4);
  font-size: .875rem;
  margin-bottom: 1.5rem;
}

/* Tab bar */
.pz-tab-bar {
  display: flex;
  background: var(--edge);
  border-radius: .75rem;
  padding: .25rem;
  margin-bottom: 1.25rem;
}
.pz-tab {
  flex: 1; padding: .5rem;
  border-radius: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .875rem;
  color: var(--slate4);
  transition: all .15s;
  text-transform: capitalize;
  border: none;
  cursor: pointer;
  background: none;
}
.pz-tab.active { background: var(--glow); color: #fff; }

/* Form elements */
.pz-label {
  display: block;
  font-size: .75rem;
  color: var(--slate4);
  font-weight: 500;
  margin-bottom: .375rem;
}
.pz-input {
  width: 100%;
  background: var(--edge);
  border: 1px solid var(--edge);
  border-radius: .625rem;
  padding: .6875rem 1rem;
  font-size: .875rem;
  color: #fff;
  outline: none;
  margin-bottom: .875rem;
  transition: border-color .15s;
}
.pz-input::placeholder { color: var(--slate6); }
.pz-input:focus { border-color: var(--glow); }

.pz-error-box {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: .625rem;
  padding: .625rem .875rem;
  color: #f87171;
  font-size: .875rem;
  margin-bottom: .875rem;
}
.pz-error-box[hidden] { display: none; }

.pz-auth-footer { text-align: center; font-size: .75rem; color: var(--slate5); margin-top: 1rem; }
.pz-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 1.5rem; line-height: 1;
  color: var(--slate4); background: none; border: none;
  cursor: pointer; transition: color .15s;
}
.pz-modal-close:hover { color: #fff; }

/* ── Toast ─────────────────────────────────────────────────────────────── */
.pz-toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--glow);
  border-radius: var(--radius-pill);
  padding: .625rem 1.25rem;
  font-size: .875rem;
  color: #fff;
  z-index: 300;
  animation: toast-in .3s ease;
  white-space: nowrap;
}
.pz-toast[hidden] { display: none; }

/* ── Skeleton loaders ──────────────────────────────────────────────────── */
.pz-skeleton {
  background: linear-gradient(90deg, var(--edge) 0%, var(--panel) 50%, var(--edge) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: .5rem;
}

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes card-in {
  from { opacity: 0; transform: scale(.88) translateY(2rem); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
@keyframes glow-ring {
  0%, 100% { box-shadow: 0 0 20px rgba(124,58,237,.4); }
  50%       { box-shadow: 0 0 50px rgba(168,85,247,.7); }
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(.75rem); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .pz-header-inner { gap: .5rem; }
  .pz-countdown    { font-size: 1.5rem; }
  .pz-stats-grid   { grid-template-columns: 1fr; }
}
