/* ==========================================================================
   COMICPANNA / RIFLEVERSE COMICS & MANGA PWA - CORE STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Color System */
  --bg-main: #07090e;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-card-hover: rgba(26, 38, 66, 0.95);
  --bg-input: #0d1322;
  --bg-darker: rgba(5, 7, 10, 0.9);
  --bg-glass: rgba(13, 19, 33, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-strong: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(0, 229, 255, 0.3);

  /* Universes */
  --marvel-red: #ff1e42;
  --marvel-glow: rgba(255, 30, 66, 0.4);
  --dc-blue: #00d2ff;
  --dc-glow: rgba(0, 210, 255, 0.4);
  --manga-gold: #ffb703;
  --manga-glow: rgba(255, 183, 3, 0.4);
  --indie-emerald: #00f59b;
  --indie-glow: rgba(0, 245, 155, 0.4);
  --vertigo-purple: #9d4edd;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #00f0ff;
  --accent-pink: #ff007f;
  --accent-gold: #ffd700;

  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-glow-cyan: 0 0 25px rgba(0, 229, 255, 0.25);
  --shadow-glow-marvel: 0 0 25px rgba(255, 30, 66, 0.3);

  /* Radius & Transitions */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 210, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(255, 30, 66, 0.05) 0%, transparent 40%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #ffffff;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Accessibility Primitives */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Native app-like page transitions (View Transitions API). Chrome/Edge 126+
   animate every same-origin navigation automatically; unsupported browsers
   (Safari, Firefox) just get a normal instant navigation - no fallback code
   needed, this is pure progressive enhancement. Respects prefers-reduced-motion
   above since these are just ordinary CSS animations under the hood. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 180ms cubic-bezier(0.4, 0, 1, 1) both comicpanna-page-out;
}

::view-transition-new(root) {
  animation: 220ms cubic-bezier(0, 0, 0.2, 1) both comicpanna-page-in;
}

@keyframes comicpanna-page-out {
  to { opacity: 0; transform: translateY(-8px) scale(0.99); }
}

@keyframes comicpanna-page-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-section {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-title {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Push Notification Permission Bar */
.push-permission-bar {
  background: linear-gradient(90deg, #0a1128, #1c2541);
  border-bottom: 1px solid rgba(0, 240, 255, 0.35);
}

.push-permission-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
}

.push-permission-text {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
}

.push-permission-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.push-permission-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.push-permission-close:hover {
  color: #fff;
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  flex-shrink: 0;
}

.logo-badge {
  background: linear-gradient(135deg, var(--marvel-red), var(--dc-blue));
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.45);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  flex-shrink: 0;
}

@media (min-width: 960px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

/* Universal Search Bar */
.search-container {
  position: relative;
  flex: 1;
  max-width: 360px;
  min-width: 180px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0.55rem 1rem 0.55rem 2.6rem;
  font-size: 0.88rem;
  color: #fff;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
  background: #111a2e;
}

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

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0d1322;
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 380px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-dropdown.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition-fast);
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.search-result-thumb {
  width: 36px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
}

/* User Action Buttons & HUD Status */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00d2ff, #0077ff);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 119, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-marvel {
  background: linear-gradient(135deg, #ff1e42, #b3001e);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 30, 66, 0.35);
}

.btn-marvel:hover {
  box-shadow: 0 6px 20px rgba(255, 30, 66, 0.55);
}

.btn-manga {
  background: linear-gradient(135deg, #ffb703, #fb8500);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 183, 3, 0.35);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* User Level Badge Mini in Header */
.user-hero-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.3rem 0.8rem 0.3rem 0.4rem;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.user-hero-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3);
}

.user-avatar-mini {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.user-meta-text {
  display: flex;
  flex-direction: column;
}

.user-meta-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-level-tag {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--accent-cyan);
  white-space: nowrap;
}

.logout-form {
  display: inline-flex;
}

/* Mobile Native Layout Adjustments */
@media (max-width: 768px) {
  .nav-wrapper {
    height: 60px;
    gap: 0.75rem;
  }

  .brand-logo {
    font-size: 1.15rem;
  }

  .logo-badge {
    width: 30px;
    height: 30px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .search-container {
    max-width: none;
    min-width: 0;
  }

  .search-input {
    padding: 0.45rem 0.8rem 0.45rem 2.2rem;
    font-size: 0.82rem;
  }

  .search-icon {
    left: 0.75rem;
    font-size: 0.75rem;
  }

  .user-meta-text {
    display: none;
  }

  .user-hero-badge {
    padding: 0.2rem;
    background: transparent;
    border: none;
  }

  .btn-exit {
    display: none;
  }

  .hero-banner {
    padding: 1.25rem 0 1rem;
  }

  .hero-headline {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .quote-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }
}

/* Daily Multiverse Quote Banner */
.quote-banner {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quote-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quote-avatar {
  font-size: 1.35rem;
}

.quote-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.quote-body em {
  color: #fff;
}

.quote-body strong {
  color: var(--accent-cyan);
}

.quote-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  white-space: nowrap;
}

/* Hero Showcase Banner */
.hero-banner {
  padding: 2rem 0 1.5rem;
  position: relative;
}

.hero-grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

.hero-headline {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #00e5ff 70%, #ff007a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 680px;
  margin-bottom: 1.8rem;
}

.hero-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-hero-cta {
  padding: 0.6rem 1.35rem;
}

.btn-leaderboard-cta {
  border-color: rgba(255, 215, 0, 0.4);
  color: var(--accent-gold);
}

.btn-leaderboard-cta:hover {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.1);
}

/* Universe Category Pills */
.universe-pills {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}

.universe-pills::-webkit-scrollbar {
  display: none;
}

@media (max-width: 900px) {
  .universe-pills {
    /* Fade the right edge on small screens where the row is likely to overflow */
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent 100%);
  }

  .universe-pill {
    padding: 0.45rem 0.95rem;
    font-size: 0.82rem;
    gap: 0.35rem;
  }
}

