/* Sleep player, Party mode, Soundboard, Spine-Tingler */

.hr-le-sleep-card {
  max-width: 520px;
  margin: 0 auto 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(244, 131, 27, 0.25);
  background: rgba(30, 30, 30, 0.9);
}

.hr-party-stage {
  position: relative;
  min-height: 42vh;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #2a1538 0%, #0d0d12 70%);
  border: 1px solid #333;
}

.hr-party-stage canvas {
  display: block;
  width: 100%;
  height: 320px;
}

.hr-party-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.hr-sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  max-width: 720px;
}

.hr-sound-btn {
  min-height: 3.5rem;
  font-weight: 600;
  border-radius: 10px;
}

.hr-spine-meter-wrap {
  width: 100%;
  max-width: 36rem;
  margin: 0.25rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.hr-spine-meter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  width: 100%;
}

.hr-spine-meter-head__hint {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: rgba(200, 186, 218, 0.88);
}

.hr-spine-meter-scale {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: -0.15rem;
  padding: 0 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(180, 168, 200, 0.75);
  user-select: none;
}

/* Station tabs: clear selected vs idle (per-button color comes from inline `color` / `border-color`) */
.hr-spine-tab {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border-radius: 999px;
  opacity: 0.82;
  transition: opacity 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.hr-spine-tab:hover {
  opacity: 1;
}

.hr-spine-tab.active {
  opacity: 1;
  font-weight: 700;
  box-shadow: 0 0 0 2px currentColor;
  background-color: rgba(244, 131, 27, 0.12);
}

@supports (background: color-mix(in srgb, red, transparent)) {
  .hr-spine-tab.active {
    background-color: color-mix(in srgb, currentColor 26%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hr-spine-tab {
    transition: none;
  }
}

@keyframes hrSpineRewardPulse {
  0% {
    filter: brightness(1);
  }
  45% {
    filter: brightness(1.12) drop-shadow(0 0 28px rgba(244, 131, 27, 0.45));
  }
  100% {
    filter: brightness(1);
  }
}

.hr-spine-shell.hr-spine-reward-flash {
  animation: hrSpineRewardPulse 0.85s ease-out 1;
}

@media (prefers-reduced-motion: reduce) {
  .hr-spine-shell.hr-spine-reward-flash {
    animation: none;
    filter: brightness(1.08);
  }
}

@keyframes hrSpineVotePop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

.hr-spine-vote--pop {
  animation: hrSpineVotePop 0.48s ease-out 1;
}

.hr-spine-reward-toast {
  color: #f8d49a;
  text-shadow: 0 0 14px rgba(244, 131, 27, 0.4);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.hr-spine-reward-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.hr-spine-shell {
  position: relative;
  transition: filter 0.6s ease, box-shadow 0.6s ease;
}

.hr-spine-shell--chill {
  filter: brightness(1);
}

.hr-spine-shell--mid {
  filter: brightness(0.95);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.25);
}

.hr-spine-shell--spooky {
  filter: brightness(0.88);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.45);
}

.hr-spine-cobwebs {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 18px,
    rgba(255, 255, 255, 0.04) 18px,
    rgba(255, 255, 255, 0.04) 19px
  );
}

.hr-spine-cobwebs--on {
  opacity: 0.35;
}

.hr-party-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(circle at 50% 120%, rgba(244, 131, 27, 0.12), transparent 55%);
}

.hr-party-overlay--on {
  opacity: 1;
}

body.hr-party-fullscreen {
  overflow: hidden;
}

body.hr-party-fullscreen .hr-party-overlay--on {
  opacity: 0.55;
}

/* Spine-Tingler page atmosphere */
.hr-spine-mist {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.14;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(144, 46, 187, 0.38), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 100%, rgba(244, 131, 27, 0.18), transparent 50%);
}

.hr-spine-page-section {
  position: relative;
}

.hr-spine-header-band .hr-page-heading {
  text-shadow: 0 0 40px rgba(144, 46, 187, 0.35), 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hr-spine-header-band .hr-section-label {
  color: rgba(232, 210, 255, 0.92);
}

.hr-spine-panel {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(244, 131, 27, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, transparent 42%),
    linear-gradient(168deg, rgba(32, 24, 40, 0.98), rgba(12, 10, 18, 0.99));
  box-shadow:
    0 16px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 80px rgba(144, 46, 187, 0.08);
  overflow: hidden;
}

.hr-spine-panel::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(244, 131, 27, 0.65), rgba(144, 46, 187, 0.5), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.hr-spine-panel__inner {
  position: relative;
  z-index: 1;
  padding: 1.45rem 1.5rem 1.65rem;
}

.hr-spine-panel__kicker {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #e4d8f2;
  margin-bottom: 1.1rem;
  padding-left: 0.85rem;
  border-left: 3px solid rgba(244, 131, 27, 0.55);
}

.hr-spine-now-card {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 200, 150, 0.12);
  background: linear-gradient(165deg, rgba(20, 14, 28, 0.92), rgba(10, 8, 16, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 28px rgba(0, 0, 0, 0.35);
}

.hr-spine-now-card__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 180, 220, 0.75);
  margin-bottom: 0.45rem;
}

