/* ==========================================================================
   ANIME RATING SANCTUARY — 3D GLASSMORPHISM & NEON PASTEL STYLESHEET
   ========================================================================== */

:root {
  --bg-deep: #060711;
  --bg-surface: #0d0f22;
  --bg-card: rgba(18, 21, 44, 0.68);
  --bg-card-hover: rgba(24, 28, 58, 0.82);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-bright: rgba(255, 255, 255, 0.22);

  --accent-pink: #ff5ca8;
  --accent-sakura: #ff8dc7;
  --accent-violet: #9d5cff;
  --accent-cyan: #22d3ee;
  --accent-emerald: #34d399;
  --accent-gold: #fbbf24;
  --accent-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 9999px;

  --shadow-card: 0 20px 45px -15px rgba(0, 0, 0, 0.7),
                 0 0 25px -5px rgba(157, 92, 255, 0.12);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
}

/* ==========================================================================
   BACKGROUND STARFIELD, NEBULA & SAKURA PARTICLES
   ========================================================================== */

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.32;
  animation: floatAurora 18s ease-in-out infinite alternate;
}

.aurora-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--accent-pink), transparent 70%);
  top: -160px;
  left: -120px;
}

.aurora-2 {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, var(--accent-violet), transparent 70%);
  top: 22%;
  right: -180px;
  animation-delay: -6s;
}

.aurora-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
  bottom: -140px;
  left: 20%;
  animation-delay: -11s;
}

@keyframes floatAurora {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(40px, -30px, 0) scale(1.08);
  }
  100% {
    transform: translate3d(-30px, 35px, 0) scale(0.95);
  }
}

/* Subtle cyber grid overlay */
.cyber-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 35%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   LAYOUT CONTAINER & NAVIGATION HEADER
   ========================================================================== */

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  margin-top: 20px;
  background: rgba(13, 15, 34, 0.65);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 16px;
  z-index: 40;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.top-nav:hover {
  border-color: rgba(255, 92, 168, 0.35);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-violet));
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px rgba(255, 92, 168, 0.5);
  transition: transform 0.35s var(--transition-bounce);
}

.brand-logo:hover .brand-icon {
  transform: rotate(-12deg) scale(1.12);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(157, 92, 255, 0.2);
  border: 1px solid rgba(157, 92, 255, 0.45);
  color: #d8b4fe;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--transition-bounce);
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* ==========================================================================
   HERO SECTION & STATS DASHBOARD
   ========================================================================== */

.hero-section {
  text-align: center;
  padding: 64px 16px 44px;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(255, 92, 168, 0.14), rgba(157, 92, 255, 0.14));
  border: 1px solid rgba(255, 92, 168, 0.35);
  color: var(--accent-sakura);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
  box-shadow: 0 0 25px rgba(255, 92, 168, 0.2);
  animation: floatBadge 3.5s ease-in-out infinite;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero-title {
  font-size: clamp(2.3rem, 5vw, 4.1rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #ff8dc7 35%, #a855f7 70%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: gradientFlow 6s linear infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-subtitle {
  max-width: 680px;
  margin: 0 auto 36px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Stats Bar */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: transform 0.35s var(--transition-bounce), border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 141, 199, 0.45);
  box-shadow: 0 16px 35px -10px rgba(255, 92, 168, 0.22);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-icon.pink { background: rgba(255, 92, 168, 0.16); color: var(--accent-pink); border: 1px solid rgba(255, 92, 168, 0.35); }
.stat-icon.violet { background: rgba(157, 92, 255, 0.16); color: var(--accent-violet); border: 1px solid rgba(157, 92, 255, 0.35); }
.stat-icon.cyan { background: rgba(34, 211, 238, 0.16); color: var(--accent-cyan); border: 1px solid rgba(34, 211, 238, 0.35); }
.stat-icon.gold { background: rgba(251, 191, 36, 0.16); color: var(--accent-gold); border: 1px solid rgba(251, 191, 36, 0.35); }

.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */

.section-block {
  margin-top: 52px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
}

.section-title {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ==========================================================================
   "CURRENTLY WATCHING (ON-GOING PROGRESS)" HIGHLIGHT SECTION
   ========================================================================== */

.watching-showcase-wrapper {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 92, 168, 0.08), rgba(157, 92, 255, 0.09), rgba(34, 211, 238, 0.07));
  border: 1px solid rgba(255, 92, 168, 0.28);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.65),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.watching-showcase-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-violet), var(--accent-cyan), var(--accent-pink));
  background-size: 200% 100%;
  animation: gradientFlow 5s linear infinite;
}

.watching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.watching-card {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(12, 15, 34, 0.78);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.watching-card:hover {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7),
              0 0 28px -4px rgba(52, 211, 153, 0.2);
}

