/* Redesigned Admin-Style Dashboard — HoHeTo Kyle */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&family=Instrument+Sans:wght@400;500;600&display=swap');

:root {
  --color-primary: #08D2C1;
  --color-primary-glow: rgba(8, 210, 193, 0.25);
  --bg-sidebar: #011616;
  /* Deep Dark Teal/Black */
  --bg-main: #020C0C;
  /* Very dark main background */
  --bg-card: #011F1F;
  --border-card: rgba(255, 255, 255, 0.06);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.5);
  --bg-search: rgba(255, 255, 255, 0.03);
  --border-search: rgba(255, 255, 255, 0.08);
  --color-action-btn: rgba(255, 255, 255, 0.6);
  --bg-see-all: rgba(255, 255, 255, 0.03);
  --border-see-all: rgba(255, 255, 255, 0.08);
  --bg-category-card: rgba(255, 255, 255, 0.02);
  --border-category-card: rgba(255, 255, 255, 0.04);
  --sidebar-width: 250px;
  --topbar-height: 56px;
  --transition: 0.2s ease;
}

body.light-mode {
  --bg-main: #f8f9fa;
  --bg-card: #ffffff;
  --text-main: #1a1a1a;
  --text-muted: #666666;
  --border-card: rgba(0, 0, 0, 0.06);
  --bg-search: rgba(0, 0, 0, 0.05);
  --border-search: rgba(0, 0, 0, 0.1);
  --color-action-btn: #333333;
  --bg-see-all: rgba(0, 0, 0, 0.03);
  --border-see-all: rgba(0, 0, 0, 0.1);
  --bg-category-card: #ffffff;
  --border-category-card: rgba(0, 0, 0, 0.05);
}

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

.main-area {
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(8, 210, 193, 0.03), transparent 60%);
}

body.dashboard-body {
  font-family: 'Instrument Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.02);
  padding: 12px 0;
  z-index: 100;
}

.sidebar__logo {
  padding: 0 20px 16px;
  flex-shrink: 0;
}

.sidebar__logo-img {
  height: auto;
  width: auto;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 0 12px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar__nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  background-color: #033C41;
  margin-bottom: 4px;
}

.nav-item:hover {
  background: #04535a;
  color: #ffffff;
}