.hr-spine-track-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #ffe8c8;
  text-shadow: 0 0 14px rgba(244, 131, 27, 0.3);
}

.hr-spine-stats-line {
  color: #c4b8d4;
}

.hr-spine-meter-label {
  color: #f2e8ff;
  font-weight: 700;
}

/* Custom range: ghost thumb, mood gradient track (aligned with panel, not centered alone) */
.hr-spine-range {
  width: 100%;
  height: 2.75rem;
  margin: 0.15rem 0 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.hr-spine-range:focus {
  outline: none;
}

.hr-spine-range:focus-visible {
  outline: 2px solid rgba(244, 131, 27, 0.55);
  outline-offset: 4px;
  border-radius: 6px;
}

.hr-spine-range::-webkit-slider-runnable-track {
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5a4a78 0%, #8b4a9e 35%, #c45a28 72%, #f4831b 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.hr-spine-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  margin-top: -14.5px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 248, 240, 0.96);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 36'%3E%3Cpath fill='%23fff4ec' stroke='%23c9a07a' stroke-width='0.5' d='M16 2C9 2 4 7 4 14v12c0 2.5 2 4.5 4.5 4.5.6 0 1.2-.2 1.7-.5l1.8-1.2 1.8 1.2c.5.3 1.1.5 1.7.5s1.2-.2 1.7-.5l1.8-1.2 1.8 1.2c.5.3 1.1.5 1.7.5 2.5 0 4.5-2 4.5-4.5V14C28 7 23 2 16 2z'/%3E%3Ccircle cx='11.5' cy='14' r='2' fill='%232a1f32'/%3E%3Ccircle cx='20.5' cy='14' r='2' fill='%232a1f32'/%3E%3Cpath fill='none' stroke='%235c4d66' stroke-width='1' stroke-linecap='round' d='M13 23c1.2 1.4 2.6 1.5 4 0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center 52%;
  background-size: 29px;
  box-shadow:
    0 3px 14px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(244, 131, 27, 0.35);
  cursor: grab;
}

.hr-spine-range:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.04);
}

.hr-spine-range::-moz-range-track {
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5a4a78 0%, #8b4a9e 35%, #c45a28 72%, #f4831b 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.hr-spine-range::-moz-range-thumb {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 248, 240, 0.96);
  background-repeat: no-repeat;
  background-position: center 52%;
  background-size: 29px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 36'%3E%3Cpath fill='%23fff4ec' stroke='%23c9a07a' stroke-width='0.5' d='M16 2C9 2 4 7 4 14v12c0 2.5 2 4.5 4.5 4.5.6 0 1.2-.2 1.7-.5l1.8-1.2 1.8 1.2c.5.3 1.1.5 1.7.5s1.2-.2 1.7-.5l1.8-1.2 1.8 1.2c.5.3 1.1.5 1.7.5 2.5 0 4.5-2 4.5-4.5V14C28 7 23 2 16 2z'/%3E%3Ccircle cx='11.5' cy='14' r='2' fill='%232a1f32'/%3E%3Ccircle cx='20.5' cy='14' r='2' fill='%232a1f32'/%3E%3Cpath fill='none' stroke='%235c4d66' stroke-width='1' stroke-linecap='round' d='M13 23c1.2 1.4 2.6 1.5 4 0'/%3E%3C/svg%3E");
  box-shadow:
    0 3px 14px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(244, 131, 27, 0.35);
  cursor: grab;
}

.hr-spine-range:active::-moz-range-thumb {
  cursor: grabbing;
  transform: scale(1.04);
}

.hr-spine-vote-btn {
  align-self: flex-start;
  margin-top: 0.35rem;
  box-shadow: 0 4px 22px rgba(244, 131, 27, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .hr-spine-range:active::-webkit-slider-thumb,
  .hr-spine-range:active::-moz-range-thumb {
    transform: none;
  }
}

/* Sleep timer chips + countdown */
.hr-sleep-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f5ecff;
  margin-bottom: 0.35rem;
}

.hr-sleep-chip.hr-sleep-chip--active {
  border-color: rgba(244, 131, 27, 0.85) !important;
  color: #ffb36b !important;
  background: rgba(244, 131, 27, 0.14);
  font-weight: 700;
}

.hr-sleep-countdown {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffc49a;
  text-shadow: 0 0 18px rgba(244, 131, 27, 0.35);
  letter-spacing: 0.04em;
}

.hr-sleep-tips li {
  margin-bottom: 0.25rem;
}