.watching-poster-wrap {
  width: 118px;
  height: 168px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
  transform: translateZ(20px);
}

.watching-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition-smooth);
}

.watching-card:hover .watching-poster {
  transform: scale(1.08);
}

.watching-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  transform: translateZ(25px);
}

.watching-top-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* Pulsing "On-Going Watched" Badge */
.ongoing-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-emerald);
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.watching-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 3px;
}

.watching-title-en {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watching-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent-pink);
  padding: 6px 10px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 12px;
}

/* Progress Bar Area */
.progress-container {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: 12px;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 7px;
}

.ep-counter {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ep-counter strong {
  color: var(--accent-cyan);
  font-size: 0.92rem;
}

.ep-percent {
  color: var(--accent-sakura);
  font-weight: 800;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-violet), var(--accent-cyan));
  background-size: 200% 100%;
  animation: gradientFlow 3s linear infinite;
  position: relative;
  transition: width 0.45s var(--transition-bounce);
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 14px;
  background: rgba(255, 255, 255, 0.8);
  filter: blur(4px);
  border-radius: 50%;
}

.progress-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

.ep-mood {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.ep-step-btns {
  display: flex;
  gap: 5px;
}

.ep-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s var(--transition-bounce);
}

.ep-btn:hover {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  transform: translateY(-2px) scale(1.06);
}

/* ==========================================================================
   FILTER BAR, TABS, GENRE PILLS & SEARCH
   ========================================================================== */

.controls-panel {
  background: rgba(13, 15, 34, 0.72);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}

.controls-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

/* Category Tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s var(--transition-bounce);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-violet));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 22px -4px rgba(255, 92, 168, 0.55);
  transform: translateY(-2px) scale(1.03);
}

.tab-count {
  font-size: 0.73rem;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.28);
}

/* Search & Sort Right Box */
.search-sort-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
  min-width: 280px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 340px;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.95rem;
}

.search-input {
  width: 100%;
  padding: 10px 38px 10px 40px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 7, 17, 0.65);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(255, 92, 168, 0.2);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  display: none;
}

.clear-search-btn.visible {
  display: block;
}

.sort-select {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 7, 17, 0.75);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s ease;
}

.sort-select:hover,
.sort-select:focus {
  border-color: var(--accent-violet);
}

/* Genre Filter Row */
.genre-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.genre-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 4px;
}

.genre-chip {
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--transition-bounce);
}

.genre-chip:hover {
  border-color: var(--accent-cyan);
  color: var(--text-main);
  transform: translateY(-2px);
}

.genre-chip.active {
  background: rgba(34, 211, 238, 0.18);
  border-color: var(--accent-cyan);
  color: #67e8f9;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.25);
}

/* ==========================================================================
   3D ANIME CARDS GRID & TILT / GLARE INTERACTIONS
   ========================================================================== */

.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
  gap: 28px;
  perspective: 1200px;
}

.anime-card {
  --rx: 0deg;
  --ry: 0deg;
  --glare-x: 50%;
  --glare-y: 50%;
  --glare-opacity: 0;

  position: relative;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) scale3d(1, 1, 1);
  transition: transform 0.18s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.anime-card:hover {
  border-color: rgba(255, 141, 199, 0.45);
  box-shadow: 0 28px 55px -12px rgba(0, 0, 0, 0.8),
              0 0 30px -5px rgba(255, 92, 168, 0.25);
  z-index: 5;
}

/* 3D Glossy Glare Overlay */
.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background: radial-gradient(
    circle 260px at var(--glare-x) var(--glare-y),
    rgba(255, 255, 255, 0.22),
    rgba(255, 141, 199, 0.08) 45%,
    transparent 80%
  );
  opacity: var(--glare-opacity);
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
}

/* ==========================================================================
   SPECIAL 10/10 GOLDEN / PRISMATIC MASTERPIECE CARD GLOW
   ========================================================================== */

.anime-card.masterpiece-10 {
  border: 2px solid transparent;
  background:
    linear-gradient(160deg, rgba(28, 24, 54, 0.9), rgba(16, 18, 38, 0.92)) padding-box,
    linear-gradient(135deg, #fde047, #f59e0b, #ff5ca8, #a855f7, #22d3ee, #fde047) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: masterpieceBorder 5s linear infinite;
  box-shadow: 0 25px 60px -12px rgba(251, 191, 36, 0.32),
              0 0 38px rgba(255, 92, 168, 0.25);
}

@keyframes masterpieceBorder {
  0% { background-position: 0 0, 0% 50%; }
  50% { background-position: 0 0, 100% 50%; }
  100% { background-position: 0 0, 0% 50%; }
}

.masterpiece-ribbon {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateZ(40px);
  z-index: 8;
  background: linear-gradient(90deg, #fde047, #f59e0b, #ff5ca8, #22d3ee, #fde047);
  background-size: 250% 100%;
  animation: gradientFlow 3.5s linear infinite;
  color: #090a14;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.65);
  white-space: nowrap;
}

/* ==========================================================================
   CARD POSTER & FLOATING BADGES
   ========================================================================== */

.card-poster-container {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: #0b0d1e;
}

.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.65s var(--transition-smooth), filter 0.4s ease;
}

.anime-card:hover .card-poster {
  transform: scale(1.08);
}

.poster-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 7, 17, 0.35) 0%,
    transparent 35%,
    rgba(13, 15, 34, 0.75) 82%,
    rgba(18, 21, 44, 1) 100%
  );
  pointer-events: none;
}