.nav-item--active {
  background: var(--color-primary);
  color: #011616 !important;
  font-weight: 600;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar__profile {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.profile-dropup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 16px;
  right: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 8px;
  display: none;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.profile-dropup--active {
  display: block;
}

.dropup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
}

.dropup-item:hover {
  background: rgba(24, 87, 116, 0.623);
}

.dropup-item--logout {
  color: #ff0000;
}

.dropup-item--logout:hover {
  background: rgba(255, 123, 125, 0.336);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.profile-card:hover {
  background: var(--bg-search);
}

.profile-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #334155;
}

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

.profile-card__info {
  flex: 1;
  overflow: hidden;
}

.profile-card__name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card__plan {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.profile-card__chevron {
  color: rgba(255, 255, 255, 0.3);
}

/* ── Sidebar XP Bar ── */
.sidebar__xp {
  padding: 0 8px;
  margin-bottom: 12px;
}

.xp-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.xp-level {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.xp-value {
  font-size: 10px;
  color: var(--text-muted);
}

.xp-progress {
  height: 6px;
  background: rgb(103 103 103);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.xp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #00f2e0);
  border-radius: 10px;
  box-shadow: 0 0 10px var(--color-primary-glow);
  transition: width 0.3s ease;
}

/* ── Main Layout ── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background-color var(--transition);
}

/* ── Top Bar ── */
.top-bar {
  height: var(--topbar-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-search);
}

.top-bar__title {
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.top-bar__search {
  margin: 0 24px 0 auto;
  width: 280px;
  position: relative;
}

.search-input {
  width: 100%;
  height: 38px;
  background: var(--bg-search);
  border: 1px solid var(--border-search);
  border-radius: 8px;
  padding: 0 16px 0 40px;
  color: var(--text-main);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(255, 255, 255);
}

.top-bar__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ── Daily Streak Button ── */
.streak-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 107, 0, 0.1) !important;
  border: 1px solid rgba(255, 107, 0, 0.2) !important;
  color: #ff6b00 !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.streak-btn:hover {
  background: rgba(255, 107, 0, 0.2) !important;
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.25);
  transform: translateY(-1px);
}

.streak-count {
  font-weight: 700;
  font-size: 13px;
  font-family: 'Exo 2', sans-serif;
}

/* ── Streak Modal ── */
.streak-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 8, 8, 0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.streak-modal-toggle:checked~.streak-modal-overlay {
  display: flex;
}

.streak-modal {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  background: #011F1F;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalScaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.streak-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.streak-modal__header h3 {
  font-family: 'Exo 2', sans-serif;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.close-modal {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.streak-modal__content {
  overflow-y: auto;
  padding: 8px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-search) transparent;
}

.streak-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  min-height: 200px;
}

.streak-loading,
.error-msg {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
  font-family: 'Exo 2', sans-serif;
  text-align: center;
  gap: 12px;
}

.streak-loading::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 2px solid var(--color-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.streak-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.streak-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.streak-item--active {
  background: rgba(8, 210, 193, 0.1) !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 20px var(--color-primary-glow);
}

.streak-item--claimed {
  opacity: 0.4;
  filter: grayscale(1);
}

.streak-day {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.streak-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: transform 0.3s;
}

.streak-item:hover .streak-icon {
  transform: scale(1.1) rotate(5deg);
}

.streak-item--active .streak-icon {
  background: var(--color-primary);
  color: #011616;
}

.streak-reward {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

@media (max-width: 768px) {
  .streak-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Level Up Modal ── */
.level-up-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 8, 8, 0.95);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.level-up-modal-toggle:checked~.level-up-modal-overlay {
  display: flex;
}

.level-up-modal {
  position: relative;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 0 60px var(--color-primary-glow), 0 0 120px rgba(8, 210, 193, 0.1);
  animation: levelUpPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: radial-gradient(circle at top, #023636, #011616);
}

@keyframes levelUpFlash {
  0% {
    background: rgba(255, 255, 255, 0);
  }

  10% {
    background: rgba(255, 255, 255, 0.3);
  }

  100% {
    background: rgba(255, 255, 255, 0);
  }
}

.level-up-modal-overlay.active::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  animation: levelUpFlash 0.6s ease-out forwards;
}

@keyframes levelUpPop {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(40px);
  }

  70% {
    transform: scale(1.05) translateY(-5px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.level-up-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: auraRotate 10s linear infinite;
}

@keyframes auraRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

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

.level-up-icon {
  width: 100px;
  height: 100px;
  background: var(--color-primary);
  color: #011616;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 40px var(--color-primary), 0 0 70px var(--color-primary-glow);
  animation: iconBounce 2s ease-in-out infinite, iconPulseGlow 1.5s ease-in-out infinite;
}

@keyframes iconPulseGlow {

  0%,
  100% {
    box-shadow: 0 0 40px var(--color-primary), 0 0 70px var(--color-primary-glow);
  }

  50% {
    box-shadow: 0 0 60px var(--color-primary), 0 0 100px var(--color-primary-glow);
  }
}

@keyframes iconBounce {

  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }

  50% {
    transform: translateY(-10px);
    filter: brightness(1.3);
  }
}

.level-up-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px var(--color-primary);
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.level-up-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.old-level,
.new-level {
  font-size: 56px;
  font-weight: 800;
  font-family: 'Exo 2', sans-serif;
  color: var(--text-muted);
}

.new-level {
  color: var(--color-primary);
  text-shadow: 0 0 15px var(--color-primary-glow);
}

.level-arrow {
  color: #fff;
  opacity: 0.5;
}

.level-up-msg {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

.btn-level-up-claim {
  background: var(--color-primary);
  color: #011616;
  border: none;
  padding: 16px 48px;
  border-radius: 121px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.btn-level-up-claim:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--color-primary);
}

.action-btn {
  background: none;
  border: none;
  color: var(--color-action-btn);
  cursor: pointer;
  position: relative;
}

.badge--dot {
  position: absolute;
  top: -13px;
  right: -11px;
  width: 18px;
  height: 18px;
  background: #ff4d4f;
  border-radius: 50%;
  border: 2px solid var(--bg-main);
  font-size: 11px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  padding: 9px;
}

.btn-create {
  background: var(--color-primary);
  color: #011616;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* ── Token Display ── */
.token-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  color: #ffd700;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.05);
}

.token-display:hover {
  background: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), inset 0 0 10px rgba(255, 215, 0, 0.1);
  transform: translateY(-1px);
  border-color: rgba(255, 215, 0, 0.5);
}

.token-icon {
  color: #ffd700;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
}

#header-token-count {
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ── Content View ── */
.content-view {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.welcome-section {
  margin-bottom: 40px;
  text-align: center;
}

.welcome-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.welcome-text-side {
  flex: 1;
  min-width: 300px;
}

.welcome-stats-side {
  flex: 0 0 320px;
}

.dashboard-xp-card {
  background: rgba(8, 210, 193, 0.03);
  border: 1px solid rgba(8, 210, 193, 0.1);
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.welcome-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.welcome-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* Sections */
.dashboard-section {
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 24px;
  padding: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.btn-see-all {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-see-all);
  border: 1px solid var(--border-see-all);
  padding: 4px 14px;
  border-radius: 6px;
  text-decoration: none;
}

/* Category Cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--bg-category-card);
  border: 1px solid var(--border-category-card);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Achievements Section ── */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.achievement-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.5;
  filter: grayscale(1);
}

.achievement-card--unlocked {
  background: rgba(8, 210, 193, 0.05);
  border: 1px solid rgba(8, 210, 193, 0.2);
  opacity: 1;
  filter: grayscale(0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.achievement-card--unlocked:hover {
  box-shadow: 0 8px 30px rgba(8, 210, 193, 0.2);
  border-color: var(--color-primary);
}

.achievement-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
}

.achievement-card--unlocked .achievement-icon {
  background: var(--color-primary);
  color: #011616;
  box-shadow: 0 0 15px var(--color-primary-glow);
}

.achievement-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  font-family: 'Exo 2', sans-serif;
}

.achievement-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

.achievement-status {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
}

.achievement-card--unlocked .achievement-status {
  background: var(--color-primary);
  color: #011616;
  font-weight: 700;
}

.category-card__img {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card__img img {
  width: 100%;
  height: 100%;
  /* filter: drop-shadow(0 0 8px currentColor); */
}

.category-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-card__title {
  font-weight: 600;
  font-size: 14px;
}

.category-card__desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Creatures Grid (Replaces Horizontal Scroll) */
.creatures-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* Creature Cards (Flip Animation) */
.creature-card--tall,
.creature-card--rounded {
  perspective: 1000px;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 1.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  transform: rotateY(180deg); /* Initial state: Back showing */
}

.card-inner.is-revealed {
  transform: rotateY(0deg); /* Reveal front */
}

.creature-card--tall:hover .card-inner.is-revealed,
.creature-card--rounded:hover .card-inner.is-revealed {
  transform: rotateY(360deg);
}

.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.creature-card--rounded .card-front,
.creature-card--rounded .card-back {
  border-radius: 24px;
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-primary-glow);
}

.card-front img,
.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.creature-card--tall {
  width: 100%;
  aspect-ratio: 2/3;
}

.creature-card--rounded {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 24px;
}

.creature-card--rounded:hover {
  transform: scale(1.03);
}

.creature-card--rounded img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Scrollbar Style */
.content-view::-webkit-scrollbar {
  width: 6px;
}

.content-view::-webkit-scrollbar-track {
  background: transparent;
}

.content-view::-webkit-scrollbar-thumb {
  background: var(--border-search);
  border-radius: 10px;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border-search);
  margin: 4px 0;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Creation Page Cards ── */
.creation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.creation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 380px;
  position: relative;
}

.creation-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px var(--color-primary-glow);
  transform: translateY(-4px);
}

.card-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Card Footers */
.card-footer-text {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-muted);
}

