/* Shared components: nav, buttons, chips, track cards, auth card */

/* ---------- Brand ---------- */

.brand-logo {
  height: 36px;
  width: 36px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  /* Black logo background blends into the dark theme */
  mix-blend-mode: screen;
  animation: logo-glow 4s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 106, 0, 0.25)); }
  50% { filter: drop-shadow(0 0 12px rgba(255, 106, 0, 0.55)); }
}

.brand-logo-lg {
  height: 56px;
  width: 56px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 14px var(--accent-glow);
  margin-right: 8px;
  vertical-align: middle;
}

/* Metallic silver shimmer matching the phoenix mark */
.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(
    110deg,
    #eceef2 0%,
    #9ba0b0 25%,
    #f8f9fc 45%,
    #eceef2 55%,
    #9ba0b0 75%,
    #eceef2 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-shine 5s linear infinite;
}

.brand-name-lg {
  font-size: 1.5rem;
}

/* "DJ" prefix in the NovaSpire orange gradient */
.brand-dj {
  background: var(--gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-shine 5s linear infinite;
}

@keyframes brand-shine {
  to { background-position: -200% center; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-name,
  .brand-dj,
  .brand-logo {
    animation: none;
  }
}

.brand-sub {
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-left: 8px;
  font-weight: 500;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 28px;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  gap: 10px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-soft);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-ghost {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-hover);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-oauth {
  width: 100%;
  padding: 12px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-oauth:hover {
  background: var(--bg-hover);
  border-color: var(--text-faint);
}

/* ---------- Chips ---------- */

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
}

.chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(255, 106, 0, 0.08);
}

/* ---------- Track cards ---------- */

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.track-card:hover {
  background: var(--bg-hover);
  border-color: var(--text-faint);
  transform: translateY(-2px);
}

.track-cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-cover .cover-title {
  font-weight: 700;
  font-size: 1.3rem;
  text-align: center;
  padding: 12px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.02em;
}

.track-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.15s;
}

.track-card:hover .track-play,
.track-card.is-playing .track-play {
  opacity: 1;
}

.track-play svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.track-title {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-top: 4px;
}

.track-eq {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 12px;
  visibility: hidden;
}

.track-card.is-playing .track-eq {
  visibility: visible;
}

.track-eq i {
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: eq 0.9s ease-in-out infinite;
}

.track-eq i:nth-child(1) { height: 60%; animation-delay: 0s; }
.track-eq i:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.track-eq i:nth-child(3) { height: 40%; animation-delay: 0.4s; }

@keyframes eq {
  50% { transform: scaleY(0.4); }
}

/* ---------- Auth ---------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(255, 106, 0, 0.08), transparent),
    var(--bg);
}

.auth-brand {
  margin-bottom: 28px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-sub {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 6px 0 24px;
}

.auth-pending {
  background: rgba(255, 106, 0, 0.08);
  border: 1px solid rgba(255, 106, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.auth-pending-label {
  display: block;
  font-family: var(--font-mono);
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.auth-pending p {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-form input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  font-size: 0.95rem;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.auth-form input:focus {
  border-color: var(--accent);
}

.auth-status {
  min-height: 20px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--accent-soft);
  text-align: center;
}

.auth-status.is-error {
  color: #ff5c5c;
}

.auth-legal {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .nav {
    gap: 16px;
    padding: 12px 16px;
  }

  .nav-links {
    display: none;
  }

  .brand-sub {
    display: none;
  }
}