/* Top Left: Category + Year + Age Rating */
.card-top-meta {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateZ(30px);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  width: fit-content;
}

.meta-pill.category-tv {
  background: rgba(157, 92, 255, 0.82);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.meta-pill.category-movie {
  background: rgba(34, 211, 238, 0.85);
  color: #06121c;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.meta-pill.age-badge {
  background: rgba(9, 11, 26, 0.82);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Top Right: Personal Rating Badge */
.rating-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 14px;
  background: rgba(9, 11, 26, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--accent-gold);
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  transform: translateZ(35px);
  transition: transform 0.3s var(--transition-bounce);
}

.anime-card:hover .rating-badge {
  transform: translateZ(45px) scale(1.08);
}

.rating-badge .rating-max {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* 10/10 Golden / Rainbow Rating Badge */
.rating-badge.rating-10 {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 45%, #ff5ca8 100%);
  color: #090a14;
  border: 2px solid #ffffff;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.95),
              0 0 50px rgba(255, 92, 168, 0.65);
  animation: pulseGold 2s ease-in-out infinite alternate;
}

.rating-badge.rating-10 .rating-max {
  color: rgba(9, 10, 20, 0.75);
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.8), 0 0 35px rgba(255, 92, 168, 0.5);
    transform: translateZ(40px) scale(1);
  }
  100% {
    box-shadow: 0 0 32px rgba(251, 191, 36, 1), 0 0 55px rgba(34, 211, 238, 0.8);
    transform: translateZ(45px) scale(1.07);
  }
}

/* ==========================================================================
   CARD BODY CONTENT
   ========================================================================== */

.card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  transform: translateZ(22px);
  margin-top: -22px;
  position: relative;
  z-index: 4;
}

.card-year-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.card-title-romaji {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title-english {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-sakura);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.genre-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.anime-card:hover .genre-tag {
  border-color: rgba(157, 92, 255, 0.35);
  background: rgba(157, 92, 255, 0.12);
}

.card-synopsis {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  background: var(--bg-card);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
}

.empty-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.reset-btn {
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-violet));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--transition-bounce);
}

.reset-btn:hover {
  transform: scale(1.06);
}

/* ==========================================================================
   FYI / LITTLE NOTE CALLOUT BANNER
   ========================================================================== */

.fyi-banner {
  margin-top: 64px;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 92, 168, 0.12), rgba(157, 92, 255, 0.12));
  border: 1px solid rgba(255, 141, 199, 0.35);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
  overflow: hidden;
}

.fyi-icon-bubble {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-violet));
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  flex-shrink: 0;
  box-shadow: 0 10px 25px rgba(255, 92, 168, 0.4);
  animation: floatBadge 3s ease-in-out infinite;
}

.fyi-content {
  font-size: 0.98rem;
  color: var(--text-main);
  line-height: 1.65;
}

.fyi-content strong {
  color: var(--accent-sakura);
}

/* ==========================================================================
   WARM FOOTER
   ========================================================================== */

.site-footer {
  margin-top: 40px;
  padding: 36px 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.footer-quote {
  max-width: 680px;
  margin: 0 auto 14px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-main);
}

.footer-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   ANIME DETAIL MODAL
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 760px;
  background: #10132b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  display: grid;
  grid-template-columns: 260px 1fr;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.32s var(--transition-bounce);
}

.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(9, 11, 26, 0.75);
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  transform: rotate(90deg);
}

.modal-poster-col {
  height: 100%;
  min-height: 360px;
  background: #080916;
}

.modal-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-details-col {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-title-jp {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
}

.modal-title-en {
  font-size: 0.95rem;
  color: var(--accent-sakura);
  font-weight: 600;
}

.modal-synopsis {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 768px) {
  .top-nav {
    padding: 14px 18px;
  }
  .nav-links {
    display: none;
  }
  .watching-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .watching-poster-wrap {
    width: 140px;
    height: 200px;
  }
  .watching-top-badges {
    justify-content: center;
  }
  .fyi-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
  .modal-card {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-poster-col {
    height: 260px;
    min-height: 260px;
  }
}

