/* PINFEST Wrap Pile — NEON GOBLIN CANVAS
   Neon glow effects · slime borders · pulsing container
*/

/* ── Section ──────────────────────────────────────────────────────────────── */
#wrap-pile-section {
  margin-bottom: 2rem;
}

#wrap-pile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

#wrap-pile-header h2 {
  font-family: 'Bungee', cursive;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#wrap-pile-header h2::before {
  content: '▸';
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
}

#wrap-pile-count strong {
  color: var(--green);
  font-size: 1rem;
  text-shadow: 0 0 10px var(--green-glow);
  transition: font-size 0.4s ease, color 0.4s ease, text-shadow 0.4s ease;
  display: inline-block;
}

/* NEW RECORD label */
#new-record-label {
  color: #ff0044;
  font-size: 1.1rem;
  font-family: 'Bungee', cursive;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-right: 0.4rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#new-record-label.visible {
  opacity: 1;
}

/* RGB rainbow cycling for 45+ */
@keyframes rgbCycle {
  0%   { color: hsl(0,   100%, 60%); text-shadow: 0 0 16px hsl(0,   100%, 55%); }
  16%  { color: hsl(60,  100%, 60%); text-shadow: 0 0 16px hsl(60,  100%, 55%); }
  33%  { color: hsl(120, 100%, 60%); text-shadow: 0 0 16px hsl(120, 100%, 55%); }
  50%  { color: hsl(180, 100%, 60%); text-shadow: 0 0 16px hsl(180, 100%, 55%); }
  66%  { color: hsl(240, 100%, 60%); text-shadow: 0 0 16px hsl(240, 100%, 55%); }
  83%  { color: hsl(300, 100%, 60%); text-shadow: 0 0 16px hsl(300, 100%, 55%); }
  100% { color: hsl(360, 100%, 60%); text-shadow: 0 0 16px hsl(360, 100%, 55%); }
}

@keyframes rgbLabelCycle {
  0%   { color: hsl(0,   100%, 65%); }
  16%  { color: hsl(60,  100%, 65%); }
  33%  { color: hsl(120, 100%, 65%); }
  50%  { color: hsl(180, 100%, 65%); }
  66%  { color: hsl(240, 100%, 65%); }
  83%  { color: hsl(300, 100%, 65%); }
  100% { color: hsl(360, 100%, 65%); }
}

#wrap-pile-count-val.rainbow {
  animation: rgbCycle 1.4s linear infinite;
}

#new-record-label.rainbow {
  animation: rgbLabelCycle 1.4s linear infinite;
}

#wraps-consumed-label {
  color: var(--green);
  font-size: 0.75rem;
  transition: color 0.4s ease;
}

#wraps-consumed-label.rainbow {
  animation: rgbLabelCycle 1.4s linear infinite;
}
#wrap-pile-container {
  position: relative;
  width: 100%;
  height: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: default;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow:
    inset 0 0 60px rgba(0, 255, 136, 0.03),
    0 0 20px rgba(0, 0, 0, 0.4);
}

#wrap-pile-container:hover {
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow:
    inset 0 0 60px rgba(0, 255, 136, 0.05),
    0 0 30px rgba(0, 255, 136, 0.1),
    0 0 20px rgba(0, 0, 0, 0.4);
}

/* Static top border */
#wrap-pile-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
  opacity: 0.7;
  z-index: 10;
  border-radius: 12px 12px 0 0;
}

/* ── Canvas ─────────────────────────────────────────────────────────────────── */
#wrap-pile-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ── Empty state ─────────────────────────────────────────────────────────────── */
#wrap-pile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 0.5rem;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
}

#wrap-pile-empty .empty-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Tooltip — Neon card ──────────────────────────────────────────────────── */
#wrap-tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--surface2);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  min-width: 160px;
  max-width: 240px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(0, 255, 136, 0.15),
    inset 0 0 8px rgba(0, 255, 136, 0.05);
}

#wrap-tooltip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
  border-radius: 10px 10px 0 0;
}

#wrap-tooltip.visible {
  opacity: 1;
}

#wrap-tooltip .tt-type {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent2);
  margin-bottom: 0.3rem;
  text-shadow: 0 0 8px rgba(255, 194, 51, 0.4);
}

#wrap-tooltip .tt-user {
  font-size: 0.85rem;
  color: var(--green);
  margin-bottom: 0.2rem;
  font-weight: 600;
}

#wrap-tooltip .tt-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

#wrap-tooltip .tt-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.3rem;
  border-top: 1px solid rgba(42, 42, 62, 0.5);
  padding-top: 0.3rem;
}

#wrap-tooltip .tt-id {
  font-size: 0.65rem;
  color: var(--purple);
  margin-top: 0.3rem;
  opacity: 0.6;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #wrap-pile-container { height: 220px; }
}

@media (max-width: 480px) {
  #wrap-pile-container { height: 180px; }
}
