/* ─────────────────────────────────────────────────────────────────────────────
   PrestigeListens — Bespoke Creative UI Engine
   Inspired by top GitHub Explore projects:
   Magic UI, React Bits, Aceternity UI, AudioMotion-Analyzer, ElevenLabs UI, cmdk
   Zero cookie-cutter templates • Bespoke tactile physics & custom audio shaders
───────────────────────────────────────────────────────────────────────────── */

/* ── 1. Tactile Shimmer Buttons ────────────────────────────────────────────── */
@property --shimmer-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes shimmerRotate {
  0% { --shimmer-angle: 0deg; }
  100% { --shimmer-angle: 360deg; }
}

@keyframes buttonRaySweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-shimmer {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #10172a 0%, #070b14 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  transition: border-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

.btn-shimmer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from var(--shimmer-angle) at 50% 50%,
    transparent 0deg,
    transparent 280deg,
    #38bdf8 320deg,
    #a855f7 350deg,
    transparent 360deg
  );
  animation: shimmerRotate 4s linear infinite;
  z-index: -2;
  opacity: 0.85;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  background: linear-gradient(180deg, #0e1629 0%, #050811 100%);
  border-radius: 8.5px;
  z-index: -1;
  transition: background 0.25s ease;
}

.btn-shimmer:hover {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 30px rgba(56, 189, 248, 0.28);
  transform: translateY(-1.5px);
}

.btn-shimmer:hover::before {
  opacity: 1;
  animation-duration: 2.2s;
}

.btn-shimmer:active {
  transform: translateY(1.5px) scale(0.985);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-shimmer-secondary {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1 !important;
}

.btn-shimmer-secondary::before {
  background: conic-gradient(
    from var(--shimmer-angle) at 50% 50%,
    transparent 0deg,
    transparent 290deg,
    rgba(255, 255, 255, 0.5) 330deg,
    rgba(148, 163, 184, 0.8) 360deg
  );
  opacity: 0.5;
}

.btn-shimmer-secondary::after {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(6, 10, 19, 0.98) 100%);
}

.btn-shimmer-secondary:hover {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.btn-shimmer-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-shimmer-sm::after {
  border-radius: 6.5px;
}

.btn-shimmer-emerald {
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-shimmer-emerald::before {
  background: conic-gradient(
    from var(--shimmer-angle) at 50% 50%,
    transparent 0deg,
    transparent 280deg,
    #10b981 320deg,
    #34d399 350deg,
    transparent 360deg
  );
}

/* ── 2. Border Beam Dynamic Lighting ───────────────────────────────────────── */
.border-beam-box {
  position: relative;
  border-radius: 18px;
  padding: 1px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.border-beam-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from var(--shimmer-angle) at 50% 50%,
    transparent 0deg,
    transparent 280deg,
    rgba(56, 189, 248, 0.95) 325deg,
    rgba(168, 85, 247, 0.9) 350deg,
    transparent 360deg
  );
  animation: shimmerRotate 6s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.border-beam-box > * {
  position: relative;
  z-index: 1;
  border-radius: 17px;
  background: #080d1a;
}

/* ── 3. Cursor-Reactive Spotlight Cards ────────────────────────────────────── */
.spotlight-card {
  position: relative;
  border-radius: 16px;
  background: rgba(11, 17, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(56, 189, 248, 0.12),
    transparent 45%
  );
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.spotlight-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 2;
}

/* ── 4. Acoustic Radial Ripple Effect ──────────────────────────────────────── */
.acoustic-ripple-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  pointer-events: none;
  z-index: 0;
}

.acoustic-ripple-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  border: 1px solid rgba(56, 189, 248, 0.3);
  animation: acousticRingExpand 4.5s cubic-bezier(0.1, 0.5, 0.3, 1) infinite;
}

.acoustic-ripple-ring:nth-child(1) { width: 140px; height: 140px; animation-delay: 0s; }
.acoustic-ripple-ring:nth-child(2) { width: 240px; height: 240px; animation-delay: 1.1s; border-color: rgba(168, 85, 247, 0.22); }
.acoustic-ripple-ring:nth-child(3) { width: 360px; height: 360px; animation-delay: 2.2s; border-color: rgba(56, 189, 248, 0.15); }
.acoustic-ripple-ring:nth-child(4) { width: 480px; height: 480px; animation-delay: 3.3s; border-color: rgba(168, 85, 247, 0.08); }