.formats-info {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Specific Card UIs */
.recording-ui {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.waveform-display {
  width: 100%;
  height: 100px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-search);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  padding: 0 20px;
}

.wave-bar {
  width: 3px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 3px;
  animation: wave 1s ease-in-out infinite;
}

@keyframes wave {

  0%,
  100% {
    height: 10px;
    opacity: 0.5;
  }

  50% {
    height: 40px;
    opacity: 1;
  }
}

.wave-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
  animation-delay: 0.3s;
}

.wave-bar:nth-child(5) {
  animation-delay: 0.4s;
}

.wave-bar:nth-child(6) {
  animation-delay: 0.5s;
}

.wave-bar:nth-child(7) {
  animation-delay: 0.6s;
}

.wave-bar:nth-child(8) {
  animation-delay: 0.7s;
}

.wave-bar:nth-child(9) {
  animation-delay: 0.8s;
}

.wave-bar:nth-child(10) {
  animation-delay: 0.9s;
}

.wave-bar:nth-child(11) {
  animation-delay: 1.0s;
}

.wave-bar:nth-child(12) {
  animation-delay: 0.1s;
}

.wave-bar:nth-child(13) {
  animation-delay: 0.2s;
}

.wave-bar:nth-child(14) {
  animation-delay: 0.3s;
}

