/* =============================================================================
   DREADLIST V2 - Premium Public Profile Styles
   Inspired by: Sequel, Letterboxd, Trakt.tv
   ============================================================================= */

:root {
  --blood: #8b0000;
  --blood-bright: #dc143c;
  --blood-dark: #5a0010;
  --bone: #f5e6d3;
  --bone-dim: #c9b89d;
  --void: #0a0a0a;
  --void-light: #1a1a1a;
  --void-card: #141414;
  --void-card-hover: #1f1f1f;
  --gray: #888;
  --gray-light: #aaa;
  --gray-dark: #444;
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(220, 20, 60, 0.3);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(220, 20, 60, 0.15);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-serif: 'Cinzel', 'Playfair Display', serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body.profile-page {
  background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
}

/* ===== NAVIGATION ===== */
.public-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.public-nav .brand {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--blood-bright);
  text-decoration: none;
  text-shadow: 0 0 20px rgba(220, 20, 60, 0.4);
}

.public-nav .actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.public-nav .actions a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.public-nav .actions a:hover { color: var(--bone); }

.public-nav .cta-mini {
  padding: 8px 16px;
  background: var(--blood-bright);
  color: white !important;
  border-radius: 999px;
  font-weight: 600;
}

/* ===== MAIN CONTAINER ===== */
.public-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}

@media (min-width: 768px) {
  .public-main { padding: 20px; }
}

/* ===== PROFILE HERO V2 ===== */
.profile-page-v2 {
  position: relative;
}

.profile-hero-v2 {
  position: relative;
  padding: 40px 20px 30px;
  background: linear-gradient(180deg, rgba(139, 0, 0, 0.15) 0%, transparent 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.profile-hero-v2.has-cover {
  padding-top: 80px;
}

.profile-hero-v2.has-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
  filter: blur(2px) brightness(0.4);
  z-index: 0;
}

.hero-overlay-v2 {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.95) 100%);
  z-index: 1;
}

.hero-content-v2 {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

@media (min-width: 600px) {
  .hero-content-v2 {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 24px;
  }
}

.profile-avatar-v2,
.profile-avatar-placeholder-v2 {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--blood-bright);
  box-shadow: 0 0 30px rgba(220, 20, 60, 0.5), 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.profile-avatar-v2 {
  object-fit: cover;
}

.profile-avatar-placeholder-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blood);
  color: var(--bone);
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 900;
}

.hero-info-v2 {
  flex: 1;
  min-width: 0;
}

.profile-name-v2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--bone);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

@media (min-width: 600px) {
  .profile-name-v2 { font-size: 40px; }
}

.profile-handle-v2 {
  margin: 4px 0 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gray-light);
}

.profile-bio-v2 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--bone-dim);
  max-width: 500px;
}

.profile-meta-v2 {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

@media (min-width: 600px) {
  .profile-meta-v2 { justify-content: flex-start; }
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  font-size: 11px;
  color: var(--gray-light);
  border: 1px solid var(--border);
}

/* ===== NOW WATCHING CARD V2 ===== */
.now-watching-section {
  padding: 0 20px;
  margin-top: -20px;
  position: relative;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.now-watching-card-v2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 50px;
  background: linear-gradient(135deg,
    rgba(220, 20, 60, 0.18) 0%,
    rgba(20, 20, 24, 0.95) 100%);
  border: 1px solid var(--blood-bright);
  border-radius: var(--radius);
  box-shadow:
    0 8px 32px rgba(220, 20, 60, 0.25),
    0 0 0 1px rgba(220, 20, 60, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: slideDownIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDownIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pulse animation - dot + ring */
.nw-pulse-wrapper {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
}

.nw-pulse-dot {
  position: absolute;
  inset: 0;
  background: var(--blood-bright);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--blood-bright);
  animation: pulse-dot 2s ease-in-out infinite;
}

.nw-pulse-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--blood-bright);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.8; }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.nw-poster-v2,
.nw-poster-placeholder {
  width: 60px;
  height: 90px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nw-poster-v2 { object-fit: cover; }
.nw-poster-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--void-card); font-size: 28px;
}

.nw-info-v2 {
  flex: 1;
  min-width: 0;
}

.nw-label-v2 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--blood-bright);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.nw-title-v2 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  line-height: 1.2;
}

.nw-year-v2 {
  color: var(--gray-light);
  font-weight: 400;
  font-size: 14px;
}

.nw-episode-v2 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bone-dim);
  margin: 2px 0;
}

.nw-meta-v2 {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  color: var(--gray);
  margin-top: 4px;
}

.nw-source-v2 {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ===== STATS BAR ===== */
.stats-bar-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 24px 20px 16px;
}

@media (min-width: 600px) {
  .stats-bar-v2 {
    grid-template-columns: repeat(6, 1fr);
  }
}