@keyframes acousticRingExpand {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  25% { opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* ── 5. Word-by-Word Live Text Streaming (Aceternity UI effect) ─────────────── */
.streaming-word {
  display: inline-block;
  opacity: 0;
  filter: blur(5px);
  transform: translateY(3px);
  animation: streamWordFadeIn 0.38s ease forwards;
}

@keyframes streamWordFadeIn {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* ── 6. Rolling Number Telemetry Ticker ────────────────────────────────────── */
.number-ticker {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-variant-numeric: tabular-nums;
  display: inline-block;
  transition: color 0.3s ease;
}

/* ── 7. Decrypted Text / Cipher Glitch ──────────────────────────────────────── */
.cipher-text {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

/* ── 8. Universal Spotlight Command Palette (cmdk style) ────────────────────── */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.cmd-palette-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-palette-modal {
  width: 100%;
  max-width: 620px;
  background: #090e1d;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  transform: scale(0.96) translateY(-8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-palette-overlay.open .cmd-palette-modal {
  transform: scale(1) translateY(0);
}

.cmd-palette-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cmd-palette-icon {
  width: 20px;
  height: 20px;
  color: #38bdf8;
  flex-shrink: 0;
}

.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1.05rem;
}

.cmd-palette-input::placeholder {
  color: #64748b;
}

.cmd-palette-esc-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
}

.cmd-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-group-title {
  padding: 8px 12px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.cmd-item:hover,
.cmd-item.selected {
  background: rgba(56, 189, 248, 0.12);
  color: #ffffff;
}

.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmd-item-icon {
  width: 18px;
  height: 18px;
  color: #38bdf8;
  flex-shrink: 0;
}

.cmd-item-badge {
  font-size: 0.70rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.cmd-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}

/* ── 9. Spring-Physics Floating Action Dock ────────────────────────────────── */
.floating-tactile-dock {
  position: fixed;
  bottom: 24px;
  right: 28px;
  left: auto;
  transform: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(9, 14, 29, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.dock-drag-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 32px;
  cursor: grab;
  color: #64748b;
  font-size: 13px;
  letter-spacing: -1px;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.dock-drag-grip:hover {
  opacity: 1;
  color: #38bdf8;
}

.dock-drag-grip:active {
  cursor: grabbing;
}

.floating-tactile-dock.is-collapsed {
  padding: 6px;
  border-radius: 50%;
  gap: 0;
}

.floating-tactile-dock.is-collapsed .dock-btn,
.floating-tactile-dock.is-collapsed .dock-separator,
.floating-tactile-dock.is-collapsed .dock-drag-grip {
  display: none !important;
}

.floating-tactile-dock .dock-expand-btn {
  display: none;
}

.floating-tactile-dock.is-collapsed .dock-expand-btn {
  display: inline-flex;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, color 0.2s ease;
}

.dock-btn svg {
  width: 20px;
  height: 20px;
}

.dock-btn:hover {
  transform: translateY(-5px) scale(1.15);
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.dock-btn:active {
  transform: translateY(-1px) scale(1.04);
}

.dock-btn .dock-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.dock-btn:hover .dock-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dock-separator {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

@media (max-width: 768px) {
  .floating-tactile-dock {
    bottom: 16px;
    right: 16px;
    left: auto;
    padding: 6px 10px;
    gap: 6px;
  }
  .dock-btn {
    width: 36px;
    height: 36px;
  }
  .dock-btn svg {
    width: 17px;
    height: 17px;
  }
}

/* ── 10. Monoline Precision Icon System ────────────────────────────────────── */
.icon-mono {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke-width: 1.75;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.15em;
}

/* ── 11. Minimalist Cyber Live Stream Activity Ticker ──────────────────────── */
.cyber-stream-ticker {
  width: 100%;
  overflow: hidden;
  background: rgba(8, 13, 26, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 0;
  position: relative;
}

.cyber-ticker-track {
  display: flex;
  gap: 32px;
  width: max-content;
  animation: cyberTickerScroll 36s linear infinite;
}

.cyber-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes cyberTickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.cyber-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.80rem;
  color: #cbd5e1;
  font-family: var(--font-mono, monospace);
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.cyber-ticker-item .micro-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.cyber-ticker-item .micro-eq span {
  width: 2.5px;
  background: #38bdf8;
  border-radius: 1px;
  animation: microEqBar 1s ease-in-out infinite alternate;
}

.cyber-ticker-item .micro-eq span:nth-child(2) { animation-delay: 0.2s; background: #818cf8; }
.cyber-ticker-item .micro-eq span:nth-child(3) { animation-delay: 0.4s; background: #34d399; }

@keyframes microEqBar {
  0% { height: 2px; }
  100% { height: 12px; }
}

/* ── 12. Animated SVG Data Beam Connectors (Aceternity UI) ──────────────────── */
.animated-beam-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.beam-path-bg {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1.5;
  fill: none;
}

.beam-path-pulse {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 16 140;
  animation: beamFlow 3s linear infinite;
}

.beam-pulse-cyan {
  stroke: #38bdf8;
  filter: drop-shadow(0 0 4px #38bdf8);
  animation-duration: 2.8s;
}

.beam-pulse-purple {
  stroke: #c084fc;
  filter: drop-shadow(0 0 4px #c084fc);
  animation-duration: 3.4s;
}

.beam-pulse-emerald {
  stroke: #34d399;
  filter: drop-shadow(0 0 4px #34d399);
  animation-duration: 2.5s;
}

@keyframes beamFlow {
  from { stroke-dashoffset: 156; }
  to { stroke-dashoffset: 0; }
}

@media (max-width: 860px) {
  .animated-beam-svg {
    display: none;
  }
}
