/* v2 — bump */
:root {
  --bg: #252525;
  --bg2: #1a1a1a;
  --bg-btn: #2f2f2f;
  --panel: #212121;
  --panel2: #1a2420;
  --panel-border: #3e3e3e;
  --gold: #d4af37;
  --gold-light: #ffd850;
  --gold-dark: #4a3b0e;
  --text: #ebebeb;
  --text-secondary: #aeaeae;
  --border-color: #4f4f4f;
  --common: #9e9e9e;
  --uncommon: #4caf50;
  --rare: #2196f3;
  --epic: #9c27b0;
  --legendary: #ff9800;
  --mythic: #ff4444;
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --color-unliked: #545454;
  --color-liked: #d84343;
  --color-particle-1: #f6717c;
  --color-particle-2: #f6c76e;
  --color-particle-3: #c583ee;
}

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

body {
  background: var(--bg);
  /* background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(33,150,243,0.02) 0%, transparent 40%); */
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  overscroll-behavior: none;
  height: 100dvh;
  width: 100vw;
  position: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

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

html {
  scrollbar-width: none;
  overflow: hidden;
  height: 100dvh;
}

.app {
  max-width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen {
  display: none;
  animation: fadeIn 200ms ease-out;
  height: 100%;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px 16px 80px;
}

.screen.active {
  display: flex;
}

#screen-result.center-content {
  height: 92vh;
  justify-content: center;
}

.cam-buttons-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 21px;
  margin-top: -50px;
  position: relative;
  z-index: 1;
}

/* Weather & streak bar */
.camera-weather {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.camera-streak {
  display: none;
}

/* Monthly stats bar */
.camera-stats-bar {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  margin-top: 4px;
  border-top: 1px solid #4a4a4a;
  font-size: 13px;
  color: var(--text-secondary);
}

.camera-stats-bar span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.camera-stats-bar .stat-value {
  color: var(--text);
  font-weight: 600;
}

#extra-filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

#extra-filters.hidden {
  display: none;
}

#extra-filters .btn {
  font-size: 13px;
  padding: 10px 4px;
}

#player-extra-filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

#player-extra-filters.hidden {
  display: none;
}

#player-extra-filters .btn {
  font-size: 13px;
  padding: 10px 4px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.title {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-heading);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
}

.title svg {
  width: 36px;
  height: 36px;
  fill: var(--gold);
  flex-shrink: 0;
}

.level-display {
  font-size: 28px;
  font-weight: 900;
  font-family: var(--font-heading);
  color: var(--gold);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.xp-bar {
  width: 100%;
  height: 14px;
  background: var(--bg2);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  position: relative;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #2d7a3a, #4caf50, var(--gold-light));
  transition: width 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 7px;
  position: relative;
}

.xp-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent);
  border-radius: 7px 7px 0 0;
}

.btn {
  min-height: 48px;
  min-width: 48px;
  padding: 10px 16px;
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid var(--border-color);
  background: var(--bg-btn);
  color: var(--text);
  /* font-size: 16px; */
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  /* transition: transform 150ms ease-out, box-shadow 150ms ease-out, border-color 150ms ease-out;
      text-shadow: 0 1px 2px rgba(0,0,0,0.8);
      box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05); */
}

.btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn:hover {
  border-color: var(--gold-dark);
}

.btn-gold {
  border-color: var(--gold-light);
  background: var(--gold-dark);
  color: var(--gold-light);
  font-size: 14px;
}

.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-light);
}

.btn.btn-detail-change {
  background: #5aaefb2e;
  min-height: 40px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-tab {
  flex: 1 1 calc(33.333% - 6px);
  min-width: 0;
  justify-content: center;
  font-size: 14px;
  padding: 8px 12px;
  border-color: var(--panel-border);
  transition: all 150ms ease-out;
}

.filter-tab:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

.filter-tab.active {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
}

.sort-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.btn-sort {
  flex: 1;
  font-size: 12px;
  padding: 6px 4px;
  background: var(--bg-btn);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-height: 32px;
  margin-top: 8px;
}

.btn-sort.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--text-primary);
}

.btn-sort:hover {
  border-color: var(--gold-dark);
  color: var(--text-primary);
}

@media (max-width: 360px) {
  .filter-tab {
    flex: 1 1 calc(50% - 4px);
    font-size: 12px;
    padding: 6px 8px;
  }
}

.shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.shutter-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

.rarity-common {
  border: 2px solid var(--common) !important;
  box-shadow: 0 0 8px rgba(158, 158, 158, 0.4);
}

.rarity-uncommon {
  border: 2px solid var(--uncommon) !important;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.rarity-rare {
  border: 2px solid var(--rare) !important;
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}

.rarity-epic {
  border: 2px solid var(--epic) !important;
  box-shadow: 0 0 8px rgba(156, 39, 176, 0.6);
  position: relative;
}

.rarity-epic::before,
.rarity-epic::after {
  content: '◆';
  position: absolute;
  color: var(--epic);
  font-size: 12px;
}

.rarity-epic::before {
  top: -6px;
  left: -6px;
}

.rarity-epic::after {
  bottom: -6px;
  right: -6px;
}

.rarity-legendary {
  border: 2px solid var(--legendary) !important;
  box-shadow: 0 0 8px rgba(226, 155, 33, 0.6);
}

@keyframes legendaryGlow {
  from {
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
  }

  to {
    box-shadow: 0 0 30px rgba(255, 152, 0, 0.8);
  }
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px 0;
}

.collection-card {
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--panel-border);
}

.collection-card img {
  width: 100%;
  /* height: 220px; */
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.collection-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  padding: 16px 8px 6px;
  text-align: center;
  z-index: 1;
  pointer-events: none;
}

.collection-card .card-overlay .name {
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: white;
  text-align: center;
}

.card-badge {
  position: absolute;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  line-height: 1.3;
  color: white;
}

.card-category {
  top: 5px;
  left: 5px;
  font-size: 15px;
}

.card-observer {
  top: 5px;
  right: 5px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
}

.card-likes {
  top: 26px;
  right: 5px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 2px;
}

.card-likes .paw-stat-icon {
  width: 11px;
  height: auto;
}

/* === Новое нижнее меню (центральная кнопка Земля+Камера) === */
:root {
  --menu-bg: #0a0d0a;
  --menu-gold-light: #fff0b3;
  --menu-gold-base: #d4af37;
  --menu-gold-dark: #aa841c;
  --menu-gold-gradient: linear-gradient(135deg, #4a3610 0%, #d4af37 30%, #fff0b3 50%, #d4af37 70%, #30220a 100%);
  --menu-text-dim: #637565;
  --menu-text-active: #fff0b3;
}

.nav-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  filter: drop-shadow(0 -10px 30px rgba(0, 0, 0, 0.9));
  z-index: 1000;
}

