/* ==========================
   Scifi Funk: PS-Style Home
   /css/home-panel.css
   ========================== */


/* --------------------------
   Panel container (gunmetal)
   -------------------------- */

.ps-panel {
  position: relative;
  margin: 18px auto 10px;
  padding: 18px 18px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);

  /* PS-series dark gunmetal */
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.10),
      rgba(0,0,0,0.18)
    ),
    #384248;

  box-shadow:
    0 14px 40px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -1px 0 rgba(0,0,0,0.45);

  overflow: hidden;
}

/* Wear layer: edge darkening + grime near joins */
.ps-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* edge wear vignette */
    radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,0.06), rgba(0,0,0,0) 55%),
    radial-gradient(120% 110% at 50% 100%, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%),
    radial-gradient(120% 120% at 0% 50%, rgba(0,0,0,0.55), rgba(0,0,0,0) 60%),
    radial-gradient(120% 120% at 100% 50%, rgba(0,0,0,0.55), rgba(0,0,0,0) 60%),

    /* faint “finger grime” patches */
    radial-gradient(120px 90px at 18% 38%, rgba(0,0,0,0.16), rgba(0,0,0,0) 70%),
    radial-gradient(160px 120px at 78% 42%, rgba(0,0,0,0.12), rgba(0,0,0,0) 72%),
    radial-gradient(180px 120px at 42% 78%, rgba(255,255,255,0.04), rgba(0,0,0,0) 75%);
  opacity: 0.90;
}

/* Very subtle micro-variation lines */
.ps-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.012),
      rgba(255,255,255,0.012) 1px,
      rgba(0,0,0,0.012) 2px,
      rgba(0,0,0,0.012) 4px
    );
  mix-blend-mode: overlay;
  opacity: 0.32;
}


/* --------------------------
   Label area (Korg-style)
   -------------------------- */

.ps-label {
  position: relative;
  padding: 6px 8px 10px;
}

.ps-brand__name {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.05;
  text-transform: uppercase;

  color: #b8cee3;

  text-shadow:
    0 1px 0 rgba(255,255,255,0.18),
    0 -1px 0 rgba(0,0,0,0.60);
}

.ps-brand__sub {
  margin-top: 6px;
  font-size: 0.98rem;
  line-height: 1.25;
  color: #9fb6cc;
}


/* --------------------------
   PS double rule with embedded label
   (fixed spacing + equal stroke look)
   -------------------------- */

.ps-section-divider {
  position: relative;
  margin-top: 12px;
  margin-bottom: 16px;
  height: 22px;               /* gives real space between the lines */
}

/* top and bottom yellow rules — identical geometry */
.ps-section-divider::before,
.ps-section-divider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 210, 70, 0.92);
  border-radius: 2px;
}

.ps-section-divider::before { top: 0; }
.ps-section-divider::after  { bottom: 0; opacity: 0.90; } /* optical match */

/* label centered between the rules */
.ps-section-divider__label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  padding: 2px 12px;
  line-height: 1.2;

  font-family:
    "Arial Narrow",
    Arial,
    "Helvetica Neue",
    Helvetica,
    system-ui,
    sans-serif;

  font-weight: 900;
  letter-spacing: 0.10em;
  font-size: 0.86rem;
  text-transform: uppercase;

  color: rgba(255, 210, 70, 0.92);
  background: transparent;
}


/* --------------------------
   Blue divider below the buttons
   -------------------------- */

.ps-blue-divider {
  margin: 14px 8px 0;
  height: 3px;
  border-radius: 2px;
  background: #b8cee3;
}


/* --------------------------
   6-key strip (LED above)
   -------------------------- */

.ps-strip {
  position: relative;
  margin-top: 14px;
  padding: 12px 10px 14px;
  border-radius: 10px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(0,0,0,0.10));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.45);

  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.ps-slot {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  text-decoration: none;
  padding: 6px 2px 0;
}

.ps-slot:focus-visible {
  outline: none;
}

/* Red LED above */
.ps-slot__led {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(60, 10, 10, 0.65);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.12),
    0 1px 2px rgba(0,0,0,0.50);
  margin-bottom: 6px;
}

/* Single-digit program number */
.ps-slot__num {
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 0.80rem;
  color: rgba(255, 210, 70, 0.92);
  margin-bottom: 6px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.55);
}