.wave-bar:nth-child(15) {
  animation-delay: 0.4s;
}

.wave-bar:nth-child(16) {
  animation-delay: 0.5s;
}

.wave-bar:nth-child(17) {
  animation-delay: 0.6s;
}

.wave-bar:nth-child(18) {
  animation-delay: 0.7s;
}

.wave-bar:nth-child(19) {
  animation-delay: 0.8s;
}

.wave-bar:nth-child(20) {
  animation-delay: 0.9s;
}

.timer {
  font-family: 'Exo 2', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
}

.btn-stop,
.btn-start-record {
  background: #e11d48;
  color: white;
  border: none;
  padding: 12px 48px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}

.btn-start-record {
  background: transparent;
  border: 1px dashed var(--border-search);
  color: var(--text-muted);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.btn-start-record:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--color-primary);
  color: var(--text-main);
}

.upload-dropzone {
  width: 100%;
  height: 80px;
  border: 1px dashed var(--border-search);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 24px;
  transition: all 0.2s;
}

.upload-dropzone:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--color-primary);
  color: var(--text-main);
}

.input-url-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.url-input {
  width: 100%;
  height: 40px;
  background: rgba(0, 20, 20, 0.6);
  border: 1px solid rgba(8, 210, 193, 0.3);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.url-input:focus {
  border-color: var(--color-primary);
  background: rgba(0, 30, 30, 0.8);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.btn-generate {
  background: #00f2e0;
  /* Vibrant Cyan/Teal */
  color: #011616;
  border: none;
  height: 44px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-generate:hover {
  background: #00d9c8;
  transform: scale(1.01);
}

/* Light Mode Overrides for Creation Cards */
body.light-mode .creation-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-mode .upload-dropzone:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.light-mode .waveform-display {
  background: rgba(0, 0, 0, 0.01);
}

body.light-mode .url-input {
  background: #f0fdfa;
  border: 1px solid rgba(8, 210, 193, 0.2);
  color: #333;
}

body.light-mode .url-input:focus {
  background: #ffffff;
}

body.light-mode .btn-start-record,
body.light-mode .upload-dropzone {
  color: #555;
  border-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
  .creation-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

/* ── Collection Hub Styles ── */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 40px;
  margin: 0px 40px;
}

.trope-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.trope-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
}

.trope-card__img-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.trope-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.trope-card:hover .trope-card__img-wrap img {
  transform: scale(1.05);
}

.trope-card__footer {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 12px;
}

.trope-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trope-card__title {
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.trope-card__stats {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
}

.trope-card__logo {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.trope-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Trope Specific Colors & Glows */
.trope-card--terratrope {
  border-color: rgba(8, 210, 193, 0.3);
  box-shadow: 0 4px 20px rgba(8, 210, 193, 0.1);
}

.trope-card--terratrope:hover {
  box-shadow: 0 8px 30px rgba(8, 210, 193, 0.2);
  border-color: #08D2C1;
}

.trope-card--aquatrope {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.trope-card--aquatrope:hover {
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.2);
  border-color: #2563EB;
}

.trope-card--aerotrope {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
}

.trope-card--aerotrope:hover {
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.2);
  border-color: #0EA5E9;
}

.trope-card--pyrotrope {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.1);
}

.trope-card--pyrotrope:hover {
  box-shadow: 0 8px 30px rgba(249, 115, 22, 0.2);
  border-color: #F97316;
}

.trope-card--sonatrope {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.1);
}

.trope-card--sonatrope:hover {
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.2);
  border-color: #4F46E5;
}