.bottom-nav {
  height: 75px;
  background: #191919;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 5px 5px 0px 5px;
  position: relative;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 70" preserveAspectRatio="none"><path d="M0,0 L135,0 C155,0 160,32 200,32 C240,32 245,0 265,0 L400,0 L400,70 L0,70 Z" fill="black"/></svg>') no-repeat;
  mask-size: 100% 100%;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 70" preserveAspectRatio="none"><path d="M0,0 L135,0 C155,0 160,32 200,32 C240,32 245,0 265,0 L400,0 L400,70 L0,70 Z" fill="black"/></svg>') no-repeat;
  -webkit-mask-size: 100% 100%;
}

.nav-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--menu-gold-gradient);
  z-index: 5;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 70" preserveAspectRatio="none"><path d="M0,0 L135,0 C155,0 160,32 200,32 C240,32 245,0 265,0 L400,0 L400,70 L0,70 Z" fill="black"/></svg>') no-repeat;
  mask-size: 100% 100%;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 70" preserveAspectRatio="none"><path d="M0,0 L135,0 C155,0 160,32 200,32 C240,32 245,0 265,0 L400,0 L400,70 L0,70 Z" fill="black"/></svg>') no-repeat;
  -webkit-mask-size: 100% 100%;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  flex: 1;
  max-width: 70px;
  height: 100%;
  transition: all 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.nav-tab svg {
  width: 36px;
  height: 36px;
  fill: var(--menu-text-dim);
  transition: fill 0.2s ease, transform 0.2s ease;
}

.nav-tab span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--menu-text-dim);
  transition: color 0.2s ease;
}

.nav-tab.active svg {
  fill: var(--menu-text-active);
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 8px rgba(255, 240, 179, 0.4));
}

.nav-tab.active span {
  color: var(--menu-text-active);
  text-shadow: 0 0 10px rgba(255, 240, 179, 0.3);
}

.nav-space {
  flex: 1;
  max-width: 65px;
  pointer-events: none;
}

.main-camera-btn {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: 78px;
  height: 78px;
  border-radius: 50%;
  z-index: 1050;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: var(--menu-gold-gradient);
  padding: 3px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(212, 175, 55, 0.3);
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.earth-sphere {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0d1e3d;
  position: relative;
  overflow: hidden;
  box-shadow: inset -8px -8px 20px rgba(0, 0, 0, 0.9), inset 6px 6px 15px rgba(255, 255, 255, 0.2);
}

.earth-map-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: scale(1.05);
}

.earth-atmosphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 12px rgba(110, 210, 255, 0.6);
  background: radial-gradient(circle at 35% 35%, transparent 40%, rgba(0, 0, 0, 0.5) 85%);
}

.camera-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-overlay svg {
  width: 46px;
  height: 46px;
  fill: #ffffff;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.3);
}

.main-camera-btn:hover {
  transform: translateX(-50%) scale(1.06);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.85), 0 0 30px rgba(255, 240, 179, 0.5);
}

.main-camera-btn:hover .camera-overlay svg {
  transform: scale(1.12) rotate(-5deg);
  fill: var(--menu-gold-light);
}

.main-camera-btn:active {
  transform: translateX(-50%) scale(0.92);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.9);
}

/* Бейдж уведомлений — правый верхний угол SVG-иконки */
.nav-tab[data-screen="notifications"] .notif-badge {
  position: absolute;
  top: 8px;
  right: 14px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
  z-index: 2;
  letter-spacing: 0;
  text-transform: none;
}

.nav-tab[data-screen="notifications"] .notif-badge.hidden {
  display: none;
}

/* Leaderboard */
.lb-podium {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 16px;
}

.lb-podium-card {
  flex: 1;
  max-width: 120px;
  text-align: center;
  padding: 12px 8px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: all 0.2s;
}

.lb-podium-card:hover {
  border-color: var(--gold-dark);
}

.lb-podium-card.gold {
  background: #393118;
  border-color: var(--gold);
}

.lb-podium-card.silver {
  background: #393939;
  border-color: #c0c0c0;
}

.lb-podium-card.bronze {
  background: #231609;
  border-color: #cd7f32;
}

.lb-podium-avatar {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--panel2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 3px solid transparent;
}

.lb-podium-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-podium-xp {
  font-size: 12px;
  color: var(--gold);
  margin-top: 2px;
}

.lb-podium-cup {
  font-size: 22px;
  margin-bottom: 4px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.lb-row:hover {
  border-color: var(--gold-dark);
}

.lb-row.is-me {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}

.lb-rank {
  width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--panel2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 3px solid transparent;
}

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

.lb-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-stats {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.lb-xp {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.lb-me-badge {
  background: var(--gold);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

/* Player profile popup */
.player-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.player-stat-card {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

.player-stat-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.player-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.player-stat-label {
  font-size: 10px;
  color: var(--text-secondary);
}

.player-profile-scroll {
  overscroll-behavior: none;
}

.player-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.player-collection-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  cursor: pointer;
}

.player-collection-card:hover {
  border-color: var(--gold-dark);
}

.player-collection-card.rarity-common {
  border-color: var(--common);
}

.player-collection-card.rarity-uncommon {
  border-color: var(--uncommon);
}

.player-collection-card.rarity-rare {
  border-color: var(--rare);
}

.player-collection-card.rarity-epic {
  border-color: var(--epic);
}

.player-collection-card.rarity-legendary {
  border-color: var(--legendary);
}

.player-collection-card.rarity-rare,
.player-collection-card.rarity-epic,
.player-collection-card.rarity-legendary {
  animation: none;
}

.load-sentinel {
  height: 1px;
  grid-column: 1 / -1;
}

#player-profile-modal .reward-card {
  border: none;
  box-shadow: none;
  padding: 16px;
  height: 91vh;
  /* padding-bottom: 80px; */
}

.player-collection-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.player-card-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  padding: 16px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}

/* .player-photo-viewer {
      display: block;
      overflow: hidden;
      padding: 0;
      z-index: 250;
    } */

.player-photo-viewer .player-viewer-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(0 0 0 / 60%);
  border: 1px solid #acacac;
  color: var(--text-secondary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 150ms ease-out;
}

/* .player-photo-viewer .photo-viewer-image {
      width: 100%;
      height: 62vh;
      object-fit: cover;
      border-radius: 0px;
      display: block;
      cursor: zoom-in;
    } */

.player-card-slider {
  height: 100%;
  overflow: hidden;
  position: relative;
}

.player-card-track {
  display: flex;
  height: 100%;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.player-card-track.no-transition {
  transition: none;
}

.player-card-slide {
  flex: 0 0 100%;
  height: 100%;
  padding: 8px 8px;
  box-sizing: border-box;
  overflow-y: auto;
}

/* .player-photo-scroll {
      overflow-y: auto;
      flex: 1;
      min-height: 0;
      padding-bottom: 20px;
    } */

.player-photo-viewer .reward-card {
  animation: none !important;
}

#collection-card-slider {
  height: 100%;
  overflow: hidden;
  position: relative;
}

#collection-card-track {
  display: flex;
  height: 100%;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

#collection-card-track.no-transition {
  transition: none;
}

.collection-card-slide .reward-card {
  animation: none !important;
}

.collection-card-slide .detail-card {
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.player-card-slide .detail-card {
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.collection-card-slide {
  flex: 0 0 100%;
  height: 100%;
  padding: 8px 8px;
  box-sizing: border-box;
  overflow-y: auto;
}

#collection-detail-popup .search-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 1.0);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

#collection-detail-popup .search-overlay-inner {
  margin-top: 16px;
  overflow-y: auto;
  flex: 1;
}

#detail-species-preview {
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  z-index: 100;
  overflow-y: auto;
  padding: 16px;
  margin-bottom: 25px;
}

#detail-species-preview.hidden {
  display: none;
}