.universe-pill {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.universe-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.universe-pill.active-all {
  background: #ffffff;
  color: #07090e;
  border-color: #ffffff;
}

.universe-pill.active-marvel {
  background: var(--marvel-red);
  color: #ffffff;
  border-color: var(--marvel-red);
  box-shadow: 0 0 15px var(--marvel-glow);
}

.universe-pill.active-dc {
  background: var(--dc-blue);
  color: #000000;
  border-color: var(--dc-blue);
  box-shadow: 0 0 15px var(--dc-glow);
}

.universe-pill.active-manga {
  background: var(--manga-gold);
  color: #000000;
  border-color: var(--manga-gold);
  box-shadow: 0 0 15px var(--manga-glow);
}

.universe-pill.active-indie {
  background: var(--indie-emerald);
  color: #000000;
  border-color: var(--indie-emerald);
  box-shadow: 0 0 15px var(--indie-glow);
}

/* Trending Chips */
.trending-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.chip-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.chip-marvel {
  background: rgba(255, 30, 66, 0.15);
  border-color: rgba(255, 30, 66, 0.3);
  color: #fff;
}

.chip-dc {
  background: rgba(0, 210, 255, 0.15);
  border-color: rgba(0, 210, 255, 0.3);
  color: #fff;
}

.chip-manga {
  background: rgba(255, 183, 3, 0.15);
  border-color: rgba(255, 183, 3, 0.3);
  color: #fff;
}

.chip-purple {
  background: rgba(157, 78, 221, 0.15);
  border-color: rgba(157, 78, 221, 0.3);
  color: #fff;
}

/* Filter & Sorting Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.filter-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.filter-sort {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-select {
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

/* Comic Grid & Cards */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 640px) {
  .comic-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }
}

.comic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  position: relative;
}

.comic-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

.comic-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #0d1322;
}

.comic-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.comic-card:hover .comic-cover-img {
  transform: scale(1.04);
}

.comic-universe-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