.stat-card-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  background: var(--void-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.stat-card-v2:hover,
.stat-card-v2:focus {
  border-color: var(--blood-bright);
  background: var(--void-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(220, 20, 60, 0.15);
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 900;
  color: var(--blood-bright);
  line-height: 1;
}

.stat-label {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-light);
}

/* ===== MONTH IN REVIEW ===== */
.month-review-card {
  margin: 16px 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.12), rgba(20, 20, 24, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.month-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--blood-bright);
}

.month-emoji { font-size: 16px; }

.month-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

.month-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 900;
  color: var(--bone);
}

.month-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== PROFILE SECTIONS ===== */
.profile-section {
  padding: 24px 20px;
  border-top: 1px solid var(--border);
}

.section-title-v2 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.5px;
}

/* ===== ACTIVITY FEED ===== */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-emoji {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.activity-poster {
  width: 40px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.activity-info { flex: 1; min-width: 0; }

.activity-text {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--bone);
  line-height: 1.4;
}

.activity-verb { color: var(--gray-light); }
.activity-title { font-weight: 600; }
.activity-year { color: var(--gray); font-size: 12px; }
.activity-rating { color: #f59e0b; margin-left: 6px; }

.activity-time {
  margin: 0;
  font-size: 11px;
  color: var(--gray);
  font-family: var(--font-mono);
}

/* ===== MOVIE GRID ===== */
.movie-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .movie-grid-v2 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  .movie-grid-v2 { grid-template-columns: repeat(6, 1fr); }
}

.movie-card-v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--void-card);
  transition: transform 0.2s;
}

.movie-card-v2:hover {
  transform: translateY(-4px);
}

.movie-poster-v2,
.movie-poster-placeholder-v2 {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.movie-poster-placeholder-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--blood-dark), var(--void-card));
}

.movie-rating-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #f59e0b;
  font-size: 10px;
  border-radius: 4px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.movie-title-v2 {
  display: block;
  padding: 6px 8px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bone);
  line-height: 1.3;
}

.movie-year-v2 {
  display: block;
  padding: 0 8px 8px;
  font-size: 10px;
  color: var(--gray);
  font-family: var(--font-mono);
}

.section-cta {
  margin: 16px 0 0;
  text-align: center;
}

/* ===== BADGES ===== */
.badges-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .badges-grid-v2 { grid-template-columns: repeat(6, 1fr); }
}

.badge-item-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--void-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: help;
  transition: all 0.2s;
}

.badge-item-v2:hover {
  border-color: var(--blood-bright);
  transform: scale(1.05);
}

.badge-icon-v2 { font-size: 32px; }

.badge-name-v2 {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  color: var(--bone-dim);
}

/* ===== LISTS ===== */
.lists-grid-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  .lists-grid-v2 { grid-template-columns: repeat(2, 1fr); }
}

.list-card-v2 {
  display: block;
  padding: 16px;
  background: var(--void-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--bone);
  transition: all 0.2s;
}

.list-card-v2:hover {
  border-color: var(--blood-bright);
  background: var(--void-card-hover);
}

.list-card-v2 h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
}

.list-desc-v2 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--gray-light);
  line-height: 1.4;
}

.list-count-v2 {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(220, 20, 60, 0.15);
  color: var(--blood-bright);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ===== STALKERS ===== */
.stalkers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stalker-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--void-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--bone);
  font-size: 13px;
  transition: all 0.2s;
}

.stalker-pill:hover {
  border-color: var(--blood-bright);
  background: var(--void-card-hover);
}

.stalker-avatar,
.stalker-avatar-ph {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stalker-avatar { object-fit: cover; }

.stalker-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blood);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

/* ===== CTA ===== */
.profile-cta-section {
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

@media (min-width: 600px) {
  .profile-cta-section {
    flex-direction: row;
    justify-content: center;
  }
}

.cta {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.cta-primary-v2 {
  background: var(--blood-bright);
  color: white;
  box-shadow: 0 4px 20px rgba(220, 20, 60, 0.3);
}

.cta-primary-v2:hover {
  background: var(--blood);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(220, 20, 60, 0.5);
}

.cta-secondary-v2 {
  background: transparent;
  color: var(--bone);
  border-color: var(--border);
}

.cta-secondary-v2:hover {
  border-color: var(--blood-bright);
  color: var(--blood-bright);
}

/* ===== FOOTER ===== */
.profile-footer-v2 {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  border-top: 1px solid var(--border);
}

.profile-footer-v2 a {
  color: var(--blood-bright);
  text-decoration: none;
  font-weight: 600;
}

/* ===== ERROR PAGES ===== */
.error-page {
  padding: 80px 20px;
  text-align: center;
}

.error-page h1 {
  font-family: var(--font-serif);
  font-size: 48px;
  margin: 0 0 16px;
  color: var(--blood-bright);
}

.error-page p {
  margin: 0 0 24px;
  color: var(--gray-light);
}

/* ===== HOME REDIRECT ===== */
.home-redirect {
  padding: 80px 20px;
  text-align: center;
}

.home-redirect h1 {
  font-family: var(--font-serif);
  font-size: 56px;
  margin: 0 0 16px;
  color: var(--blood-bright);
  letter-spacing: 4px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .nw-pulse-ring { display: none; }
}