#detail-species-preview .preview-header {
  display: flex;
  align-items: center;
}

#detail-species-preview .btn-back {
  font-size: 14px;
  padding: 6px 12px;
  min-height: 36px;
}

#detail-species-preview .preview-photo {
  width: 100%;
  height: 62vh;
  object-fit: cover;
  border-radius: 0;
  display: block;
  cursor: zoom-in;
}

#collection-detail-popup .category-picker {
  position: absolute;
  bottom: 80px;
  left: 16px;
  right: 16px;
  z-index: 100;
  background: var(--bg2);
  border-radius: 4px;
  padding: 12px;
}

html {
  overscroll-behavior: none;
}

.reward-overlay {
  position: fixed;
  max-height: 92vh;
  inset: 0;
  background: rgba(0, 0, 0, 1.0);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  overflow: hidden;
  overscroll-behavior: none;
}

.reward-overlay.active {
  display: flex;
}

.reward-card {
  background: var(--bg2);
  border: 2px solid var(--gold-dark);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  max-width: 90%;
  width: 320px;
}

.reward-card.detail-card {
  background: var(--bg);
}

@keyframes rewardBounce {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.reward-icon {
  font-size: 64px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.4));
}

.reward-title {
  font-size: 24px;
  font-family: var(--font-heading);
  color: var(--gold-light);
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}



/* Live Camera Overlay */
#camera-overlay.active {
  display: flex !important;
}

#cam-species-label {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 16px;
  right: 16px;
  transform: none;
  max-width: none;
  width: auto;
  font-size: 22px;
  font-weight: 700;
  background: rgb(161 117 6 / 50%);
  border: 1px solid #ffaf00;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 12px 24px;
  border-radius: 12px;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 5;
  transition: opacity 300ms ease-out;
}

#cam-species-label:empty {
  display: none;
}

#cam-species-label.loading::after {
  content: ' 🤔';
}

#camera-overlay.cam-scanning::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  z-index: 15;
  pointer-events: none;
  animation: scanBorder 1.5s ease-in-out infinite;
}

#camera-overlay.cam-scanning::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  box-shadow: 0 0 8px var(--gold), 0 0 20px rgba(212, 175, 55, 0.4);
  z-index: 16;
  pointer-events: none;
  animation: scanLine 1.5s ease-in-out infinite;
}

#cam-species-label.level-up-pulse {
  animation: labelGlow 0.5s ease-out;
  box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.6), 0 0 0 14px rgba(212, 175, 55, 0.3), 0 0 40px rgba(255, 220, 100, 0.5);
}

@keyframes labelGlow {
  0% {
    box-shadow: 0 0 0 0px rgba(212, 175, 55, 0.9), 0 0 0 0px rgba(212, 175, 55, 0.5), 0 0 10px rgba(255, 220, 100, 0.3);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(212, 175, 55, 0.4), 0 0 0 24px rgba(212, 175, 55, 0.1), 0 0 60px rgba(255, 220, 100, 0.7);
  }

  100% {
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.6), 0 0 0 14px rgba(212, 175, 55, 0.3), 0 0 40px rgba(255, 220, 100, 0.5);
  }
}

@media (prefers-reduced-motion: reduce) {

  #camera-overlay.cam-scanning::before,
  #camera-overlay.cam-scanning::after,
  #cam-fx-canvas {
    animation: none !important;
    display: none !important;
  }

  #cam-species-label.level-up-pulse {
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.6) !important;
    animation: none !important;
  }
}

.cam-taxonomy-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 44px;
  padding: 4px 2px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.15);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.4);
  transition: all 300ms ease-out;
}

.cam-taxonomy-dot span {
  font-size: 7px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: inherit;
}

.cam-taxonomy-dot.active {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.2);
  color: #d4af37;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.cam-taxonomy-dot.dim {
  opacity: 0.3;
}

/* Method Tabs (Game UI) */
.method-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.method-tab {
  flex: 1;
  max-width: 160px;
  min-height: 56px;
  padding: 8px 12px;
  border: 2px solid var(--panel-border);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  color: var(--text-secondary);
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 200ms ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.method-tab .method-tab-icon {
  font-size: 20px;
}

.method-tab .method-tab-label {
  font-size: 12px;
}

.method-tab:hover {
  border-color: var(--gold-dark);
  transform: translateY(-2px);
}

.method-tab.active {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  color: var(--gold-light);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

/* Upload Area */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
  padding: 20px 0;
}

.upload-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 200ms ease-out;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  /* animation: uploadPulse 2s ease-in-out infinite; */
}

.upload-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: var(--gold-light);
}

.upload-btn:active {
  transform: scale(0.95);
}

.upload-btn-icon {
  font-size: 48px;
  /* filter: drop-shadow(0 0 8px rgba(212,175,55,0.5)); */
}

.upload-btn-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.photo-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.photo-picker-overlay.active {
  display: flex;
}

.photo-picker-overlay.hidden {
  display: none;
}

.photo-picker-sheet {
  background: var(--bg2);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 33vh;
  padding: 12px 16px 24px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes photoSheetUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.photo-picker-handle {
  width: 36px;
  height: 4px;
  background: var(--text-secondary);
  border-radius: 2px;
  margin: 0 auto 16px;
  opacity: 0.4;
}

.photo-picker-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.photo-picker-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.photo-picker-option:active {
  background: var(--bg-tertiary);
}

.photo-picker-icon {
  font-size: 28px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 12px;
}

.photo-picker-label {
  font-size: 16px;
  font-weight: 500;
}

.photo-picker-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.photo-picker-cancel {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-secondary);
  margin-top: 8px;
}

