*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --nav-height: 56px;
  --bg: #000;
  --text: #fff;
  --text-muted: rgba(255,255,255,0.6);
  --accent: #fe2c55;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  height: 100%;
  width: 100%;
  position: relative;
}

/* ── Feed ── */
.feed {
  height: calc(100% - var(--nav-height));
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* ── Card ── */
.card {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 20px 32px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  overflow: hidden;
}

.card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.card-bg canvas {
  width: 100%;
  height: 100%;
}

.card-content {
  position: relative;
  z-index: 1;
}

/* ── Waveform / progress ── */
.waveform-container {
  position: relative;
  height: 64px;
  margin-bottom: 20px;
  cursor: pointer;
}

.waveform-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* ── Play button overlay ── */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.play-overlay.visible {
  opacity: 1;
}

.play-overlay .icon {
  width: 72px;
  height: 72px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-overlay .icon svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

/* ── Text info ── */
.card-meta {
  margin-bottom: 4px;
}

.card-episode {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.card-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ── Actions sidebar ── */
.card-actions {
  position: absolute;
  right: 12px;
  bottom: 140px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.action-btn svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  transition: transform 0.15s, color 0.15s;
}

.action-btn span {
  font-size: 11px;
  color: var(--text-muted);
}

.action-btn.liked svg {
  color: var(--accent);
  fill: var(--accent);
  transform: scale(1.15);
}

.action-btn:active svg {
  transform: scale(0.9);
}

/* ── Podcast avatar ── */
.podcast-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6f61);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid #fff;
  margin-bottom: 4px;
}

/* ── Bottom nav ── */
.bottom-nav {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 10;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 6px 16px;
}

.nav-item.active {
  color: var(--text);
}

.nav-item span {
  font-size: 10px;
  font-weight: 500;
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

/* ── Swipe hint ── */
.swipe-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: hintPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.swipe-hint span {
  font-size: 11px;
  color: var(--text-muted);
}

.swipe-hint svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-4px); }
}

/* ── Desktop tweaks ── */
@media (min-width: 600px) {
  .feed {
    max-width: 420px;
    margin: 0 auto;
    border-left: 1px solid rgba(255,255,255,0.06);
    border-right: 1px solid rgba(255,255,255,0.06);
  }
  .bottom-nav {
    max-width: 420px;
    margin: 0 auto;
    border-left: 1px solid rgba(255,255,255,0.06);
    border-right: 1px solid rgba(255,255,255,0.06);
  }
}