/* Key: shorter height, but filled by 2 lines */
.ps-key {
  width: 100%;
  display: block;
  text-align: center;
  padding: 10px 8px 10px;
  border-radius: 7px;

  background: linear-gradient(to bottom, rgba(255,255,255,0.88), rgba(235, 228, 205, 0.86));
  border: 1px solid rgba(0,0,0,0.25);

  box-shadow:
    0 7px 14px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.85),
    inset 0 -8px 18px rgba(0,0,0,0.08);

  user-select: none;
  transform: translateY(0);
  transition: transform 120ms ease, box-shadow 140ms ease, filter 140ms ease;
  overflow: hidden;
}

/* Button header legend */
.ps-key__label {
  display: block;

  font-family:
    "Arial Narrow",
    Arial,
    "Helvetica Neue",
    Helvetica,
    system-ui,
    sans-serif;

  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 0.86rem;
  color: rgba(20, 22, 24, 0.92);

  -webkit-text-stroke: 0.25px rgba(0,0,0,0.35);
  text-shadow:
    0 0 0 rgba(0,0,0,0.6),
    0 0.3px 0 rgba(0,0,0,0.35);
}

/* For long legends that must fit (e.g., CYBERPUNK, SCRIPTURE) */
.ps-key__label--thin {
  letter-spacing: 0.00em;
}

.ps-key__hint {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: rgba(20, 22, 24, 0.72);
}

.ps-slot:hover .ps-key,
.ps-slot:focus-visible .ps-key {
  transform: translateY(-1px);

  /* keep the normal plastic background (prevents hotspots) */
  background: linear-gradient(to bottom, rgba(255,255,255,0.88), rgba(235, 228, 205, 0.86));

  box-shadow:
    /* warm inner glow (more obvious, still even) */
    inset 0 0 14px rgba(255, 120, 60, 0.28),
    inset 0 0 28px rgba(255, 120, 60, 0.18),

    /* warm rim (reads as light catching the edges) */
    inset 0 0 0 1px rgba(255, 140, 70, 0.32),

    /* your original plastic definition */
    inset 0 1px 0 rgba(255,255,255,0.85),
    inset 0 -10px 22px rgba(0,0,0,0.10),

    /* lift */
    0 10px 18px rgba(0,0,0,0.38);

  filter: brightness(1.03) saturate(1.04);
}

.ps-slot:hover .ps-slot__led,
.ps-slot:focus-visible .ps-slot__led {
  background: rgba(240, 55, 45, 0.95);

  box-shadow:
    /* core glow */
    0 0 6px rgba(255, 80, 70, 0.95),

    /* outer halo */
    0 0 12px rgba(255, 90, 80, 0.75),
    0 0 22px rgba(255, 110, 100, 0.45),

    /* tiny highlight so it still reads as a lens */
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.45);
}




.ps-slot:hover .ps-key,
.ps-slot:focus-visible .ps-key {
  transform: translateY(-1px);

  box-shadow:
    0 0 18px rgba(255, 210, 70, 0.28), /* yellow aura */
    0 10px 18px rgba(0,0,0,0.38),
    inset 0 1px 0 rgba(255,255,255,0.85),
    inset 0 -10px 22px rgba(0,0,0,0.10);

  filter: brightness(1.04);
}
/* Active press */
.ps-slot:active .ps-key {
  transform: translateY(2px);
  box-shadow:
    0 5px 10px rgba(0,0,0,0.34),
    inset 0 2px 0 rgba(255,255,255,0.65),
    inset 0 12px 22px rgba(0,0,0,0.14);
}

/* Responsive: 2 rows of 3 */
@media (max-width: 860px) {
  .ps-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* --------------------------
   Display module (featured)
   -------------------------- */

.ps-display {
  margin-top: 16px;
  padding: 12px 12px 10px;
  border-radius: 10px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(0,0,0,0.12));
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.35);
}

.ps-display__top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ps-display__title {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: rgba(245, 248, 252, 0.78);
}

.ps-display__meta {
  font-size: 1.0rem;
  line-height: 1.25;
  color: rgba(245, 248, 252, 0.88);
}

.ps-display__meta a {
  color: rgba(245, 248, 252, 0.96);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.ps-display__sep {
  margin: 0 6px;
  opacity: 0.65;
}

.ps-display__tag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(20, 22, 24, 0.92);
  background: rgba(255, 170, 65, 0.88);
}

.ps-audio {
  margin-top: 10px;
  width: 100%;
}

.ps-display__empty {
  margin-top: 8px;
  color: rgba(245, 248, 252, 0.70);
}


/* --------------------------
   Small note (optional)
   -------------------------- */

.ps-note {
  margin-top: 10px;
  padding: 0 2px;
  font-size: 0.92rem;
  color: rgba(245, 248, 252, 0.70);
}