@keyframes uploadPulse {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  50% {
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

.upload-hint {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Taxonomy Tree */
.taxonomy-tree {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  text-align: left;
}

.taxonomy-item {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid rgba(42, 58, 46, 0.5);
  font-size: 12px;
}

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

.taxonomy-label {
  color: var(--text-secondary);
}

.taxonomy-value {
  color: var(--text);
  font-weight: 500;
}

/* iNaturalist Gallery */
.inat-section {
  margin: 12px 0;
}

.inat-section-title {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inat-gallery {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 16px 8px 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.inat-gallery::-webkit-scrollbar {
  display: none;
}

.inat-thumb {
  flex: 0 0 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 150ms;
  border: 1px solid var(--panel-border);
  background: var(--bg2);
}

.inat-thumb:active {
  transform: scale(0.95);
}

.inat-description {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  padding: 12px;
  background: var(--panel);
  border-radius: 10px;
  border: 1px solid var(--panel-border);
}

.inat-description a {
  color: var(--gold);
  text-decoration: none;
}

.inat-loader {
  text-align: center;
  padding: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Species search */
#species-search-results {
  max-height: 400px;
  overflow-y: auto;
}

.species-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background 150ms;
}

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

.species-search-item:hover {
  background: var(--panel2);
}

.species-search-item:active {
  background: var(--panel);
}

.species-search-photo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg2);
  border: 1px solid var(--panel-border);
}

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

.species-search-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.species-search-latin {
  font-size: 12px;
  font-style: italic;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lightbox Slider */
.inat-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 10000;
  display: none;
  flex-direction: column;
}

.inat-lightbox.active {
  display: flex;
}

.inat-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 10002;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.inat-lb-slider {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.inat-lb-track {
  display: flex;
  height: 100%;
  transition: transform 250ms ease-out;
  will-change: transform;
}

.inat-lb-track.no-transition {
  transition: none;
}

.inat-lb-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

.inat-lb-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
}

.inat-lb-counter {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 4px;
}

.inat-lb-attr {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  max-width: 80vw;
  margin: 0 auto;
}

/* Result image - fills container with rarity border */
/* #result-image-container {
      display: inline-block;
      line-height: 0;
      position: relative;
      border-radius: 16px;
    } */

/* #result-image-container img {
      width: 100%;
      max-width: 100%;
      max-height: 35vh;
      border-radius: 12px;
      display: block;
      object-fit: contain;
    } */

/* Scanning animation */
#result-image-container.scanning::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  border: 2px solid var(--gold);
  z-index: 5;
  pointer-events: none;
  animation: scanBorder 1.5s ease-in-out infinite;
}

@keyframes scanBorder {

  0%,
  100% {
    opacity: 0.3;
    box-shadow: 0 0 6px var(--gold);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 16px var(--gold), 0 0 32px rgba(212, 175, 55, 0.3);
  }
}

#result-image-container.scanning::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  box-shadow: 0 0 8px var(--gold), 0 0 20px rgba(212, 175, 55, 0.4);
  z-index: 6;
  pointer-events: none;
  animation: scanLine 1.5s ease-in-out infinite;
  border-radius: 1px;
}

@keyframes scanLine {

  0%,
  100% {
    top: 0;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    top: calc(100% - 2px);
    opacity: 0;
  }
}

.loading-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  position: relative;
}

.loading-spinner::before,
.loading-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 3px solid transparent;
}

.loading-spinner::before {
  inset: 0;
  border-top-color: var(--gold);
  border-right-color: rgba(212, 175, 55, 0.15);
  animation: spinnerRotate 0.8s linear infinite;
}

.loading-spinner::after {
  inset: 8px;
  border-bottom-color: var(--uncommon);
  border-left-color: rgba(76, 175, 80, 0.15);
  animation: spinnerRotate 0.6s linear infinite reverse;
}

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

.loading-text {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  animation: textPulse 1.4s ease-in-out infinite;
}

@keyframes textPulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Result badges */
.result-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

.result-badge-category {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-dark);
  color: var(--gold-light);
}

.result-badge-rarity-common {
  background: rgba(158, 158, 158, 0.15);
  border-color: var(--common);
  color: var(--common);
}

.result-badge-rarity-uncommon {
  background: rgba(76, 175, 80, 0.15);
  border-color: var(--uncommon);
  color: var(--uncommon);
}

.result-badge-rarity-rare {
  background: rgba(33, 150, 243, 0.15);
  border-color: var(--rare);
  color: var(--rare);
}

.result-badge-rarity-epic {
  background: rgba(156, 39, 176, 0.15);
  border-color: var(--epic);
  color: var(--epic);
}

.result-badge-rarity-legendary {
  background: rgba(255, 152, 0, 0.15);
  border-color: var(--legendary);
  color: var(--legendary);
}

.result-badge-observers {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.result-confidence-high {
  color: #4caf50;
  font-weight: 700;
}

.result-confidence-mid {
  color: #ff9800;
  font-weight: 700;
}

.result-confidence-low {
  color: #f44336;
  font-weight: 700;
}

/* Screen layouts */
.hidden {
  display: none !important;
}

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

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.flex {
  display: flex;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

.gap-8 {
  gap: 8px;
}

.mt-8 {
  margin-top: 8px;
}

/* Collection Detail Modal */
.detail-card {
  width: 100%;
  min-width: 100%;
  padding: 0px;
  overflow: hidden;
  height: 89vh;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
}

.result-detail-card {
  height: 89vh;
  overflow-y: auto;
}

.result-detail-card.result-scanning {
  height: 91vh;
  overflow: hidden;
}

.result-detail-card.result-scanning .detail-image-container {
  height: 91vh;
  position: relative;
}

.result-detail-card.result-scanning .detail-image-container img {
  height: 91vh;
}

#result-image-container.scanning #result-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 7;
  background: rgba(0, 0, 0, 0.25);
}

.result-detail-card.result-scanning .detail-info {
  display: none;
}

#screen-result {
  padding: 8px;
  overflow: hidden;
}

.detail-image-container {
  flex-shrink: 0;
  /* max-height: 75vh; */
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1;
}

.detail-image-container img {
  width: 100%;
  height: 62vh;
  object-fit: cover;
  border-radius: 0px;
  display: block;
  cursor: zoom-in;
}

.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  visibility: hidden;
  opacity: 0;
  transition: opacity 200ms ease-out, visibility 200ms ease-out;
}

.fullscreen-overlay.active {
  visibility: visible;
  opacity: 1;
  cursor: zoom-out;
}

.fullscreen-overlay img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.25s ease-out;
  cursor: zoom-in;
}

.frozen {
  filter: grayscale(0.6) brightness(1.1) saturate(0.5);
  pointer-events: none;
  opacity: 0.6;
  position: relative;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.frozen::after {
  content: '❄️';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  z-index: 10;
  pointer-events: none;
}

.frozen-timer {
  display: none;
  text-align: center;
  color: #88c8e8;
  font-size: 13px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  margin: 8px auto;
  max-width: 280px;
}

.frozen-timer.visible {
  display: block;
}

.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}

.like-btn .paw-icon {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
  overflow: visible;
}

.like-btn .paw-part {
  fill: var(--color-unliked);
  transition: fill 0.3s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  stroke: #ffffff;
  stroke-width: 70px;
  stroke-linejoin: round;
  filter: drop-shadow(10px 10px 22px rgba(15, 23, 42, 1)) drop-shadow(10px 15px 20px rgba(15, 23, 42, 1));

  transition:
    fill 0.3s ease,
    stroke 0.3s ease,
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    filter 0.3s ease;

  transform-origin: center;
}