.comic-universe-tag-static {
  position: static;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.badge-marvel { background: rgba(255, 30, 66, 0.85); color: #fff; }
.badge-dc { background: rgba(0, 210, 255, 0.85); color: #000; }
.badge-manga { background: rgba(255, 183, 3, 0.9); color: #000; }
.badge-indie { background: rgba(0, 245, 155, 0.85); color: #000; }
.badge-default { background: rgba(255, 255, 255, 0.2); color: #fff; }

.comic-rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-new {
  background: rgba(255, 30, 66, 0.85);
  color: #fff;
}

.comic-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.comic-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comic-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.comic-card-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.comic-card-footer-actions > * {
  flex: 1;
}

.btn-action-mini {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

.comic-creators {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
}

.comic-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Comic Detail Hero */
.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  margin: 2rem 0 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

@media (max-width: 860px) {
  .detail-hero {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
}

.detail-cover {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.detail-buttons-col {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-header-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.detail-score {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.detail-main-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.detail-alt-title {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.meta-field-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-field-value {
  font-weight: 600;
  color: #fff;
}

.link-cyan {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tag-badge:hover {
  border-color: var(--accent-cyan);
  color: #fff;
}

.synopsis-heading {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.synopsis-text {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Interactive Action Bar */
.action-box {
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.action-status-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.action-status-val {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-cyan);
}

.action-form-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Schedule Card */
.schedule-card {
  margin-top: 2rem;
  background: rgba(0, 229, 255, 0.04);
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.schedule-card-title {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.schedule-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.schedule-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Threaded Comments & Reviews */
.comments-section {
  margin-top: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.comment-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.comment-content {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.comment-actions-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--accent-cyan);
  cursor: pointer;
  font-weight: 600;
}

.comment-reply {
  margin-left: 2rem;
  border-left: 2px solid var(--border-glow);
  padding-left: 1rem;
}

.spoiler-text {
  background: #1e293b;
  color: transparent;
  user-select: none;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.spoiler-text.revealed {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  user-select: auto;
}

.form-control-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

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

.form-control-select {
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.form-control-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.form-control-textarea:focus {
  border-color: var(--accent-cyan);
}

/* Monthly Wishlist Scheduler Board */
.wishlist-board {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 860px) {
  .wishlist-board {
    grid-template-columns: 1fr;
  }
}

.month-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.month-tab {
  padding: 0.85rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  transition: var(--transition-fast);
}

.month-tab.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(0, 119, 255, 0.15));
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.month-tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.wishlist-active-header {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wishlist-active-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.wishlist-item-row {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.wishlist-thumb {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

.wishlist-info {
  flex: 1;
  min-width: 200px;
}

.wishlist-price-box {
  text-align: right;
}

.wishlist-price-val {
  font-weight: 700;
  color: var(--indie-emerald);
  font-size: 1.1rem;
}

/* Gamification & Character RPG Sheet */
.rpg-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.rpg-sheet::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.rpg-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.rpg-user-badge-lg {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.user-avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 2rem;
}

.power-level-card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  text-align: center;
}

.power-level-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-cyan);
  line-height: 1.1;
}

.xp-progress-card {
  margin-bottom: 2rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.xp-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.xp-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
}

.stat-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-label {
  width: 140px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-track {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.stat-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
  position: relative;
  overflow: hidden;
}

.stat-fill-str { background: linear-gradient(90deg, #ff1e42, #ff5e7e); }
.stat-fill-int { background: linear-gradient(90deg, #00d2ff, #0077ff); }
.stat-fill-spd { background: linear-gradient(90deg, #ffb703, #fb8500); }
.stat-fill-arc { background: linear-gradient(90deg, #9d4edd, #c77dff); }
.stat-fill-res { background: linear-gradient(90deg, #00f59b, #57cc99); }

/* Comic-shine sweep, shared by power bars, affinity bars & the XP progress bar */
@keyframes bar-shine {
  0% { background-position: -60% 0; }
  100% { background-position: 160% 0; }
}

.stat-fill::after,
.affinity-fill-dc::after,
.affinity-fill-manga::after,
.affinity-fill-marvel::after,
.level-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.65) 50%, transparent 80%);
  background-size: 60% 100%;
  background-repeat: no-repeat;
  animation: bar-shine 2.4s ease-in-out infinite;
}

.stat-val-num,
.stat-number {
  font-size: 0.85rem;
  width: 38px;
  text-align: right;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

/* Power Attributes & Reading Affinities side-by-side layout */
.profile-stats-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
}

@media (max-width: 860px) {
  .profile-stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.stat-group-title {
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-rows-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.stat-affinities-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.affinity-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.affinity-dc-text { color: var(--dc-blue); }
.affinity-manga-text { color: var(--manga-gold); }
.affinity-marvel-text { color: var(--marvel-red); }

.affinity-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.affinity-fill-dc,
.affinity-fill-manga,
.affinity-fill-marvel {
  height: 100%;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
  transition: width 1s ease-out;
}

.affinity-fill-dc { background: linear-gradient(90deg, #0077ff, var(--dc-blue)); }
.affinity-fill-manga { background: linear-gradient(90deg, #fb8500, var(--manga-gold)); }
.affinity-fill-marvel { background: linear-gradient(90deg, #8a0018, var(--marvel-red)); }

/* Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.badge-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition-fast);
}

.badge-card.unlocked {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--badge-tier-color, rgba(255, 215, 0, 0.4));
  box-shadow: 0 0 15px color-mix(in srgb, var(--badge-tier-color, #ffd700) 30%, transparent);
}

.badge-card.locked {
  opacity: 0.45;
  filter: grayscale(1);
}

.badge-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  background: color-mix(in srgb, var(--badge-tier-color, #8a99ad) 18%, transparent);
}

.badge-card.unlocked .badge-icon-circle {
  background: color-mix(in srgb, var(--badge-tier-color, #ffd700) 25%, transparent);
}

.badge-name {
  font-size: 0.98rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.badge-tier-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.badge-card.unlocked .badge-tier-tag {
  color: var(--badge-tier-color, var(--text-muted));
}

.badge-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-heading {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Active Companion HUD */
.companion-wrapper {
  max-width: 760px;
  margin: 0 auto;
}

.companion-hud-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-glow-cyan);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}

.companion-cover-img {
  width: 140px;
  height: 210px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-md);
}

.stopwatch-box {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-width: 320px;
  margin: 0 auto 2rem;
}

.stopwatch-digits {
  font-family: 'Outfit', monospace;
  font-size: 3.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.alert-liveness {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid var(--manga-gold);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--accent-gold);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* AI Modal / Popup */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: #0d1322;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: var(--shadow-glow-cyan);
}

.modal-content.modal-narrow {
  max-width: 480px;
}

.modal-header,
.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title-text {
  font-size: 1.15rem;
  color: #fff;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Floating Mobile Navigation Bar */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
}

@media (min-width: 1024px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem;
}

.mobile-nav-item.active {
  color: var(--accent-cyan);
}

.mobile-nav-icon {
  font-size: 1.2rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 85px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #0f172a;
  border: 1px solid var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.92rem;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Custom PWA Pagination Component */
.pagination-wrap {
  margin: 2.5rem 0 4rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

.custom-pagination {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.pagination-btn {
  padding: 0.4rem 0.9rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pagination-btn:hover:not(.disabled) {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
}

.pagination-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0 0.3rem;
}

.pagination-num {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  text-decoration: none;
}

.pagination-num:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pagination-num.active {
  background: linear-gradient(135deg, #00d2ff, #0077ff);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.5);
}

.pagination-ellipsis {
  color: var(--text-muted);
  padding: 0 0.3rem;
  font-weight: 700;
}

/* Fallback SVG size reset to prevent giant arrows */
svg {
  max-width: 100%;
  max-height: 100%;
}

.w-5, .h-5 {
  width: 1.25rem !important;
  height: 1.25rem !important;
}

/* Empty States */
.empty-state-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-glass);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* ==========================================================================
   Interactive Gamification, Comic SFX & Easter Egg Animations
   ========================================================================== */
.floating-comic-sfx {
  position: fixed;
  pointer-events: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 1.3rem;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 2px 2px 0 #ff0055, -2px -2px 0 #00f0ff;
  transform: translate(-50%, -50%) rotate(-8deg);
  z-index: 99999;
  animation: floatUpFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatUpFade {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6) rotate(-15deg);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -20px) scale(1.3) rotate(-5deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -80px) scale(1) rotate(5deg);
  }
}

@keyframes fallDown {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(105vh) rotate(720deg);
    opacity: 0;
  }
}

/* Gotham Bat-Signal Spotlight */
#batSignalOverlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 75% 25%, rgba(255, 255, 200, 0.25) 0%, rgba(0, 0, 0, 0.85) 60%);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#batSignalOverlay.show {
  display: flex;
  animation: fadeIn 0.4s ease forwards;
}

.bat-beam {
  position: absolute;
  top: 15%;
  right: 20%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 220, 0.95) 0%, rgba(255, 255, 150, 0.4) 50%, transparent 75%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 100px rgba(255, 255, 200, 0.8);
  animation: searchlight 3s ease-in-out infinite alternate;
}

.bat-insignia {
  font-size: 5.5rem;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.9));
  transform: rotate(-10deg);
}

@keyframes searchlight {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-30px, 20px) scale(1.1);
  }
}

/* God Mode Multiversal Aura */
body.god-mode-active {
  animation: godModePulse 2s infinite alternate;
}

@keyframes godModePulse {
  0% {
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 25px rgba(255, 0, 85, 0.8));
  }
}

/* ==========================================================================
   Hero Profile, Avatar Upload & Level Character Evolution Classes
   ========================================================================== */
.profile-hero-sheet {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
  animation: fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Reusable "fun" entrance animation, shared across profile cards */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-card-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  animation: fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.profile-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-user-intro {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.profile-name-headline {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #fff;
  line-height: 1.15;
  margin: 0.15rem 0 0.35rem;
}

.profile-meta-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .profile-header-main {
    justify-content: flex-start;
  }

  .combat-power-hud {
    width: 100%;
  }
}

.profile-avatar-box {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.level-evolution-card {
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.level-evolution-avatar {
  font-size: 3rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.level-evolution-info {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.level-character-name {
  font-size: 1.3rem;
  color: #fff;
  margin: 0.15rem 0 0.25rem;
}

.level-character-lore {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 520px;
}

.level-progress-container {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.level-progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
}

.level-progress-track {
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-cyan));
  position: relative;
  overflow: hidden;
  transition: width 1s ease-out;
}

.pantheon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.hero-toggle-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.hero-toggle-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 255, 0.5);
}

.hero-toggle-card.selected {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

.batcomputer-btn {
  background: linear-gradient(135deg, #0a1128, #1c2541);
  border: 2px solid #00f0ff;
  color: #fff;
  padding: 0.6rem 1.25rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition-fast);
}

.batcomputer-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
}

.avatar-token-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.avatar-token-btn:hover, .avatar-token-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

/* ==========================================================================
   Comicpanna Global Design System & Component Classes (No Inline Styles)
   ========================================================================== */

/* Profile Tab System */
.profile-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.profile-tab-btn {
  padding: 0.65rem 1.25rem;
  font-weight: 800;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.profile-tab-btn:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.4);
  color: #fff;
}

.profile-tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

/* Synthesized Superhero Identity Card */
.synthesized-persona-card {
  background: linear-gradient(135deg, rgba(8, 16, 38, 0.98), rgba(4, 8, 22, 0.98));
  border: 2px solid #00f0ff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.persona-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.persona-chip-label {
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 0;
  text-transform: uppercase;
  flex: 1;
  min-width: 260px;
}

.persona-archetype-tag {
  position: static !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.persona-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.persona-icon-large {
  font-size: 2.6rem;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.8));
  line-height: 1;
}

.persona-headline {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
}

.persona-hybrid-title {
  color: #00f0ff;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.9);
  font-weight: 900;
}

.persona-lore-text {
  font-size: 1.08rem;
  color: #f8fafc;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  font-weight: 500;
  max-width: 900px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.persona-traits-wrap {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.persona-traits-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.persona-trait-chip {
  background: rgba(0, 240, 255, 0.12);
  border: 1.5px solid rgba(0, 240, 255, 0.45);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.15);
}

/* Combat Power HUD */
.combat-power-hud {
  background: rgba(10, 14, 26, 0.85);
  border: 2px solid #00f0ff;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
}

.combat-power-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.combat-power-score {
  font-size: 2.2rem;
  font-weight: 900;
  color: #00f0ff;
  line-height: 1.1;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
}

.combat-power-title {
  font-size: 0.75rem;
  color: #ffd700;
  margin-top: 0.2rem;
  font-weight: 700;
}

/* Superhero Pantheon Visual Grid */
.pantheon-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .pantheon-art-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
}

.pantheon-section-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.pantheon-section-label-browse {
  margin-top: 0.5rem;
}

.pantheon-team-grid {
  min-height: 60px;
  padding: 0.75rem;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.04);
  border: 1px dashed rgba(0, 240, 255, 0.25);
}

.pantheon-art-card {
  animation: fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pantheon-art-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 240, 255, 0.6);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.25);
}

.pantheon-art-card.selected {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

@keyframes just-recruited-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); box-shadow: 0 0 30px rgba(0, 240, 255, 0.7); }
  100% { transform: scale(1); }
}

.pantheon-art-card.just-recruited {
  animation: just-recruited-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pantheon-art-img-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
  background: #080c14;
}

.pantheon-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.pantheon-art-card:hover .pantheon-art-img {
  transform: scale(1.05);
}

.pantheon-pos-tag {
  z-index: 1;
}

.pantheon-active-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  background: rgba(0, 240, 255, 0.9);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.pantheon-art-body {
  padding: 0.9rem;
}

.pantheon-art-title {
  font-size: 1rem;
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.pantheon-art-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Team Stats: fun flavor numbers for the Team tab, not real power scaling */
.team-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .team-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .team-stats-row {
    grid-template-columns: 1fr;
  }
}

.team-stat-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  text-align: center;
  transition: var(--transition-fast);
}

.team-stat-info {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: help;
}

.team-stat-info:hover {
  color: var(--accent-cyan);
}

.team-stat-info::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  top: auto;
  left: 50%;
  right: auto;
  width: 170px;
  max-width: 75vw;
  background: #0a0e18;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: var(--transition-fast);
  z-index: 30;
  pointer-events: none;
}

.team-stat-info:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.team-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.team-stat-value {
  font-size: 1.9rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}

.team-stat-sub {
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.4rem;
  color: var(--accent-cyan);
}

.team-stat-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.6rem;
  position: relative;
}

.team-stat-fill {
  height: 100%;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-stat-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.6) 50%, transparent 80%);
  background-size: 60% 100%;
  background-repeat: no-repeat;
  animation: bar-shine 2.4s ease-in-out infinite;
}

.team-stat-fill-strength {
  background: linear-gradient(90deg, #0077ff, var(--accent-cyan));
}

.team-chem-tier-perfect { background: linear-gradient(90deg, #ff8c00, var(--accent-gold)); }
.team-chem-tier-great { background: linear-gradient(90deg, #00d2ff, var(--accent-cyan)); }
.team-chem-tier-solid { background: linear-gradient(90deg, #00c46a, #57cc99); }
.team-chem-tier-chaotic { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.team-stat-score {
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.07);
}

.team-stat-score .team-stat-value {
  color: var(--accent-gold);
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.team-stat-tier {
  border-color: color-mix(in srgb, var(--tier-color, var(--accent-cyan)) 45%, transparent);
  background: color-mix(in srgb, var(--tier-color, var(--accent-cyan)) 8%, transparent);
}

.team-stat-tier .team-stat-value {
  text-shadow: 0 0 15px color-mix(in srgb, var(--tier-color, var(--accent-cyan)) 55%, transparent);
  letter-spacing: 0.03em;
}

.team-stat-tier .team-stat-sub {
  color: var(--tier-color, var(--accent-cyan));
}

/* Easter egg: full 5-hero team from one universe */
@keyframes perfect-sync-glow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
}

.team-stats-row.perfect-sync-glow .team-stat-card {
  animation: perfect-sync-glow 1.1s ease-in-out 2;
  border-color: var(--accent-gold);
}

.team-stats-explainer {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.team-traits-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0) 0 0 / 14px 14px,
    rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

.team-traits-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}

.team-traits-group:has(.team-trait-strength) {
  border-left-color: var(--indie-emerald);
  background: rgba(0, 245, 155, 0.04);
}

.team-traits-group:has(.team-trait-weakness) {
  border-left-color: var(--marvel-red);
  background: rgba(255, 30, 66, 0.04);
}

.team-traits-label {
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 108px;
}

#teamStrengthsPills,
#teamWeaknessesPills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.team-trait-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius-sm);
  transform: rotate(-2deg);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  animation: fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.team-trait-pill::before {
  font-size: 0.9em;
}

.team-trait-strength::before { content: '⚔️'; }
.team-trait-weakness::before { content: '💢'; }

.team-trait-pill:nth-child(even) {
  transform: rotate(2deg);
}

.team-trait-pill:hover {
  transform: rotate(0deg) scale(1.1);
}

.team-trait-strength {
  background: linear-gradient(135deg, rgba(0, 245, 155, 0.25), rgba(0, 245, 155, 0.1));
  border: 2px solid var(--indie-emerald);
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 245, 155, 0.9);
  box-shadow: 0 3px 12px rgba(0, 245, 155, 0.3);
}

.team-trait-strength:hover {
  box-shadow: 0 4px 18px rgba(0, 245, 155, 0.55);
}

.team-trait-weakness {
  background: linear-gradient(135deg, rgba(255, 30, 66, 0.25), rgba(255, 30, 66, 0.1));
  border: 2px solid var(--marvel-red);
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 30, 66, 0.9);
  box-shadow: 0 3px 12px rgba(255, 30, 66, 0.3);
}

.team-trait-weakness:hover {
  box-shadow: 0 4px 18px rgba(255, 30, 66, 0.55);
}

@media (max-width: 640px) {
  .team-traits-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pantheon-header-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.pantheon-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 640px;
  margin-top: 0.35rem;
}

.team-synergy-tagline {
  color: #fff;
  font-size: 0.95rem;
  font-style: italic;
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(0, 229, 255, 0.06);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
}

.team-synergy-tagline strong {
  font-style: normal;
  color: var(--accent-cyan);
}

.team-synergy-badge {
  display: inline-block;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #000;
  background: linear-gradient(135deg, #00f0ff, #7c5cff);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.team-count-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.7rem;
  margin-left: 0.6rem;
  vertical-align: middle;
}

.team-count-badge.team-count-full {
  color: var(--accent-gold);
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.1);
}

.character-search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.character-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}

.character-search-input:focus {
  border-color: var(--accent-cyan);
}

.character-results-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0a0e18;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  max-height: 320px;
  overflow-y: auto;
  z-index: 2000;
}

.char-results-heading {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.6rem 0.9rem 0.3rem;
}

.character-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.character-result-item:hover {
  background: rgba(0, 240, 255, 0.08);
}

.character-result-item.character-result-on-team {
  cursor: default;
  opacity: 0.6;
}

.character-result-item.character-result-on-team:hover {
  background: none;
}

.char-no-result {
  padding: 0.9rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.form-actions-right {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.char-result-thumb {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
  border: 1px solid var(--border-glass);
}

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

.char-result-name {
  font-weight: 800;
  color: #fff;
  font-size: 0.92rem;
}

.char-result-meta {
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.char-add-badge {
  font-size: 0.72rem;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
}

.search-bar-wrap {
  position: relative;
  max-width: 580px;
}

.search-form-flex {
  display: flex;
  gap: 0.5rem;
}

.search-main-input {
  flex: 1;
  background: #0d1322;
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.search-main-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

.search-submit-btn {
  padding: 0.65rem 1.25rem;
  font-weight: 800;
}

.search-autocomplete-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0a0e1a;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
}

/* Avatar Forge Card */
.avatar-forge-card {
  background: rgba(5, 8, 17, 0.85);
  border: 1.5px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 5px 25px rgba(0, 240, 255, 0.15);
}

.avatar-forge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.avatar-forge-title {
  font-size: 1.15rem;
  margin-top: 0.15rem;
}

.avatar-forge-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  max-width: 720px;
}

.avatar-preview-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.avatar-seed-input-wrap {
  flex: 1;
  min-width: 0;
}

.avatar-img-full {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .avatar-upload-grid {
    grid-template-columns: 1fr;
  }
}

.avatar-preset-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-file-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.avatar-preview-box {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--accent-cyan);
  background: #000;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

/* Select2-Style Country Selector */
.country-select-wrapper {
  position: relative;
}

.country-trigger-btn {
  width: 100%;
  background: #0d1322;
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.country-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #080c14;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  z-index: 2000;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
  max-height: 280px;
  overflow: hidden;
  flex-direction: column;
}

.country-search-field {
  width: 100%;
  background: #050811;
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.country-options-scroll {
  overflow-y: auto;
  max-height: 210px;
}

.country-option-item {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.country-option-item:hover {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
}

.country-option-item.selected {
  color: var(--accent-cyan);
  font-weight: 700;
}

.country-search-box-inner {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-glass);
}

.country-check {
  color: var(--accent-cyan);
  font-weight: 800;
}

/* Account Settings tab: header, form grid, footer */
.settings-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.badge-clearance {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.form-field-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.captcha-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
}

.captcha-input {
  max-width: 140px;
}

.captcha-error {
  color: var(--marvel-red);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.4rem;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .profile-details-grid {
    grid-template-columns: 1fr;
  }
}

.target-pacing-input {
  max-width: 220px;
}

.settings-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-privacy-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-privacy-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* GDPR Cookie Banner */
.gdpr-cookie-banner {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 480px;
  margin-left: auto;
  background: rgba(10, 14, 26, 0.95);
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  z-index: 9999;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
}

/* Prominent Search Command Terminal */
.search-terminal-box {
  background: linear-gradient(135deg, rgba(10, 17, 40, 0.9), rgba(5, 7, 15, 0.95));
  border: 2px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.15);
  position: relative;
}

.search-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search-terminal-title {
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-terminal-input {
  flex: 1;
  background: #0d1322;
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.search-terminal-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.search-terminal-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0a0e1a;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
}

/* Smart Page Jumper */
.smart-pagination-wrap {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.jump-page-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
}

.jump-page-input {
  width: 55px;
  background: #0d1322;
  border: 1px solid var(--accent-cyan);
  color: #fff;
  text-align: center;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Legal & Policy Container */
.legal-sheet-card {
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

/* Spotlight & Carousel Helpers */
.spotlight-slider-card {
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.spotlight-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.spotlight-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.spotlight-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition-fast);
}

.spotlight-nav-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--accent-cyan);
}

.spotlight-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  min-width: 30px;
  text-align: center;
}

.spotlight-track {
  position: relative;
  min-height: 230px;
}

.hero-slide-item {
  gap: 1rem;
  align-items: center;
}

.hero-slide-item.is-active-slide {
  display: flex;
}

.hero-slide-item.is-hidden-slide {
  display: none;
}

.spotlight-thumb-wrap {
  flex-shrink: 0;
  width: 130px;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  display: block;
}

.spotlight-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-universe-pos {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
}

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

.spotlight-rating-text {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.spotlight-comic-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.spotlight-summary-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spotlight-actions {
  display: flex;
  gap: 0.5rem;
}

.search-terminal-form-row {
  display: flex;
  gap: 0.75rem;
}

.btn-terminal-submit {
  padding: 0.85rem 1.75rem;
  font-weight: 800;
  font-size: 1rem;
}

.search-terminal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: #fff;
  transition: background 0.15s ease;
}

.search-terminal-item:hover {
  background: rgba(0, 240, 255, 0.1);
}

.search-terminal-thumb {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

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

.search-terminal-name {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-terminal-meta {
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.search-terminal-link-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-terminal-searching {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Leaderboard Helpers */
.leaderboard-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
  line-height: 1.5;
}

.rank-score-gold {
  font-size: 2rem;
  font-weight: 900;
  color: #ffd700;
  line-height: 1.1;
}

.rank-score-power {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-top: 0.2rem;
  font-weight: 700;
}

.alliance-dispatches-box {
  background: rgba(10, 14, 26, 0.8);
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.15);
}

.alliance-dispatches-title {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.alliance-dispatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.alliance-dispatch-card {
  display: flex;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  align-items: center;
}

.dispatch-thumb-wrap {
  flex-shrink: 0;
  width: 60px;
  aspect-ratio: 3/4;
  border-radius: 4px;
  overflow: hidden;
  display: block;
}

.dispatch-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dispatch-body {
  flex: 1;
  min-width: 0;
}

.dispatch-sender {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.dispatch-comic-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0.2rem 0;
  line-height: 1.3;
}

.btn-dispatch-read {
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
}

.leaderboard-search-form {
  display: flex;
  gap: 0.5rem;
}

.leaderboard-search-input {
  background: #0d1322;
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.leaderboard-table-card {
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.leaderboard-table thead tr {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.leaderboard-table th {
  padding: 1rem 1.25rem;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.leaderboard-table tbody tr.row-current-user {
  background: rgba(0, 240, 255, 0.05);
}

.td-rank {
  padding: 1rem 1.25rem;
  font-weight: 900;
  font-size: 1.1rem;
}

.rank-medal-1 {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.rank-medal-2 {
  color: #e2e8f0;
}

.rank-medal-3 {
  color: #cd7f32;
}

.rank-medal-default {
  color: var(--text-muted);
}

.td-identity {
  padding: 1rem 1.25rem;
}

.hero-identity-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar-fixed-box {
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
}

.hero-name-row {
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-name-link {
  color: inherit;
  text-decoration: none;
}

.badge-prime {
  background: var(--accent-cyan);
  color: #080c14;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 900;
}

.hero-synth-title {
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

.hero-country-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.td-character-form {
  padding: 1rem 1.25rem;
}

.char-form-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.char-form-icon {
  font-size: 1.4rem;
}

.char-form-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
}

.char-form-level {
  font-size: 0.72rem;
  color: #ffd700;
  font-weight: 800;
}

.td-affinities {
  padding: 1rem 1.25rem;
}

.affinity-tags-wrap {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.affinity-pill-mini {
  font-size: 0.68rem;
  padding: 0.15rem 0.35rem;
}

.td-power {
  padding: 1rem 1.25rem;
}

.combat-power-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.combat-xp-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.td-actions {
  padding: 1rem 1.25rem;
}

.actions-button-stack {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
}

.self-tag {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.table-empty-message {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Utilities */
.is-hidden {
  display: none !important;
}

.text-white { color: #fff; }
.text-cyan { color: var(--accent-cyan); }
.text-gold { color: #ffd700; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 800; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2.5rem; }
.mt-4 { margin-top: 1.5rem; }
.pt-4 { padding-top: 1.5rem; }
.border-top { border-top: 1px solid var(--border-glass); }



/* ===================================================================
   Multiverse Battle - VS result page
   =================================================================== */
.battle-vs-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .battle-vs-grid {
    grid-template-columns: 1fr;
  }
}

.battle-vs-divider {
  align-self: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--marvel-red);
  text-shadow: 0 0 20px rgba(255, 30, 66, 0.7);
  font-style: italic;
  padding-top: 3rem;
}

@media (max-width: 768px) {
  .battle-vs-divider {
    padding-top: 0;
    text-align: center;
  }
}

.battle-side-card {
  position: relative;
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.battle-side-card.battle-winner {
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.25);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), rgba(10, 14, 26, 0.75) 40%);
}

.battle-winner-crown {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ffd700, #fb8500);
  color: #000;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.battle-side-name {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin-top: 0.5rem;
  text-decoration: none;
}

.battle-side-name:hover {
  color: var(--accent-cyan);
}

.battle-side-username {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.battle-side-score {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  line-height: 1;
}

.battle-side-score span {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
}

.battle-side-substats {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0.6rem 0 1rem;
}

.battle-side-team {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.battle-hero-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.battle-side-tactics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.battle-narrative-card {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
}

.battle-narrative-text {
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.7;
  font-style: italic;
}

.battle-key-moment {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
  color: var(--manga-gold);
  font-size: 0.92rem;
  line-height: 1.6;
}

.battle-key-moment strong {
  color: #fff;
}

/* Compact "Recently Read" grid on public profiles: 5-6 cols desktop, 2-3 mobile */
.comic-grid-compact {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (max-width: 1100px) {
  .comic-grid-compact { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 860px) {
  .comic-grid-compact { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
}

@media (max-width: 480px) {
  .comic-grid-compact { grid-template-columns: repeat(2, 1fr); }
}

.comic-card-mini {
  display: flex;
  flex-direction: column;
}

.comic-card-mini .comic-cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  transition: var(--transition-fast);
}

.comic-card-mini:hover .comic-cover-wrap {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
}

.comic-card-mini .comic-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comic-mini-rating {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  color: #ffd700;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.comic-mini-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 0.4rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comic-mini-title a {
  color: inherit;
  text-decoration: none;
}

.comic-mini-title a:hover {
  color: var(--accent-cyan);
}

/* Battle modal (public profile "Battle This Team" trigger) */
.battle-modal-content {
  max-width: 780px;
  width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
}

.battle-loading-state {
  text-align: center;
  padding: 3rem 1rem;
}

.battle-loading-spinner {
  font-size: 2.5rem;
  animation: battle-spin 1s linear infinite;
  display: inline-block;
  margin-bottom: 1rem;
}

@keyframes battle-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
