* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 43, 43, 0.18), transparent 35%),
    #0b0b0f;
  color: #ffffff;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

.red-mode {
  min-height: 100vh;
}

.landing,
.auth-shell,
.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.landing,
.auth-shell {
  display: grid;
  place-items: center;
}

.app-shell {
  display: grid;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
  align-content: start;
}

.landing-card,
.auth-card,
.card,
.top-card {
  width: 100%;
  background: #121218;
  border: 1px solid #24242c;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.landing-card {
  max-width: 520px;
  text-align: center;
}

.auth-card {
  max-width: 420px;
}

.logo {
  font-size: 30px;
  font-weight: 800;
  color: #ff2b2b;
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  margin: 6px 0 8px;
  font-size: 22px;
}

.subtitle,
.auth-subtitle,
.muted-text {
  color: #b8b8c0;
}

.small-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #7a7a85;
  letter-spacing: 0.08em;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 14px;
  color: #d8d8df;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #2a2a35;
  border-radius: 14px;
  background: #0f0f15;
  color: #fff;
  padding: 14px;
  outline: none;
  font: inherit;
}

.field input {
  height: 48px;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: #ff2b2b;
  box-shadow: 0 0 0 3px rgba(255, 43, 43, 0.12);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font: inherit;
}

.primary-btn {
  background: #ff2b2b;
  color: #fff;
}

.secondary-btn {
  background: #1a1a22;
  color: #fff;
  border: 1px solid #2a2a35;
}

.ghost-btn {
  background: transparent;
  color: #ff2b2b;
  border: 1px solid #3a2020;
}

.text-center {
  text-align: center;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.notice.error {
  background: rgba(255, 77, 79, 0.12);
  border: 1px solid rgba(255, 77, 79, 0.35);
  color: #ffb3b3;
}

.hidden {
  display: none !important;
}

.auth-footer {
  margin-top: 18px;
  color: #b8b8c0;
}

.auth-footer a {
  color: #ff2b2b;
}

.demo-box {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #1a1a22;
  border: 1px solid #2a2a35;
  color: #d8d8df;
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 12px;
}

.landing-actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

@media (min-width: 640px) {
  .landing-actions {
    grid-template-columns: 1fr 1fr;
  }
}
/* ── Track Card ─────────────────────────────────────── */
.track-card {
  border-radius: 16px;
  background: #16161e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
 
.track-card:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}
 
.track-card__inner {
  display: flex;
  gap: 16px;
  padding: 16px;
  align-items: flex-start;
}
 
/* Обложка */
.track-card__art-wrap {
  position: relative;
  flex-shrink: 0;
}
 
.track-card__art {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: #24242c;
}
 
.track-card__art-glow {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  pointer-events: none;
}
 
/* Инфо */
.track-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
 
.track-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1DB954;
  margin-bottom: 2px;
}
 
.track-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1DB954;
  flex-shrink: 0;
  animation: tc-pulse 2s infinite;
}
 
@keyframes tc-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
 
.track-card__name {
  font-size: 15px;
  font-weight: 600;
  color: #f0f0f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
 
.track-card__artists {
  font-size: 13px;
  color: #6e6e80;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
 
/* Прогресс */
.player-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}
 
.player-progress-track {
  position: relative;
  height: 4px;
  background: #2a2a36;
  border-radius: 999px;
  overflow: hidden;
}
 
.player-progress {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  background: transparent;
  outline: none;
  margin: 0;
  padding: 0;
  cursor: default;
  border-radius: 999px;
  /* Заполненная часть через JS-переменную */
  --pct: 0%;
}
 
/* Полоска заполнения через pseudo */
.player-progress-track::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--progress-pct, 0%);
  background: #1DB954;
  border-radius: 999px;
  pointer-events: none;
  transition: width 0.9s linear;
}
 
.player-progress::-webkit-slider-thumb { appearance: none; width: 0; height: 0; }
.player-progress::-moz-range-thumb    { width: 0; height: 0; border: none; }
 
.player-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #4a4a5a;
}
 
/* Кнопка Spotify */
.track-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: #b0b0be;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
 
.track-card__link:hover {
  border-color: #1DB954;
  color: #1DB954;
  background: rgba(29, 185, 84, 0.06);
}

/* ── Bottom Navigation ───────────────────────────────── */
body {
  padding-bottom: 72px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(11, 11, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #1e1e28;
  display: flex;
  align-items: stretch;
  z-index: 100;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: #4a4a5a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
  border-radius: 12px;
  margin: 6px 2px;
}

.nav-link:hover {
  color: #7a7a8a;
}

.nav-link.active {
  color: #ff2b2b;
}

.nav-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-link.active svg {
  filter: drop-shadow(0 0 6px rgba(255, 43, 43, 0.5));
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  background: #ff2b2b;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #0b0b0f;
}