.like-btn:hover .paw-part {
  fill: #545454;
}

.like-btn.is-liked .paw-part {
  fill: var(--color-liked);
  filter: drop-shadow(0 0 8px rgba(255, 71, 87, 0.6));
  filter: drop-shadow(10px 10px 22px rgba(15, 23, 42, 1)) drop-shadow(10px 15px 20px rgba(15, 23, 42, 1));

}

.like-btn.animate .paw-icon {
  animation: jiggle 0.45s ease-in-out;
}

.like-btn.animate .finger-1 {
  transform: translate(-25px, -25px) scale(1.08);
}

.like-btn.animate .finger-2 {
  transform: translate(-40px, 12px) scale(1.08);
}

.like-btn.animate .finger-3 {
  transform: translate(25px, -25px) scale(1.08);
}

.like-btn.animate .finger-4 {
  transform: translate(40px, 12px) scale(1.08);
}

.like-btn.animate .pad-main {
  transform: scale(0.92);
}

@keyframes jiggle {
  0% {
    transform: scale(1);
  }

  25% {
    transform: scale(0.75) rotate(-8deg);
  }

  50% {
    transform: scale(1.25) rotate(6deg);
  }

  75% {
    transform: scale(0.92) rotate(-3deg);
  }

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

svg.paw-stat-icon {
  width: 14px;
  color: #545454;
  stroke: #e1e1e1;
  stroke-width: 120px;
  stroke-linejoin: round;
}

.like-btn .particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.like-btn .particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 16px;
  border-radius: 4px;
  opacity: 0;
  transform-origin: center;
}

.like-btn .particle.pop {
  animation: burst 0.55s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes burst {
  0% {
    transform: translate(-50%, -50%) rotate(var(--rotate)) translate(0, 0) scaleY(0.3);
    opacity: 1;
  }

  50% {
    transform: translate(-50%, -50%) rotate(var(--rotate)) translate(0, calc(var(--distance) * -0.6)) scaleY(1.5);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) rotate(var(--rotate)) translate(0, var(--distance)) scaleY(0);
    opacity: 0;
  }
}

.detail-info {
  padding: 15px;
  overflow-y: visible;
  flex: 1;
  /* min-height: 0; */
  display: flex;
  flex-direction: column;

  position: relative;
  z-index: 2;
  background: var(--bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding-top: 20px;
  margin-bottom: 15px;
}

.detail-name {
  font-size: 22px;
  font-weight: bold;
  color: var(--gold);
  text-align: center;
  /* margin-bottom: 12px; */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.detail-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-rarity-badge {
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-category {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.detail-category:hover {
  background: var(--panel-hover, rgba(255, 255, 255, 0.08));
}

.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}

.category-picker .cat-opt {
  background: #383838;
  border: 1px solid #696969;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s, border-color 0.15s;
}

.category-picker .cat-opt:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.detail-stat {
  background: var(--panel);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.detail-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.detail-stat-value {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: var(--gold);
}

.detail-xp {
  text-align: center;
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 16px;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.popup-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(0 0 0 / 60%);
  border: 1px solid #acacac;
  color: var(--text-secondary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 150ms ease-out;
}

.popup-close:hover {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border-color: #f44336;
}

.popup-delete {
  width: auto;
  align-self: flex-start;
  border-color: #f44336;
  color: #f44336;
  background: rgba(244, 67, 54, 0.08);
  font-size: 17px;
  padding: 0;
  margin-top: 12px;
  border-radius: 8px;
}

.popup-delete:hover {
  background: rgba(244, 67, 54, 0.2);
}

/* PC Horizontal Split Layout */
@media (min-width: 768px) {
  .detail-card {
    width: 100vw;
    height: 100vh;
    max-width: none;
    flex-direction: row;
    align-items: stretch;
    border-radius: 0;
  }

  .detail-image-container {
    flex: 1.2;
    padding: 0;
    min-height: 400px;
  }

  .detail-image-container img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    border-radius: 0;
  }

  .detail-image-container::after {
    display: none;
  }

  .detail-info {
    flex: 1;
    padding: 32px;
    justify-content: center;
    min-width: 320px;
  }

  .detail-name {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .detail-meta {
    margin-bottom: 24px;
    gap: 16px;
  }

  .detail-rarity-badge,
  .detail-category {
    font-size: 16px;
    padding: 8px 20px;
  }

  .detail-stats {
    margin-bottom: 24px;
    gap: 16px;
  }

  .detail-stat {
    padding: 16px;
  }

  .detail-stat-label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .detail-stat-value {
    font-size: 22px;
  }

  .detail-xp {
    margin-bottom: 24px;
    font-size: 24px;
  }
}

/* Rarity Colors for Detail Modal */
.rarity-common .detail-rarity-badge {
  background: rgba(158, 158, 158, 0.2);
  color: var(--common);
  border: 1px solid var(--common);
}

.rarity-uncommon .detail-rarity-badge {
  background: rgba(76, 175, 80, 0.2);
  color: var(--uncommon);
  border: 1px solid var(--uncommon);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
}

.rarity-rare .detail-rarity-badge {
  background: rgba(33, 150, 243, 0.2);
  color: var(--rare);
  border: 1px solid var(--rare);
  box-shadow: 0 0 12px rgba(33, 150, 243, 0.3);
}

.rarity-epic .detail-rarity-badge {
  background: rgba(156, 39, 176, 0.2);
  color: var(--epic);
  border: 1px solid var(--epic);
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.4);
}

.rarity-legendary .detail-rarity-badge {
  background: rgba(255, 152, 0, 0.2);
  color: var(--legendary);
  border: 1px solid var(--legendary);
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
}

/* Premium hover effects for collection cards */
.collection-card {
  cursor: pointer;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

/* .collection-card:hover {
      transform: translateY(-4px) scale(1.02);
    } */
.collection-card.rarity-common:hover {
  box-shadow: 0 8px 16px rgba(158, 158, 158, 0.3);
}

.collection-card.rarity-uncommon:hover {
  box-shadow: 0 8px 16px rgba(76, 175, 80, 0.4);
}

.collection-card.rarity-rare:hover {
  box-shadow: 0 8px 16px rgba(33, 150, 243, 0.4);
}

.collection-card.rarity-epic:hover {
  box-shadow: 0 8px 24px rgba(156, 39, 176, 0.5);
}

.collection-card.rarity-legendary:hover {
  box-shadow: 0 8px 32px rgba(255, 152, 0, 0.6);
}

/* Particle effect for legendary items */
@keyframes particleFloat {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(-40px) rotate(360deg);
    opacity: 0;
  }
}

.legendary-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 12px;
}

.legendary-particles::before,
.legendary-particles::after {
  content: '✦';
  position: absolute;
  font-size: 12px;
  color: var(--legendary);
  animation: particleFloat 2s ease-out infinite;
}

.legendary-particles::before {
  left: 20%;
  top: 80%;
  animation-delay: 0s;
}

.legendary-particles::after {
  right: 20%;
  top: 60%;
  animation-delay: 1s;
}

/* Screen transitions */
.screen {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.screen.active {
  opacity: 1;
  transform: translateX(0);
}

/* Confetti / Particle Burst */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confettiFall 2s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Floating XP Text */
.float-xp {
  position: fixed;
  font-size: 24px;
  font-weight: bold;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  pointer-events: none;
  z-index: 250;
  animation: floatUp 1.5s ease-out forwards;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  50% {
    transform: translateY(-60px) scale(1.2);
    opacity: 1;
  }

  100% {
    transform: translateY(-120px) scale(0.8);
    opacity: 0;
  }
}

/* Shine Effect for Epic/Legendary */
@keyframes shine {
  0% {
    left: -100%;
  }

  100% {
    left: 200%;
  }
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 3s ease-in-out infinite;
}

/* Card Flip Effect */
.collection-card {
  perspective: 1000px;
  transform-style: preserve-3d;
  display: grid;
  vertical-align: middle;
}

.collection-card:hover .card-inner {
  transform: rotateY(5deg);
}

.card-inner {
  transition: transform 300ms ease-out;
  transform-style: preserve-3d;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  animation: toastSlide 300ms ease-out, toastFade 300ms ease-in 2.7s forwards;
  max-width: 90vw;
  text-align: center;
  pointer-events: auto;
}

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

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

@keyframes toastFade {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Pulsing Glow for Rare+ */
@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 8px currentColor;
  }

  50% {
    box-shadow: 0 0 20px currentColor;
  }
}

.collection-card.rarity-rare {
  animation: pulseGlow 2s ease-in-out infinite;
  animation-play-state: paused;
}

.collection-card.rarity-rare:hover {
  animation-play-state: running;
}

.collection-card.rarity-epic {
  animation: pulseGlow 1.5s ease-in-out infinite;
  animation-play-state: paused;
}

.collection-card.rarity-epic:hover {
  animation-play-state: running;
}

.collection-card.rarity-legendary {
  animation: pulseGlow 1s ease-in-out infinite;
}

/* Level Up Burst */
.level-up-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 350;
}

.level-up-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: levelRing 1s ease-out forwards;
}

@keyframes levelRing {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(5);
    opacity: 0;
  }
}