.trope-card--limotrope {
  border-color: rgba(234, 179, 8, 0.3);
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.1);
}

.trope-card--limotrope:hover {
  box-shadow: 0 8px 30px rgba(234, 179, 8, 0.2);
  border-color: #EAB308;
}

.trope-card--primatrope {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.trope-card--primatrope:hover {
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
  border-color: #10B981;
}

.trope-card--megatrope {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.trope-card--megatrope:hover {
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
  border-color: #8B5CF6;
}

/* Light Mode Overrides */
body.light-mode .trope-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .trope-card__title {
  color: #1a1a1a;
}

body.light-mode .trope-card:hover {
  background: #f8fafc;
}

/* Tablet / Mobile Grid */
@media (max-width: 1200px) {
  .collection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

@media (max-width: 600px) {
  .collection-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Dashboard Top Grid ── */
/* ── Dashboard Top Grid (Updated to Full) ── */
.dashboard-top-full {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 40px;
}

/* ── Leaderboard Wrapper (Side-by-Side) ── */
.leaderboard-wrapper {
  display: flex;
  gap: 16px;
  min-height: 400px;
  align-items: stretch;
}

.leaderboard-main {
  flex: 1.5;
  display: flex;
  flex-direction: column;
}

.leaderboard-showcase {
  flex: 1;
  background: linear-gradient(135deg, rgba(8, 210, 193, 0.05), rgba(0, 0, 0, 0.4));
  border: 1px solid var(--border-card);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.showcase-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 16px;
  z-index: 2;
}

.top-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #FFD700;
  color: #000;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 800;
  font-family: 'Exo 2', sans-serif;
  letter-spacing: 1px;
  font-size: 14px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  z-index: 2;
}

.top-creature-info {
  background-color: #105b44bd;
  padding: 8px;
  text-align: center;
  margin-bottom: 0px;
  z-index: 1;
  border-radius: 15px;
}

.top-creature-info h4 {
  font-size: 24px;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.top-creature-info p {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.top-image-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: min-content;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 30px var(--color-primary-glow));
}

.top-image-container img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  /* animation: float 4s ease-in-out infinite;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); */
}

.top-image-container img.image-changing {
  opacity: 0.2;
  transform: scale(0.95);
  filter: blur(8px);
}

/* Image Loader for Showcase */
.image-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(8, 210, 193, 0.1);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.image-loader.loader-active {
  opacity: 1;
  animation: spin 1s linear infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.showcase-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 30%, rgba(1, 31, 31, 0.8) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Leaderboard Specifics */
.leaderboard-container {
  background: rgba(1, 31, 31, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.leaderboard-container .section-title {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.leaderboard-tabs {
  display: flex;
  gap: 12px;
}

.l-tab {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.l-tab.active {
  background: var(--color-primary);
  color: #011616;
}

.l-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
}

.leaderboard-table-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px 12px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.col-rank {
  width: 36px;
  text-align: center;
}

.col-user {
  width: 160px;
}

.col-progress {
  width: 200px;
  padding: 0 16px;
  margin-right: auto;
  /* Push CARDS header to the end */
}

.col-cards {
  width: 70px;
  text-align: center;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.leaderboard-list::-webkit-scrollbar {
  display: none;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 20px;
  border-radius: 100px;
  /* Pill shape */
  background: url(../img/dragon3.png) no-repeat right / 40%, linear-gradient(90deg, #012a2a, #011616);
  border: 1px solid rgba(8, 210, 193, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  margin-bottom: 8px;
}

.leaderboard-item:hover,
.leaderboard-item--active {
  background: url(../img/dragon3.png) no-repeat right / 40%, linear-gradient(90deg, #023f3f, #011f1f) !important;
  border-color: var(--color-primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(8, 210, 193, 0.1);
  transform: scale(1.01);
}

.item-rank {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #075a50, #081b19);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.4);
  font-family: 'Exo 2', sans-serif;
  border: 2px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.rank-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.item-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: #1e293b;
}

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

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

.item-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.item-level {
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
}

.item-progress {
  flex: 0 0 200px;
  /* fixed container width */
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
}

.progress-label {
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Exo 2', sans-serif;
  text-align: left;
}

.progress-bar-container {
  width: 140px;
  /* Reduced specific width */
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #08D2C1, #00f2e0);
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(8, 210, 193, 0.3);
}

.item-cards-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 70px;
  margin-left: auto;
  /* Push to far right */
}

.cards-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cards-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: invert(90%) sepia(93%) saturate(1000%) hue-rotate(90deg) brightness(90%) contrast(95%);
  transition: filter 0.3s ease;
}

/* Rank-specific Dragon Colors */
.rank-1 .cards-icon img {
  filter: invert(91%) sepia(29%) saturate(2250%) hue-rotate(344deg) brightness(101%) contrast(105%);
}

.rank-2 .cards-icon img {
  filter: invert(90%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(90%);
}

.rank-3 .cards-icon img {
  filter: invert(52%) sepia(61%) saturate(541%) hue-rotate(346deg) brightness(91%) contrast(89%);
}


.cards-val {
  font-size: 25px;
  font-weight: 800;
  font-family: 'Exo 2', sans-serif;
  color: #fff;
}

.cards-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}

/* Rank specific overrides removed to match rest of ranks */


.leaderboard-footer {
  margin-top: 24px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.your-rank-item {
  background: linear-gradient(90deg, #064e3b, #022c22) !important;
  border: 2px solid var(--color-primary) !important;
}

@media (max-width: 1024px) {
  .leaderboard-wrapper {
    flex-direction: column;
  }

  .leaderboard-showcase {
    height: 400px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

/* Page-Specific Overrides for Leaderboard (No Main Scroll) */
.page-leaderboard .content-view {
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
  padding-bottom: 16px;
}

.page-leaderboard .dashboard-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 8px;
  /* Compact */
}

.page-leaderboard .leaderboard-wrapper {
  flex: 1;
  min-height: 0;
}

.page-leaderboard .leaderboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-leaderboard .leaderboard-showcase {
  flex: 0 0 450px;
  /* Fixed width showcase */
  height: auto;
}

.page-leaderboar .page-leaderboard .leaderboard-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* Media Query for Leaderboard (Responsive) */
/* ── Notifications Offcanvas ── */
.noti-offcanvas {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  height: 100vh;
  background: #011F1F;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 9999;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
}

#notiOffcanvasToggle:checked~.noti-offcanvas {
  right: 0 !important;
}

.noti-offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

#notiOffcanvasToggle:checked~.noti-offcanvas-backdrop {
  opacity: 1;
  visibility: visible;
}

.noti-offcanvas__header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.noti-offcanvas__header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.noti-offcanvas__header h3 {
  font-family: 'Exo 2', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.noti-offcanvas__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.noti-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.noti-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.close-offcanvas {
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-offcanvas:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Filters */
.noti-filters {
  display: flex;
  gap: 8px;
}

.noti-filter {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.noti-filter:hover {
  background: rgba(255, 255, 255, 0.1);
}

.noti-filter.active {
  background: var(--color-primary);
  color: #011616;
}

.noti-offcanvas__content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.noti-offcanvas__content::-webkit-scrollbar {
  width: 4px;
}

.noti-offcanvas__content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.noti-list {
  display: flex;
  flex-direction: column;
}

.noti-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  align-items: flex-start;
}

.noti-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.noti-item--unread {
  background: rgba(8, 210, 193, 0.03);
}

.noti-item--unread:hover {
  background: rgba(8, 210, 193, 0.06);
}

.noti-item__avatar {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.noti-item__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.noti-item__type-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #011F1F;
}

.noti-item__info {
  flex: 1;
  padding-top: 4px;
}

.noti-item__text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 4px;
}

.noti-item__text strong {
  color: #fff;
  font-weight: 600;
}

.noti-item__time {
  font-size: 12px;
  color: var(--text-muted);
}

.noti-item--unread .noti-item__time {
  color: var(--color-primary);
  font-weight: 600;
}

.noti-item__status {
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border-radius: 50%;
  margin-top: 24px;
  flex-shrink: 0;
}

.noti-offcanvas__footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.view-all-noti {
  text-decoration: none;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.view-all-noti:hover {
  opacity: 0.8;
}

/* Light Mode Support */
body.light-mode .noti-offcanvas {
  background: #ffffff;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-mode .noti-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.light-mode .noti-item--unread {
  background: rgba(8, 210, 193, 0.05);
}

body.light-mode .noti-item__type-icon {
  border-color: #fff;
}

body.light-mode .noti-filter {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

body.light-mode .noti-filter.active {
  background: var(--color-primary);
  color: #fff;
}

body.light-mode .noti-action-btn,
body.light-mode .close-offcanvas {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

body.light-mode .noti-action-btn:hover,
body.light-mode .close-offcanvas:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
}

@media (max-width: 1024px) {
  .page-leaderboard .content-view {
    overflow-y: auto;
    height: auto;
  }
}

/* ── Dashboard Enhancements ── */
.no-data-msg {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.creature-card--tall {
  position: relative;
  overflow: hidden;
}

.card-engagement-mini {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}



.noti-list {
  display: flex;
  flex-direction: column;
}

.noti-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  align-items: flex-start;
}

.noti-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.noti-item--unread {
  background: rgba(8, 210, 193, 0.03);
}

.noti-item--unread:hover {
  background: rgba(8, 210, 193, 0.06);
}

.noti-item__avatar {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.noti-item__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.noti-item__type-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #011F1F;
}

.noti-item__info {
  flex: 1;
  padding-top: 4px;
}

.noti-item__text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 4px;
}

.noti-item__text strong {
  color: #fff;
  font-weight: 600;
}

.noti-item__time {
  font-size: 12px;
  color: var(--text-muted);
}

.noti-item--unread .noti-item__time {
  color: var(--color-primary);
  font-weight: 600;
}

.noti-item__status {
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border-radius: 50%;
  margin-top: 24px;
  flex-shrink: 0;
}

.noti-offcanvas__footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.view-all-noti {
  text-decoration: none;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.view-all-noti:hover {
  opacity: 0.8;
}

/* Light Mode Support */
body.light-mode .noti-offcanvas {
  background: #ffffff;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-mode .noti-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.light-mode .noti-item--unread {
  background: rgba(8, 210, 193, 0.05);
}

body.light-mode .noti-item__type-icon {
  border-color: #fff;
}

body.light-mode .noti-filter {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

body.light-mode .noti-filter.active {
  background: var(--color-primary);
  color: #fff;
}

body.light-mode .noti-action-btn,
body.light-mode .close-offcanvas {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

body.light-mode .noti-action-btn:hover,
body.light-mode .close-offcanvas:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
}

@media (max-width: 1024px) {
  .page-leaderboard .content-view {
    overflow-y: auto;
    height: auto;
  }
}

/* ── Dashboard Enhancements ── */
.no-data-msg {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.creature-card--tall {
  position: relative;
  overflow: hidden;
}

.card-engagement-mini {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.creature-card--tall:hover .card-engagement-mini {
  opacity: 1;
  transform: translateY(0);
}

.creatures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* Horizontal Grid Overrides */
.creatures-grid--horizontal {
  display: flex !important;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px 4px 20px;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.creatures-grid--horizontal::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.creatures-grid--horizontal .creature-card--tall,
.creatures-grid--horizontal .creature-card--rounded {
  flex: 0 0 180px;
  width: 180px;
}

.creature-card--tall img,
.creature-card--rounded img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scroll Buttons */
.scroll-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
}

.btn-scroll {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-search);
  border: 1px solid var(--border-search);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-scroll:hover {
  background: var(--color-primary);
  color: #011616;
  border-color: var(--color-primary);
}

.btn-scroll svg {
  width: 18px;
  height: 18px;
}

/* -- Floating Battle Button (FAB) -- */
.fab-battle {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: var(--color-primary);
  color: #011616;
  padding: 16px 28px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 2px;
  box-shadow: 0 10px 30px var(--color-primary-glow);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.fab-battle svg {
  width: 24px;
  height: 24px;
}

.fab-battle:hover {
  transform: scale(1.05) translateY(-5px);
  background: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 15px 40px rgba(8, 210, 193, 0.4);
}

.fab-battle:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .fab-battle {
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
  }

  .fab-text {
    display: none;
  }

  .fab-battle {
    width: 60px;
    height: 60px;
    justify-content: center;
    padding: 0;
  }
}