/* Scan Line Effect */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: scanMove 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scanMove {

  0%,
  100% {
    top: 0;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

/* New Find Badge */
.new-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--gold), #ff9800);
  color: #000;
  font-size: 10px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 8px;
  animation: newBadgePulse 1s ease-in-out infinite;
  z-index: 10;
}

@keyframes newBadgePulse {

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

  50% {
    transform: scale(1.1);
  }
}

/* Rarity Glow on Result Image */
.rarity-glow-container {
  position: relative;
  display: inline-block;
}

.rarity-glow-container::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  z-index: -1;
  opacity: 0.6;
  animation: glowPulse 2s ease-in-out infinite;
}

.rarity-glow-container.rarity-common::before {
  background: var(--common);
}

.rarity-glow-container.rarity-uncommon::before {
  background: var(--uncommon);
}

.rarity-glow-container.rarity-rare::before {
  background: var(--rare);
}

.rarity-glow-container.rarity-epic::before {
  background: var(--epic);
}

.rarity-glow-container.rarity-legendary::before {
  background: var(--legendary);
  animation: glowPulse 1s ease-in-out infinite;
}

@keyframes glowPulse {

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

  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

#auth-screen .title {
  line-height: 44px;
  height: 44px;
}

/* === QUESTS === */
.quest-month-title {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.quest-month-title:hover {
  color: #f0d060;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.quest-month-title:active {
  transform: scale(0.98);
}

.quest-month-title.refreshing {
  opacity: 0.5;
  pointer-events: none;
}

.quest-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 16px;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  margin-bottom: 12px;
  gap: 12px;
}

.quest-meta .quest-timer,
.quest-meta .quest-location {
  white-space: nowrap;
}

.quest-location {
  cursor: pointer;
}

.quest-location:hover {
  text-decoration: underline dotted;
}

.quest-location.updating {
  opacity: 0.6;
  cursor: wait;
}

.quest-progress-overall {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding: 12px;
  background: var(--panel);
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.quest-progress-overall .prog-text {
  float: right;
  color: var(--gold);
  font-weight: 600;
  font-family: var(--font-heading);
}

.quest-progress-overall .xp-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.quest-progress-overall .xp-bar .xp-fill {
  background: linear-gradient(90deg, var(--gold), #f0d060);
  border-radius: 3px;
  transition: width 0.4s ease-out;
}

.quest-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.quest-filter .filter-tab {
  font-size: 12px;
  padding: 8px 22px;
  border-radius: 20px;
  flex: 0 1 auto;
  min-width: 110px;
  text-align: center;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 200ms ease;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.quest-filter .filter-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.quest-filter .filter-tab:hover::before {
  opacity: 1;
}

.quest-filter .filter-tab:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

.quest-filter .filter-tab.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.quest-card {
  background: var(--panel);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
  cursor: pointer;
  user-select: none;
}

.quest-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.quest-card:hover::before {
  opacity: 1;
}

.quest-card:active {
  transform: scale(0.98);
}

.quest-card.expanded {
  background: linear-gradient(135deg, var(--panel), var(--panel2));
}

@keyframes questCardExpand {
  from {
    max-height: 120px;
  }

  to {
    max-height: 800px;
  }
}

.quest-card.expanded {
  animation: questCardExpand 0.3s ease-out;
}

.quest-card .qc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.quest-card .qc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  line-height: 1.3;
  font-family: var(--font-heading);
}

.quest-card .qc-xp {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  margin-left: 8px;
  padding: 2px 10px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  font-family: var(--font-heading);
}

.quest-card .qc-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.quest-card .qc-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-card .qc-progress .xp-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.quest-card .qc-progress .xp-fill {
  border-radius: 4px;
  transition: width 300ms ease-out;
  position: relative;
}

.quest-card .qc-progress .xp-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 4px 4px 0 0;
}

.quest-card .qc-progress .qc-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  font-family: var(--font-heading);
}

.quest-card .qc-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  margin-top: 8px;
}

.quest-card .qc-badge.completed {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.quest-card .qc-badge.active {
  background: rgba(33, 150, 243, 0.15);
  color: var(--rare);
  border: 1px solid rgba(33, 150, 243, 0.3);
}

/* Rarity-based quest card borders — Game UI */
.quest-card.q-common {
  border-left: 3px solid var(--common);
}

.quest-card.q-common::before {
  background: linear-gradient(90deg, var(--common), transparent);
}

.quest-card.q-uncommon {
  border-left: 3px solid var(--uncommon);
}

.quest-card.q-uncommon::before {
  background: linear-gradient(90deg, var(--uncommon), transparent);
}

.quest-card.q-rare {
  border-left: 3px solid var(--rare);
}

.quest-card.q-rare::before {
  background: linear-gradient(90deg, var(--rare), transparent);
}

.quest-card.q-epic {
  border-left: 3px solid var(--epic);
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.15);
}

.quest-card.q-epic::before {
  background: linear-gradient(90deg, var(--epic), transparent);
}

.quest-card.q-legendary {
  border-left: 3px solid var(--legendary);
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.15);
}

.quest-card.q-legendary::before {
  background: linear-gradient(90deg, var(--legendary), transparent);
  animation: legendaryGlow 2s ease-in-out infinite;
}

@keyframes legendaryGlow {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.quest-card.q-common .xp-fill {
  background: linear-gradient(90deg, var(--common), #bdbdbd);
}

.quest-card.q-uncommon .xp-fill {
  background: linear-gradient(90deg, var(--uncommon), #66bb6a);
}

.quest-card.q-rare .xp-fill {
  background: linear-gradient(90deg, var(--rare), #42a5f5);
}

.quest-card.q-epic .xp-fill {
  background: linear-gradient(90deg, var(--epic), #ab47bc);
}

.quest-card.q-legendary .xp-fill {
  background: linear-gradient(90deg, var(--legendary), #ffa726);
}

/* Quest camera button */
.quest-card .qc-camera-btn {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 4px;
}

.quest-card .qc-camera-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  transform: scale(1.05);
}

/* Quest complete button */
.quest-card .qc-complete-btn {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #4caf50;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: auto;
}

.quest-card .qc-complete-btn:hover {
  background: rgba(76, 175, 80, 0.3);
  transform: scale(1.03);
}

.quest-card .qc-complete-btn:active {
  transform: scale(0.95);
}

.quest-card .qc-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  gap: 6px;
}

.quest-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.quest-card .qc-camera-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-size: 17px;
  cursor: pointer;
  transition: transform 200ms, background 200ms;
  flex-shrink: 0;
  margin-left: 6px;
}

.quest-card .qc-camera-btn:hover {
  transform: scale(1.1);
  background: rgba(212, 175, 55, 0.2);
}

.quest-card .qc-camera-btn:active {
  transform: scale(0.92);
}

/* Quest photo horizontal gallery (like inat-gallery) */
.quest-card .qc-photo {
  margin-top: 12px;
  display: none;
  overflow-x: auto;
  gap: 8px;
  padding: 4px 4px 12px 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.quest-card .qc-photo::-webkit-scrollbar {
  display: none;
}

.quest-card.expanded .qc-photo {
  display: flex;
}

.quest-card .qc-photo img {
  flex: 0 0 160px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--panel-border);
  background: var(--bg2);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 150ms;
}

.quest-card .qc-photo img:active {
  transform: scale(0.95);
}

.quest-card .qc-photo .qc-photo-loader {
  flex: 0 0 100%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 16px 0;
}

.quest-card .qc-badge.in-collection {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.quest-card .qc-complete-btn {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #4caf50;
  cursor: pointer;
  margin-top: 8px;
  margin-left: 8px;
  transition: background 200ms, transform 200ms;
}

.quest-card .qc-complete-btn:hover {
  background: rgba(76, 175, 80, 0.3);
  transform: scale(1.03);
}

.quest-card .qc-complete-btn:active {
  transform: scale(0.95);
}

.quest-card .qc-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.quest-card .qc-targets {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.quest-card .qc-targets-title {
  font-size: 12px;
  color: var(--gold, #d4af37);
  margin-bottom: 6px;
  font-weight: 600;
}

.quest-card .qc-target {
  font-size: 12px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  text-decoration: none;
  position: relative;
}

.quest-card .qc-target.found {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.08);
}

.quest-card .qc-target.found::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #4caf50;
  border-radius: 2px;
}

.quest-card .qc-target.found:hover {
  background: rgba(76, 175, 80, 0.15);
}

.quest-card .qc-target.pending {
  color: #ccc;
  border-bottom: 1px dotted rgba(204, 204, 204, 0.4);
}

.quest-card .qc-target.pending:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-bottom-color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.quest-card .qc-target .qc-target-latin {
  font-style: italic;
  color: #888;
  font-size: 11px;
}

.quest-card .qc-target.pending .qc-target-latin {
  color: #666;
}

/* === QUEST PHOTO LIGHTBOX - translateX SLIDER === */
.quest-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 500;
  display: none;
  flex-direction: column;
}

.quest-lightbox.open {
  display: flex;
}

.quest-lightbox .ql-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms;
}

.quest-lightbox .ql-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.quest-lightbox .ql-slider {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.quest-lightbox .ql-track {
  display: flex;
  height: 100%;
  transition: transform 250ms ease-out;
  will-change: transform;
}

.quest-lightbox .ql-track.no-transition {
  transition: none;
}

.quest-lightbox .ql-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

.quest-lightbox .ql-slide .ql-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
}

.quest-lightbox .ql-info {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 20px;
  pointer-events: none;
  z-index: 10;
}

.quest-lightbox .ql-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-lightbox .ql-counter {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 4px;
}

.quest-lightbox .ql-attr {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  max-width: 80vw;
  margin: 0 auto;
}

.quest-reward-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.95), rgba(255, 152, 0, 0.95));
  color: #000;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  z-index: 400;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: questRewardIn 400ms ease-out;
  pointer-events: none;
}

@keyframes questRewardIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.8);
  }

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

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Ачивки === */
.achievement-card {
  background: var(--panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievement-card.completed {
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
}

.achievement-icon {
  font-size: 24px;
  flex-shrink: 0;
}

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

.achievement-title {
  font-size: 14px;
  font-weight: 600;
}

.achievement-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.achievement-progress {
  width: 100%;
  margin-top: 6px;
}

.achievement-progress .xp-bar {
  height: 4px;
}

.achievement-reward {
  font-size: 12px;
  color: var(--gold);
  flex-shrink: 0;
  text-align: right;
}

.achievement-completed-badge {
  font-size: 20px;
  flex-shrink: 0;
}

/* ===== Inline style refactoring utilities ===== */
/* Spacing */
.p-8 {
  padding: 8px;
}

.p-10 {
  padding: 10px;
}

.p-12 {
  padding: 12px;
}

.p-16 {
  padding: 16px;
}

.p-20 {
  padding: 20px;
}

.mb-4 {
  margin-bottom: 4px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.d-none {
  display: none;
}

/* Typography */
.fs-11 {
  font-size: 11px;
}

.fs-12 {
  font-size: 12px;
}

.fs-13 {
  font-size: 13px;
}

.fs-14 {
  font-size: 14px;
}

.fs-15 {
  font-size: 15px;
}

.fs-16 {
  font-size: 16px;
}

.fs-18 {
  font-size: 18px;
}

.fs-20 {
  font-size: 20px;
}

.fs-24 {
  font-size: 24px;
}

.fs-28 {
  font-size: 28px;
}

.fs-32 {
  font-size: 32px;
}

.fs-36 {
  font-size: 36px;
}

.fw-bold {
  font-weight: bold;
}

.italic {
  font-style: italic;
}

/* Colors */
.text-secondary {
  color: var(--text-secondary);
}

.text-gold {
  color: var(--gold);
}

.text-white {
  color: #fff;
}

.text-error {
  color: #f44336;
}

/* Layout */
.w-100 {
  width: 100%;
}

.flex-1 {
  flex: 1;
}

.tc {
  text-align: center;
}

.tr {
  text-align: right;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-gap-8 {
  display: flex;
  gap: 8px;
}

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

.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.mx-auto {
  margin: 0 auto;
}

.object-contain {
  object-fit: contain;
}

.pos-relative {
  position: relative;
}

.br-8 {
  border-radius: 8px;
}

.br-12 {
  border-radius: 12px;
}

.br-16 {
  border-radius: 16px;
}

.cursor-pointer {
  cursor: pointer;
}

#btn-change-cancel,
#btn-change-apply {
  font-size: 16px;
}

/* Component classes */
.auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.auth-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.auth-input-last {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.input-field {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg2);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  cursor: pointer;
}

.panel-card {
  background: var(--panel);
  padding: 20px;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  border-radius: 0;
}

.fullscreen-overlay .panel-card {
  position: relative;
}

.species-popup {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--bg);
  overflow-y: auto;
}

.close-btn-abs {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  z-index: 21;
}

.sentinel {
  grid-column: 1 / -1;
  height: 0;
}

.photo-card-sm {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--panel-border);
}

.photo-card-sm.legendary {
  border-color: #ff9800;
}

/* Camera overlay component */
.camera-overlay-fixed {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #000;
  flex-direction: column;
}

.cam-capture-btn {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  z-index: 10;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.3s;
}

.cam-capture-btn:active {
  transform: translateX(-50%) scale(0.95);
}

.cam-capture-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cam-capture-btn svg {
  width: 100%;
  height: 100%;
}

.cam-detail-btn-custom {
  padding: 12px 24px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.2);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.5);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.cam-detail-btn-custom:hover {
  background: rgba(212, 175, 55, 0.3);
  border-color: rgba(212, 175, 55, 0.7);
}

.cam-detail-btn-custom:active {
  background: rgba(212, 175, 55, 0.4);
}

.cam-detail-add-btn {
  width: 100%;
  margin-bottom: 16px;
  padding: 12px 24px;
  border-radius: 12px;
  background: rgba(76, 175, 80, 0.2);
  color: #fff;
  border: 1px solid rgba(76, 175, 80, 0.6);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s;
}

.cam-detail-add-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.cam-detail-add-btn:not(:disabled):hover {
  background: rgba(76, 175, 80, 0.3);
}

.cam-focus-indicator {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.5);
}

.cam-focus-indicator.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: focusPulse 1s ease-out forwards;
}

@keyframes focusPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

.cam-btn-bar {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  z-index: 10;
}

.cam-side-btn.cam-add-btn {
  position: absolute;
  left: 20px;
}

.cam-side-btn.cam-detail-btn-vis {
  position: absolute;
  right: 20px;
}

.cam-side-btn {
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s, background 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

.cam-side-btn:active {
  background: rgba(212, 175, 55, 0.3);
}

.cam-side-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.cam-detail-btn-vis {
}

.cam-detail-padding {
  padding: 8px;
  box-sizing: border-box;
  height: 100%;
}

.cam-detail-card {
  background: var(--bg2);
  border: 2px solid var(--gold-dark);
  border-radius: 15px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.cam-detail-card .detail-image-container {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1;
}

.cam-detail-card .detail-image-container img {
  width: 100%;
  height: 62vh;
  object-fit: cover;
  display: block;
}

.cam-detail-card .detail-info {
  flex: 1;
  padding: 20px 15px 15px;
  background: var(--bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* Padding/margin utilities */
.p-8-12 {
  padding: 8px 12px;
}

.p-0-0-8 {
  padding: 0 0 8px 0;
}

.p-10-24 {
  padding: 10px 24px;
}

.p-40 {
  padding: 40px;
}

.mb-23 {
  margin-bottom: 23px;
}

/* Background utilities */
.panel {
  background: var(--panel);
}

.bg-primary {
  background: var(--bg-primary);
}

.bg-input {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
}

.bg-orange-border {
  background: var(--panel);
  border: 2px solid #ff9800;
  border-radius: 12px;
}

.warning-bg {
  background: rgba(255, 193, 7, 0.1);
}

/* Text utilities */
.text-warning {
  color: var(--text-warning);
}

/* Size utilities */
.max-h-300 {
  max-height: 300px;
}

.vh-80 {
  height: 80vh;
}

.ov-y-auto {
  overflow-y: auto;
}

.notif-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  /* padding: 12px 12px 0; */
}

.notif-header-bar .title {
  margin-bottom: 0;
}

#screen-notifications {
  padding-bottom: 12px;
  max-height: 91vh;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  margin-bottom: 8px;
  background: var(--panel);
  cursor: pointer;
  gap: 12px;
  transition: background 0.2s;
}

.notif-item:active {
  background: var(--panel-hover);
}

.notif-item.unread {
  background: rgba(255, 215, 0, 0.12);
}

.notif-left {
  flex-shrink: 0;
}

.notif-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--bg);
}

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

.notif-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.notif-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.notif-text {
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.paw-notif-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
}

.notif-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  width: 250px;
}

.notif-thumb.rarity-common { border: 2px solid var(--common); }
.notif-thumb.rarity-uncommon { border: 2px solid var(--uncommon); }
.notif-thumb.rarity-rare { border: 2px solid var(--rare); }
.notif-thumb.rarity-epic { border: 2px solid var(--epic); }
.notif-thumb.rarity-legendary { border: 2px solid var(--legendary); }

.notif-thumb.rarity-common + .notif-species { color: var(--common); }
.notif-thumb.rarity-uncommon + .notif-species { color: var(--uncommon); }
.notif-thumb.rarity-rare + .notif-species { color: var(--rare); }
.notif-thumb.rarity-epic + .notif-species { color: var(--epic); }
.notif-thumb.rarity-legendary + .notif-species { color: var(--legendary); }

.notif-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}

.notif-species {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-time {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-sentinel {
  height: 1px;
}

.notif-item.slide-out {
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

button#btn-clear-notifs {
  min-height: 38px;
}

.profile-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

#btn-profile-settings {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 8px;
  transition: background 0.15s;
}

#btn-profile-settings:active {
  background: var(--panel-hover);
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--panel);
}

.settings-item-sub {
  padding: 10px 0 10px 24px;
  border-bottom: none;
}

.settings-item-sub:not(:last-of-type) {
  border-bottom: 1px solid var(--panel);
}

.settings-label {
  font-size: 14px;
  font-weight: 500;
}

.push-types {
  margin-top: 4px;
  margin-bottom: 8px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--panel);
  border-radius: 24px;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--gold);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}