*{box-sizing:border-box}

:root{
  --bg:#e9edf4;
  --panel:#eef1f7;
  --card:#f5f6fa;
  --soft:#e2e7f0;
  --border:#c6cfdf;
  --text:#111a32;
  --muted:#50658c;
  --purple:#8d7cff;
  --blue:#5865f2;
  --pink:#ff668c;
  --dark:#2d1731;
  --input:#f6f7fa;
  --shadow:0 10px 28px rgba(39,55,91,.08);
  --hover-shadow:0 16px 36px rgba(39,55,91,.16)
}

/* *{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}
*/

*{
  font-family:'Nunito',sans-serif
}

html{
  scroll-behavior:smooth
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  transition:background .25s,color .25s
}

body {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
}

button,select,input{
  font:inherit
}

button{
  cursor:pointer
}

.page{
  max-width:1340px;
  margin:auto;
  padding:22px 24px 35px
}

.topbar{
  min-height:90px;
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(135deg,#edf0f6,#e6eaf2);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:17px 24px;
  box-shadow:var(--shadow);
  transition:.25s
}

.brand{
  display:inline-block;
  font-size:2rem;
  font-weight:900;
  background:linear-gradient(135deg,#b388ff,#82b1ff);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  letter-spacing:-0.5px;
}

  background:linear-gradient(
    135deg,
    #b388ff,
    #82b1ff
  );

  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.brand span{
  margin-left:5px
}

.subtitle{
  font-size:13px;
  color:#35517f;
  margin-top:7px;
  font-weight:650
}

.top-actions{
  display:flex;
  align-items:center;
  gap:15px;
  font-size:13px;
  color:#30486e;
  font-weight:650
}

.rank{
  background:#dce2ee;
  border-radius:20px;
  padding:8px 13px
}

.theme-toggle{
  border:0;
  width:42px;
  height:24px;
  border-radius:20px;
  background:#cbd3e2;
  padding:3px;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)
}

.theme-toggle span{
  display:block;
  width:18px;
  height:18px;
  background:#151b30;
  border-radius:50%;
  transition:transform .22s ease,background .22s
}

.theme-toggle[aria-pressed=true] span{
  transform:translateX(18px)
}


.discord-banner {
  min-height: 64px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-family: "Nunito", sans-serif;
}

.discord-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.discord-icon {
  width: 34px;
  height: 34px;
  flex: none;
  object-fit: contain;
}

.discord-left b {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
}

.discord-banner button {
  flex: none;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: #5865f2;
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.18s;
}

.discord-banner button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.discord-button-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.filters{
  min-height:62px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#e1e5ee;
  margin-top:20px;
  display:flex;
  align-items:center;
  gap:3.5px;
  padding:10px 18px;
  box-shadow:var(--shadow)
}

.filter-title{
  color:#36527f;
  font-size:14px;
  display:flex;
  gap:7px;
  align-items:center;
  margin-right:4px
}

select,input,#reset{
  height:36px;
  border:1px solid #c8d1df;
  border-radius:20px;
  background:var(--input);
  color:#273c63;
  font-weight:600;
  padding:0 14px;
  outline:none;
  transition:.18s
}

select:focus,input:focus{
  border-color:var(--purple);
  box-shadow:0 0 0 3px rgba(141,124,255,.14)
}

select{
  min-width:125px
}

input{
  width:180px
}

#reset{
  cursor:pointer;
  white-space:nowrap;
}

.tier-section{
  margin-top:45px
}

.tier-heading{
  display:flex;
  align-items:center;
  gap:22px
}

.tier-heading h1{
  margin:0;
  font-size:28px;
  letter-spacing:-.5px
}

.tier-section.tier-new .tier-heading h1 {
  color: #b388ff;
}

.tier-section.tier-special .tier-heading h1 {
  color: #C0C0C0;
}

.tier-section.tier-rare .tier-heading h1 {
  color: #ff6b8a;
}

.tier-section.tier-collector .tier-heading h1 {
  color: #D208FF;
}

/* =========================================================
   SECRET TIER GLOW EFFECT
========================================================= */

.tier-section.tier-secret .tier-heading h1 {
  color: #c9a7ff;
  text-shadow:
    0 0 5px rgba(179, 136, 255, 0.7),
    0 0 12px rgba(179, 136, 255, 0.55),
    0 0 24px rgba(179, 136, 255, 0.35);
  animation: secretTitleGlow 2s ease-in-out infinite alternate;
}

.tier-section.tier-secret .tier-arrow {
  color: #b388ff;
  filter: drop-shadow(0 0 5px rgba(179, 136, 255, 0.8));
}

@keyframes secretTitleGlow {
  from {
    text-shadow:
      0 0 5px rgba(179, 136, 255, 0.5),
      0 0 10px rgba(179, 136, 255, 0.3);
  }

  to {
    text-shadow:
      0 0 8px rgba(179, 136, 255, 0.9),
      0 0 18px rgba(179, 136, 255, 0.7),
      0 0 28px rgba(179, 136, 255, 0.4);
  }
}

.tier-section.tier-high .tier-heading h1 {
  color: #e8b86d;
}

.tier-section.tier-mid .tier-heading h1 {
  color: #7fc9f0;
}

.tier-section.tier-low .tier-heading h1 {
  color: #9aa9c9;
}

.tier-heading .tier-heading-content > span:not(.tier-arrow) {
  background: var(--dark);
  color: #ff6f96;
  border-radius: 16px;
  padding: 7px 17px;
  font-size: 13px;
  font-weight: 850;
}

.tier-section.tier-secret .tier-heading-content > span:not(.tier-arrow) {
  color: #b388ff;
  background: rgba(179, 136, 255, 0.12);
  border: 1px solid rgba(179, 136, 255, 0.3);
  text-shadow: 0 0 8px rgba(179, 136, 255, 0.5);
  box-shadow: 0 0 10px rgba(179, 136, 255, 0.12);
}

.tier-section.tier-collector .tier-heading-content > span:not(.tier-arrow) {
  color: #D208FF;
  background: rgba(210, 8, 255, 0.12);
  border: 1px solid rgba(210, 8, 255, 0.3);
  text-shadow: 0 0 8px rgba(210, 8, 255, 0.5);
  box-shadow: 0 0 10px rgba(210, 8, 255, 0.12);
}

.tier-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 22px;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.line{
  height:3px;
  background:#c7cfdd;
  margin:10px 0 18px;
  border-radius:10px
}

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

.card{
  min-height:151px;
  border:1px solid var(--border);
  border-radius:15px;
  background:var(--card);
  padding:15px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  /* box-shadow:var(--shadow); */
  position:relative;
  overflow:hidden;
  transition: transform .2s, filter .2s, border-color .2s, background .25s;
}

.card:before{
  content:"";
  position:absolute;
  inset:-80% -20%;
  background:radial-gradient(circle,rgba(141,124,255,.13),transparent 42%);
  opacity:0;
  transition:opacity .25s;
  pointer-events:none
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: none;
  filter: drop-shadow(0 4px 5px rgba(39, 55, 91, 0.10));
  border-color: #aaa0ff;
}

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

.card:hover:before{
  opacity:1
}

/* item visuals */

.visuals{
  display:flex;
  gap:8px;
  min-height:54px;
  position:relative;
  z-index:1;
  flex-wrap:wrap
}

.item-visual{
  height:54px;
  min-width:88px;
  background:var(--soft);
  border:1px solid var(--border);
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:5px 7px;
  transition:transform .2s,box-shadow .2s,border-color .2s
}

.item-visual:hover{
  transform:translateY(-4px) scale(1.035);
  border-color:#a99cff;
  box-shadow:0 8px 20px rgba(141,124,255,.2)
}

.item-visual img{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:9px;
  flex-shrink:0
}

.item-placeholder{
  width:42px;
  height:42px;
  border-radius:9px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#d4dbea,#edf0f7);
  color:#52668c;
  font-size:18px;
  font-weight:900;
  flex-shrink:0
}

.item-visual .value{
  font-size:15px;
  font-weight:900;
  color:#173f82;
  white-space:nowrap
}

.info{
  margin-top:7px;
  position:relative;
  z-index:1
}

.name{
  font-size:16px;
  font-weight:900;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px
}

.set{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  background:#8d7cff;
  color:#fff;

  border-radius:7px;
  padding:3px 7px;

  font-size:9px;
  font-weight:850;
  line-height:1;

  white-space:nowrap;

  box-shadow:0 3px 8px rgba(141,124,255,.25);

  animation:setPulse 1.35s ease-in-out infinite;
  transform-origin:center;
  margin:0 2px;
}

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

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

/* NEW badge */

.new-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#ef4d63;
  color:#fff;
  border-radius:7px;
  padding:3px 7px;
  font-size:9px;
  font-weight:850;
  line-height:1;
  box-shadow:0 3px 8px rgba(239,77,99,.25);
  animation:newPulse 1.35s ease-in-out infinite;
  transform-origin:center
}

@keyframes newPulse{
  0%,100%{
    transform:scale(1)
  }

  50%{
    transform:scale(1.12)
  }
}

.meta{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:5px;
  font-size:12px;
  color:#2f4c7b
}

/* status badges */

.badge{
  padding:4px 9px;
  border-radius:11px;
  font-weight:900;
  font-size:11px
}

.hyped{
  background:#f0d0ff;
  color:#8a2be2
}

.rising{
  background:#c8f0d8;
  color:#1a7a3a
}

.overpaid{
  background:#2f1f3a;
  color:#d9a6f0
}

.doing-well{
  background:#1f3a2f;
  color:#80d0aa
}

.fluctuating{
  background:#3a2e1a;
  color:#eac47a
}

.stable{
  background:#1e3a2a;
  color:#7bcb9a
}

.unstable{
  background:#f0e6c8;
  color:#b08a2a
}

.underpaid{
  background:#2a1f2a;
  color:#d99a9a
}

.dropping{
  background:#f0d0d0;
  color:#b04a4a
}

.lowballed{
  background:#d45106;
  color:#ffb060
}

.note{
  font-size:11px;
  color:#52698e;
  margin-top:6px
}

/* calculator */

.calculator-section,
.updates-section,
.credits-section{
  margin-top:42px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--panel);
  padding:20px;
  box-shadow:var(--shadow)
}

.section-title-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px
}

.section-title-row h2,
.credits-section h2{
  margin:0;
  font-size:22px
}

.section-title-row p{
  margin:6px 0 0;
  color:var(--muted);
  font-size:12px
}

.trade-columns{
  display:grid;
  grid-template-columns:1fr 50px 1fr;
  gap:15px;
  align-items:center;
  margin-top:18px
}

.trade-side{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:15px;
  padding:14px
}

.trade-side-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px
}

.trade-side-head span{
  font-weight:900;
  color:var(--purple)
}

.trade-vs{
  text-align:center;
  font-weight:950;
  color:var(--pink)
}

.trade-items{
  min-height:30px;
  display:flex;
  flex-direction:column;
  gap:7px
}

.trade-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:var(--soft);
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 10px;
  font-size:12px
}

.trade-row small{
  color:var(--muted)
}

.remove-trade{
  border:0;
  background:transparent;
  color:#d15c7a;
  font-weight:900
}

.add-row{
  display:grid;
  grid-template-columns:1fr 60px auto;
  gap:7px;
  margin-top:10px
}

.add-row select{
  width:100%;
  min-width:0
}

.add-row input{
  width:100%;
  border-radius:10px
}

.add-row{
  display:grid;
  grid-template-columns:1fr 60px 42px;
  gap:7px;
  margin-top:10px
}

.add-row select{
  width:100%;
  min-width:0
}

.add-row input{
  width:100%;
  border-radius:10px
}

.add-row button{
  width:42px;
  height:36px;
  padding:0;
  border:0;
  border-radius:10px;
  background:var(--purple);
  color:#fff;
  font-weight:900;
  font-size:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  transition:.18s
}

.add-row button:hover{
  transform:translateY(-1px);
  filter:brightness(1.06);
}

.token-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
  font-size:12px;
  font-weight:800;
  color:var(--muted)
}

.token-row input{
  width:100px;
  border-radius:10px
}

.trade-total{
  margin-top:10px;
  text-align:right;
  font-size:13px
}

.trade-result{
  margin-top:15px;
  padding:12px 15px;
  border-radius:12px;
  background:var(--soft);
  font-weight:800;
  text-align:center
}

.trade-result.good{
  background:#d7f3e3;
  color:#17613f
}

.trade-result.bad{
  background:#ffe0e8;
  color:#a92e4d
}

/* updates */

.changelog-list{
  display:grid;
  gap:7px;
  margin-top:15px
}

.log-row{
  display:flex;
  gap:9px;
  align-items:flex-start;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:10px;
  padding:9px 11px;
  font-size:12px
}

.log-dot{
  font-weight:900
}

.log-date{
  color:var(--muted);
  min-width:90px
}

/* credits */

.credit-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-top:15px
}

.credit-card{
  display:flex;
  gap:12px;
  align-items:center;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px
}

.credit-avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--purple);
  color:white;
  font-weight:950
}

.credit-card div:last-child{
  display:flex;
  flex-direction:column;
  gap:2px
}

.credit-card span,
.credit-card small{
  color:var(--muted);
  font-size:11px
}

footer{
  margin-top:42px;
  border:1px solid var(--border);
  border-radius:15px;
  background:#e7eaf2;
  text-align:center;
  padding:22px;
  color:#52698e;
  font-size:12px;
  line-height:2
}

/* dark mode */

.dark{
  --bg:#10131b;
  --panel:#202634;
  --card:#202634;
  --soft:#2a3040;
  --border:#384257;
  --text:#eef2ff;
  --muted:#a6b2c9;
  --input:#242b39;
  --shadow:0 12px 30px rgba(0,0,0,.25);
  --hover-shadow:0 18px 42px rgba(0,0,0,.38)
}

.dark .topbar{
  background:#202634
}

.dark .filters,
.dark footer{
  background:#1b212d
}

.dark .item-placeholder{
  background:linear-gradient(135deg,#343b4d,#262c3a);
  color:#c2cbe0
}

.dark .item-visual .value{
  color:#9ebaff
}

.dark select,
.dark input,
.dark #reset{
  border-color:#3b465c;
  color:#dce5f7
}

.dark .rank{
  background:#2b3343;
  color:#dce5f7
}

.dark .subtitle,
.dark .top-actions,
.dark .filter-title,
.dark .meta{
  color:#aab8d2
}

.dark .set{
  background:#8d7cff;
  color:#fff;
}

.dark .name{
  color:#f1f4ff;
}

.dark .meta{
  color:#c2cce0;
}

.dark .note{
  color:#eef2ff;
}

.dark .line{
  background:#394359
}

.dark .theme-toggle{
  background:#343c4d
}

.dark .theme-toggle span{
  background:#f4f6ff
}

/* responsive */

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

  .updated{
    display:none
  }
}

@media(max-width:760px){
  .page{
    padding:12px
  }

  .topbar{
    height:auto;
    gap:12px;
    align-items:flex-start
  }

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
}

  .filters{
    height:auto;
    flex-wrap:wrap
  }

  .filters>*{
    flex:1
  }

  .filter-title{
    flex:none
  }

  .filters input{
    width:auto
  }

  .trade-columns{
    grid-template-columns:1fr
  }

  .trade-vs{
    display:none
  }

  .credit-grid{
    grid-template-columns:1fr
  }
}


@media (max-width: 620px) {
  .discord-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .discord-banner button {
    width: 100%;
  }
}

  .discord-left{
    font-size:13px
  }

  .discord-banner button{
    white-space:nowrap
  }

  .add-row{
    grid-template-columns:1fr 55px 42px;
  }

  .add-row button{
    grid-column:auto;
    height:36px;
    width:42px;
  }
}

/* links */

a{
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  transition:color .18s,opacity .18s
}

a:visited{
  color:var(--text);
}

a:hover{
  color:var(--text);
  opacity:.7;
}

/* OAuth documentation links */
/* .account-login-documentation a,
.account-login-documentation a:visited,
.account-login-documentation a:hover,
.account-login-documentation a:active {
  color: #111a32 !important;
} */

.dark .account-login-documentation a,
.dark .account-login-documentation a:visited,
.dark .account-login-documentation a:hover,
.dark .account-login-documentation a:active {
  color: #9ebaff !important;
}

.account-login-documentation a:hover {
  opacity: 0.7;
}

/* dark mode links */

.dark a,
.dark a:visited{
  color:#9ebaff;
}

/* Login provider icons */
.account-login-provider-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.discord-login-button,
.roblox-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* OAuth documentation links */
.account-login-documentation a,
.account-login-documentation a:visited {
  color: inherit;
}

.dark .account-login-documentation a,
.dark .account-login-documentation a:visited {
  color: #9ebaff;
}

.dark a:hover{
  color:#b8ceff;
  opacity:.9;
}

.discord-button-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ===== RARITY COLORS ===== */

/* Common */
.card.rarity-common {
  background: linear-gradient(
    135deg,
    rgba(170, 170, 170, 0.12) 0%,
    rgba(170, 170, 170, 0.04) 100%
  );
  border-color: rgba(170, 170, 170, 0.4);
}

/* Uncommon */
.card.rarity-uncommon {
  background: linear-gradient(
    135deg,
    rgba(26, 214, 51, 0.16) 0%,
    rgba(26, 214, 51, 0.04) 100%
  );
  border-color: rgba(26, 214, 51, 0.5);
}

/* Rare */
.card.rarity-rare {
  background: linear-gradient(
    135deg,
    rgba(74, 214, 255, 0.18) 0%,
    rgba(74, 214, 255, 0.04) 100%
  );
  border-color: rgba(74, 214, 255, 0.5);
}

/* Epic */
.card.rarity-epic {
  background: linear-gradient(
    135deg,
    rgba(210, 8, 255, 0.17) 0%,
    rgba(210, 8, 255, 0.04) 100%
  );
  border-color: rgba(210, 8, 255, 0.5);
}

/* Legendary */
.card.rarity-legendary {
  background: linear-gradient(
    135deg,
    rgba(255, 251, 8, 0.16) 0%,
    rgba(255, 251, 8, 0.04) 100%
  );
  border-color: rgba(255, 251, 8, 0.55);
}

/* Mythic */
.card.rarity-mythic {
  background: linear-gradient(
    135deg,
    rgba(150, 25, 45, 0.24) 0%,
    rgba(209, 45, 35, 0.2) 50%,
    rgba(209, 81, 6, 0.16) 100%
  );
  border-color: rgba(220, 65, 65, 0.6);
}

/* Power card - Both light and dark mode */
.card.rarity-power {
  background: linear-gradient(
    135deg,
    #0a1a3a 0%,
    #1a3a6a 40%,
    #d45106 100%
  );
  border-color: rgba(255, 176, 96, 0.5);
}

/* Text colors - Light mode only */
body:not(.dark) .card.rarity-power,
body:not(.dark) .card.rarity-power * {
  color: #ffffff;
}

/* Item name */
body:not(.dark) .card.rarity-power .item-name {
  color: #000000 !important;
}

/* Item value */
body:not(.dark) .card.rarity-power .value {
  color: #173f82 !important;
}

/* Known Exists */
body:not(.dark) .card.rarity-power .known-exist {
  color: #000000 !important;
}

/* Preserve status badge colors */
body:not(.dark) .card.rarity-power .badge.hyped { color: #8a2be2; }
body:not(.dark) .card.rarity-power .badge.rising { color: #1a7a3a; }
body:not(.dark) .card.rarity-power .badge.overpaid { color: #d9a6f0; }
body:not(.dark) .card.rarity-power .badge.doing-well { color: #80d0aa; }
body:not(.dark) .card.rarity-power .badge.fluctuating { color: #eac47a; }
body:not(.dark) .card.rarity-power .badge.stable { color: #7bcb9a; }
body:not(.dark) .card.rarity-power .badge.unstable { color: #b08a2a; }
body:not(.dark) .card.rarity-power .badge.underpaid { color: #d99a9a; }
body:not(.dark) .card.rarity-power .badge.dropping { color: #b04a4a; }
body:not(.dark) .card.rarity-power .badge.lowballed { color: #ffb060; }

/* Limited */
.card.rarity-limited {
  background: linear-gradient(
    135deg,
    rgba(247, 176, 216, 0.24) 0%,
    rgba(164, 205, 243, 0.24) 50%,
    rgba(240, 205, 154, 0.28) 100%
  );
  border-color: rgba(230, 205, 235, 0.65);
}

/* Fallback */
.card.rarity-fallback {
  background: linear-gradient(
    135deg,
    rgba(209, 81, 6, 0.16) 0%,
    rgba(209, 81, 6, 0.04) 100%
  );
  border-color: rgba(209, 81, 6, 0.5);
}

/* =========================================================
   MARKET NEWS
========================================================= */

.news-section {
  margin-top: 28px;
}

.news-section .section-title-row {
  margin-bottom: 14px;
}

.news-section h2 {
  margin-bottom: 4px;
}

.news-section p {
  margin: 0;
  color: #777;
  font-size: 13px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;

  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;

  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.news-card:hover {
  transform: translateY(-1px);
  border-color: #d5d5d5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.news-icon {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border-radius: 9px;
  background: #f5f5f5;

  font-size: 16px;
}

.news-content {
  min-width: 0;
}

.news-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.news-text {
  color: #777;
  font-size: 13px;
  line-height: 1.45;
}

/* News types */

.news-card.good {
  border-left: 3px solid #4caf50;
}

.news-card.info {
  border-left: 3px solid #6c8cff;
}

.news-card.warning {
  border-left: 3px solid #f0ad4e;
}

.news-date,
.news-modal-date {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.news-modal-date {
  margin-bottom: 14px;
}

/* =========================================================
   DARK MODE
========================================================= */

body.dark .news-card {
  background: #181818;
  border-color: #2d2d2d;
}

body.dark .news-card:hover {
  border-color: #3a3a3a;
}

body.dark .news-icon {
  background: #242424;
}

body.dark .news-text {
  color: #999;
}

body.dark .news-section p {
  color: #999;
}

.updated-item {
  margin-top: 5px;
  font-size: 11px;
  color: #111a32;
}

body.dark .updated-item {
  color: #777;
}

body.dark .card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

/* =========================================================
   SEARCHABLE CALCULATOR SELECT
========================================================= */

.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select .select-selected {
  width: 100%;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;

  display: flex;
  align-items: center;

  padding: 0 14px;

  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 10px;

  background: var(--card-bg, #fff);
  color: var(--text, #222);

  cursor: pointer;
  user-select: none;
}

.searchable-select .select-selected::after {
  content: "⌄";

  margin-left: auto;

  font-size: 16px;
  opacity: 0.6;
}

.searchable-select.open .select-selected::after {
  content: "⌃";
}

.searchable-select .select-search {
  display: none;

  width: 100%;
  box-sizing: border-box;

  margin-top: 6px;
  padding: 10px 12px;

  border: 1px solid rgba(127, 127, 127, 0.3);
  border-radius: 9px;

  background: var(--card-bg, #fff);
  color: var(--text, #222);

  outline: none;
}

.searchable-select.open .select-search {
  display: block;
}

.searchable-select .select-search::placeholder {
  color: #999;
}

.searchable-select .select-dropdown {
  display: none;

  position: absolute;

  left: 0;
  right: 0;

  top: calc(100% + 48px);

  max-height: 300px;

  overflow-y: auto;

  z-index: 1000;

  padding: 5px;

  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 10px;

  background: var(--card-bg, #fff);

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.15);
}

.searchable-select.open .select-dropdown {
  display: block;
}

.searchable-select .select-option {
  padding: 9px 11px;

  border-radius: 7px;

  cursor: pointer;

  color: var(--text, #222);

  font-size: 14px;
}

.searchable-select .select-option:hover {
  background: rgba(127, 127, 127, 0.12);
}

.searchable-select .select-option.selected {
  background: rgba(127, 127, 127, 0.16);
  font-weight: 600;
}

.searchable-select .select-no-results {
  padding: 14px 11px;

  text-align: center;

  color: #999;

  font-size: 14px;
}

/* =========================================================
   IMPROVED NEWS DARK MODE
========================================================= */

body.dark .news-card {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

body.dark .news-card:hover {
  border-color: #4b5670;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

body.dark .news-icon {
  background: var(--soft);
  color: var(--text);
}

body.dark .news-title {
  color: var(--text);
}

body.dark .news-text {
  color: var(--muted);
}

body.dark .news-section p {
  color: var(--muted);
}

body.dark .updated-item {
  color: var(--muted);
}

.filters select,
.filters button,
.filter-title{
  font-family:'Nunito',sans-serif !important;
  font-weight:800 !important;
}

/* Dark mode: Select Item dropdown */
body.dark .searchable-select .select-selected,
body.dark .searchable-select .select-search,
body.dark .searchable-select .select-dropdown {
  background: #202634 !important;
  color: #eef2ff !important;
  border-color: #384257 !important;
}

body.dark .searchable-select .select-option {
  background: #202634 !important;
  color: #eef2ff !important;
}

body.dark .searchable-select .select-option:hover,
body.dark .searchable-select .select-option.selected {
  background: #2a3040 !important;
  color: #ffffff !important;
}

a {
  text-decoration: none;
}

.rank,
.rank:visited,
.rank:hover,
.rank:active {
  color: inherit !important;
  text-decoration: none !important;
}

/* Known Counts */

/* Known Counts */

.known-exist {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--soft);
  font-size: 11px;
}

.known-exist-label {
  color: var(--muted);
  font-weight: 800;
}

.known-exist-value {
  color: var(--text);
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 480px) {
  .known-exist {
    gap: 4px 8px;
    padding: 8px;
  }
}

.log-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.log-title {
  font-size: 15px;
  font-weight: 700;
}

.log-explanation {
  font-size: 12px;
  font-weight: 400;
  color: #7b8497;
  line-height: 1.5;
}

.dark .log-explanation {
  color: #aab3c5;
}

.log-explanation span {
  font-weight: 700;
}

/* =========================================================
   CHANGELOG CATEGORIES
========================================================= */

.changelog-category {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.changelog-category:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.changelog-category-header {
  margin-bottom: 12px;
}

.changelog-category-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

/* Animated count badge, matching NEW */
.changelog-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  animation: newPulse 1.35s ease-in-out infinite;
  transform-origin: center;
}

/* Raised */
.changelog-category-raised .changelog-count {
  background: #28a765;
  color: #fff;
  box-shadow: 0 3px 8px rgba(40, 167, 101, 0.25);
}

/* Corrected */
.changelog-category-corrected .changelog-count {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 3px 8px rgba(88, 101, 242, 0.25);
}

/* Dropped */
.changelog-category-dropped .changelog-count {
  background: #ef4d63;
  color: #fff;
  box-shadow: 0 3px 8px rgba(239, 77, 99, 0.25);
}

/* Updated */
.changelog-category-updated .changelog-count {
  background: #8d7cff;
  color: #fff;
  box-shadow: 0 3px 8px rgba(141, 124, 255, 0.25);
}

/* New */
.changelog-category-new .changelog-count {
  background: #72bcd4;
  color: #fff;
  box-shadow: 0 3px 8px rgba(141, 124, 255, 0.25);
}

/* Others */
.changelog-category-others .changelog-count {
  background: #9a6a05;
  color: #fff;
  box-shadow: 0 3px 8px rgba(141, 124, 255, 0.25);
}

/* Dark mode */
.dark .changelog-category {
  border-bottom-color: var(--border);
}

.dark .changelog-category-raised .changelog-count {
  background: #28a765;
  color: #fff;
}

.dark .changelog-category-corrected .changelog-count {
  background: #5865f2;
  color: #fff;
}

.dark .changelog-category-dropped .changelog-count {
  background: #ef4d63;
  color: #fff;
}

.dark .changelog-category-updated .changelog-count {
  background: #8d7cff;
  color: #fff;
}

.dark .changelog-category-new .changelog-count {
  background: #72bcd4;
  color: #fff;
}

.dark .changelog-category-others .changelog-count {
  background: #9a6a05;
  color: #fff;
}

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
  .changelog-count {
    animation: none;
  }
}



/* ===== News Cards ===== */

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.news-card.news-clickable {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--border-color, rgba(130, 130, 150, 0.16));
  border-radius: 16px;
  background: var(--card-bg, var(--card, #fff));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card.news-clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30, 30, 60, 0.09);
}

.news-card.news-clickable .news-card-image {
  display: block;
  width: 100%;
  height: 190px;
  margin: 0;
  object-fit: cover;
  background: rgba(128, 128, 128, 0.08);
}

.news-card-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 18px;
  box-sizing: border-box;
  text-align: left;
}

.news-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: left;
}

.news-card-heading .news-icon {
  flex: 0 0 auto;
  margin: 2px 0 0;
}

.news-card-heading .news-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: left;
  line-height: 1.5;
  font-weight: 700;
}

.news-card-description {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
  text-align: left;
  line-height: 1.65;
  opacity: 0.78;
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary, #8d7cff);
}

/* ===== News Article Popup ===== */

.news-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.news-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.news-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 24, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.news-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: min(85vh, 850px);
  overflow: hidden;
  border: 1px solid rgba(140, 140, 160, 0.2);
  border-radius: 20px;
  background: var(--card-bg, var(--card, #fff));
  color: var(--text-color, var(--text, inherit));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.news-modal.is-open .news-modal-panel {
  transform: translateY(0) scale(1);
}

.news-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(140, 140, 160, 0.22);
  border-radius: 50%;
  background: rgba(20, 20, 30, 0.62);
  color: #fff;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.news-modal-image {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: cover;
  background: rgba(128, 128, 128, 0.08);
}

.news-modal-body {
  padding: 26px;
  overflow-y: auto;
  text-align: left;
}

.news-modal-title {
  margin: 0 0 18px;
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: left;
}

.news-modal-content {
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: pre-line;
  text-align: left;
  opacity: 0.9;
}

body.news-modal-open {
  overflow: hidden;
}

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

@media (max-width: 600px) {
  .news-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .news-card.news-clickable .news-card-image {
    height: 200px;
  }

  .news-modal {
    padding: 12px;
  }

  .news-modal-panel {
    max-height: 90vh;
    border-radius: 16px;
  }

  .news-modal-image {
    max-height: 240px;
  }

  .news-modal-body {
    padding: 20px;
  }
}

/* Changelog search */

.changelog-search {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  max-width: 520px;
  height: 46px;
  margin: 22px 0 8px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 1px solid rgba(130, 130, 150, 0.22);
  border-radius: 12px;
  background: var(--card, #fff);
  color: var(--text, #252535);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.changelog-search:focus-within {
  border-color: #8d7cff;
  box-shadow: 0 0 0 3px rgba(141, 124, 255, 0.12);
}

.changelog-search .changelog-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  opacity: 0.55;
}

.changelog-search-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.changelog-search input,
.changelog-search input[type="text"] {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  box-shadow: none;
}

.changelog-search input::placeholder {
  color: inherit;
  opacity: 0.48;
}

.changelog-search #clearChangelogSearch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.changelog-search #clearChangelogSearch:hover {
  background: rgba(130, 130, 150, 0.1);
  opacity: 1;
}

.changelog-search #clearChangelogSearch[hidden] {
  display: none;
}

.changelog-search-count {
  min-height: 18px;
  margin: 0 0 12px;
  font-family: inherit;
  font-size: 12px;
  opacity: 0.65;
}

@media (max-width: 600px) {
  .changelog-search {
    max-width: none;
    margin-top: 18px;
  }
}


.changelog-search input,
.changelog-search input[type="text"] {
  font-family: "Nunito", sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  color: inherit !important;
}


#changelogSearch,
#changelogSearch:focus,
.changelog-search #changelogSearch {
  font-family: "Nunito", sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  color: var(--text, #252535) !important;
  -webkit-text-fill-color: var(--text, #252535) !important;
  text-transform: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

#changelogSearch::placeholder {
  font-family: "Nunito", sans-serif !important;
  font-weight: 500 !important;
  -webkit-text-fill-color: currentColor;
}

.dark footer {
  background: #202634;
  color: #a6b2c9;
}

/* ===== DISCLAIMER ===== */
.disclaimer-bar {
  display: block;
  width: 100%;
  box-sizing: border-box;

  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;

  color: var(--text-secondary, #687083);
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #dfe3ec);
  border-radius: 12px;

  padding: 6px 16px;
  margin-top: -8px;
  margin-bottom: 16px;
}

.dark .disclaimer-bar {
  color: #aab8d2;
  background: #202634;
  border-color: #384257;
}

/* =========================================================
   BASE VALUE / TOKEN VALUE TOGGLE
========================================================= */

.filters .value-mode-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #d9dfeb;
  box-shadow: inset 0 1px 2px rgba(30, 45, 75, 0.04);
}

.filters .value-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #50658c;
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.filters .value-mode-button:hover {
  color: var(--text);
}

.filters .value-mode-button:active {
  transform: scale(0.98);
}

.filters .value-mode-button.active {
  background: #f5f6fa;
  border-color: #c6cfdf;
  color: #273c63;
  box-shadow: 0 2px 5px rgba(25, 35, 60, 0.08);
}

.token-logo {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 50%;
}

.token-value-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.value-unknown {
/*  color: var(--muted); */
  font-weight: 800;
}

/* Dark mode */

.dark .filters .value-mode-control {
  background: #202634;
  border-color: #3b465c;
}

.dark .filters .value-mode-button {
  color: #dce5f7;
}

.dark .filters .value-mode-button:hover {
  color: #f1f1f7;
}

.dark .filters .value-mode-button.active {
  background: #202634;
  border-color: #3b465c;
  color: #dce5f7;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

/* Responsive */

@media (max-width: 1050px) {
  .filters .value-mode-control {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .filters .value-mode-control {
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
  }

  .filters .value-mode-button {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .filters .value-mode-button {
    padding: 8px 7px;
    font-size: 11px;
  }
}

.item-visual img.token-logo,
.item-visual img.token-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 14px;
  border-radius: 50%;
  object-fit: contain;
}

.item-visual {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-visual .value {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  border-left: 1px solid rgba(128, 128, 128, 0.35);
  padding-left: 6px;
}

body.dark .item-visual .value {
  border-left-color: rgba(255, 255, 255, 0.3);
}

.set-total-value {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 3px;
  white-space: nowrap;
}

.set-total-value.token-value-display {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.set-total-value .token-logo {
  width: 10px;
  height: 10px;
  min-width: 10px;
  flex: 0 0 10px;
  object-fit: contain;
}

/* Divider between Base Value and Token Value */

/* .filters .value-mode-control {
  gap: 4px;
}

.filters .value-mode-button + .value-mode-button {
  position: relative;
}

.filters .value-mode-button + .value-mode-button::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  width: 1px;
  height: 18px;
  background: #8793aa;
  transform: translateY(-50%);
  pointer-events: none;
} */

/* Dark mode search placeholder */
body.dark input::placeholder {
  color: #bfc5d2;
  opacity: 1;
}

/* =========================================================
   TIER COLLAPSE
========================================================= */

.tier-heading {
  cursor: default;
}

.tier-heading-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.tier-heading-content h1 {
  margin: 0;
}

.tier-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.22s ease, opacity 0.2s ease;
}

.tier-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* TIER ARROW COLORS */

.tier-section.tier-new .tier-arrow {
  color: #b388ff;
}

.tier-section.tier-special .tier-arrow {
  color: #C0C0C0;
}

.tier-section.tier-rare .tier-arrow {
  color: #ff6b8a;
}

.tier-section.tier-collector .tier-arrow {
  color: #D208FF;
  background: transparent;
  border: none;
  box-shadow: none;
  text-shadow: none;
  filter: none;
}

.tier-section.tier-secret .tier-arrow {
  color: #b388ff;
  background: transparent;
  border: none;
  box-shadow: none;
  text-shadow: none;
  filter: none;
}

.tier-section.tier-high .tier-arrow {
  color: #e8b86d;
}

.tier-section.tier-mid .tier-arrow {
  color: #7fc9f0;
}

.tier-section.tier-low .tier-arrow {
  color: #9aa9c9;
}

/* HOVER */

.tier-arrow:hover {
  opacity: 0.7;
}

/* COLLAPSED */

.tier-heading.collapsed .tier-arrow {
  transform: rotate(-90deg);
}

/* COLLAPSED LINE */

.tier-collapsed .line {
  margin-bottom: 0;
}

/* =========================================================
   VALUE SUGGESTION
========================================================= */

.suggestion-section {
  margin-top: 14px;
}

.suggestion-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 17px;
  min-height: 64px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.suggestion-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.suggestion-text b {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.suggestion-text span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

#openSuggestion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}

#openSuggestion:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

#openSuggestion span {
  font-size: 14px;
}

/* Modal */

.suggestion-dialog {
  width: min(520px, calc(100% - 28px));
  max-width: 520px;
  max-height: min(88vh, 760px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 20px 65px rgba(0, 0, 0, .24);
}

.suggestion-dialog::backdrop {
  background: rgba(12, 18, 35, .58);
  backdrop-filter: blur(3px);
}

.suggestion-modal {
  padding: 21px;
}

.suggestion-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}

.suggestion-modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
}

.suggestion-modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.suggestion-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.suggestion-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin-bottom: 14px;
}

.suggestion-field label {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.suggestion-field input,
.suggestion-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: var(--input);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.suggestion-field input {
  height: 40px;
}

.suggestion-field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.suggestion-field input::placeholder,
.suggestion-field textarea::placeholder {
  color: var(--muted);
  opacity: .7;
}

.suggestion-field input:focus,
.suggestion-field textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(141, 124, 255, .13);
}

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

.suggestion-optional {
  margin-left: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.suggestion-status {
  min-height: 17px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
}

.suggestion-status.success {
  color: #299b68;
}

.suggestion-status.error {
  color: #e05b69;
}

.suggestion-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 3px;
}

.suggestion-actions button {
  min-height: 37px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--soft);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.suggestion-actions button[type="submit"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.suggestion-actions button:disabled {
  opacity: .6;
  cursor: wait;
}

.suggestion-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dark .suggestion-info {
  background: var(--card);
  border-color: var(--border);
}

.dark .suggestion-dialog {
  background: var(--card);
  border-color: var(--border);
}

.dark .suggestion-close,
.dark .suggestion-actions button:not([type="submit"]) {
  background: var(--soft);
  color: var(--text);
}

@media (max-width: 620px) {
  .suggestion-info {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  #openSuggestion {
    width: 100%;
  }

  .suggestion-modal {
    padding: 17px;
  }

  .suggestion-row {
    gap: 9px;
  }

  .suggestion-actions button {
    flex: 1;
  }
}


/* =========================================================
   SUGGESTION UPDATE
========================================================= */

/* HEADER */

.suggestion-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.suggestion-title-row h2 {
  margin: 0;
}

.suggestion-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.suggestion-mode-toggle button {
  border: 0;
  border-radius: 6px;
  padding: 5px 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.suggestion-mode-toggle button.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .09);
}

/* CATEGORY OPTIONS */

.suggestion-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.suggestion-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.suggestion-option:hover {
  border-color: var(--purple);
}

.suggestion-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.suggestion-option-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--muted);
  border-radius: 5px;
  background: transparent;
  transition: .15s;
}

.suggestion-option input:checked + .suggestion-option-box {
  background: var(--purple);
  border-color: var(--purple);
}

.suggestion-option input:checked + .suggestion-option-box::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
}

.suggestion-option input:focus-visible + .suggestion-option-box {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

/* CATEGORY SECTIONS */

.suggestion-category {
  padding: 13px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft);
}

.suggestion-category[hidden] {
  display: none !important;
}

.suggestion-category-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.suggestion-category .suggestion-row {
  margin-bottom: 0;
}

.suggestion-category .suggestion-field {
  min-width: 0;
}

/* INPUTS */

.suggestion-modal select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.suggestion-modal select:focus {
  border-color: var(--purple);
}

/* DISCORD CONTACT */

.suggestion-contact {
  padding: 13px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft);
}

.suggestion-contact .suggestion-category-heading {
  margin-bottom: 12px;
}

.suggestion-contact .suggestion-field:last-child {
  margin-bottom: 0;
}

.suggestion-contact .suggestion-optional {
  margin-left: auto;
}

/* DARK MODE */

body.dark .suggestion-mode-toggle {
  background: var(--soft);
}

body.dark .suggestion-mode-toggle button.active {
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

body.dark .suggestion-option {
  background: var(--card);
}

body.dark .suggestion-category,
body.dark .suggestion-contact {
  background: var(--soft);
}

body.dark .suggestion-modal select {
  background: var(--card);
  color: var(--text);
}

/* MOBILE */

@media (max-width: 620px) {
  .suggestion-title-row {
    gap: 8px;
  }

  .suggestion-options {
    gap: 7px;
  }

  .suggestion-option {
    padding: 8px;
    font-size: 11px;
  }

  .suggestion-category,
  .suggestion-contact {
    padding: 11px;
  }

  .suggestion-category .suggestion-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}


/* =========================================================
   SUGGESTION UI FIX
========================================================= */

/* CATEGORY CHECKBOXES */

.suggestion-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.suggestion-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  box-sizing: border-box;
  padding: 9px 12px;
  line-height: 1.3;
}

.suggestion-option input[type="checkbox"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.suggestion-option-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  box-sizing: border-box;
  margin: 0;
}

/* STABILITY SELECT FIX */

.suggestion-category .suggestion-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.suggestion-category .suggestion-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.suggestion-category .suggestion-field label {
  display: block;
  width: 100%;
  margin: 0;
  line-height: 1.4;
}

.suggestion-category .suggestion-field select {
  display: block;
  position: relative;
  width: 100%;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 30px 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background-color: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  appearance: auto;
  -webkit-appearance: auto;
}

.suggestion-category .suggestion-field select:focus {
  border-color: var(--purple);
  outline: none;
  box-shadow: 0 0 0 3px rgba(141, 124, 255, .13);
}

/* MOBILE */

@media (max-width: 620px) {
  .suggestion-category .suggestion-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .suggestion-category .suggestion-field select {
    height: 42px;
    min-height: 42px;
  }
}


/* SUGGESTION SCROLLBAR */

.suggestion-dialog {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--card);
}

.suggestion-dialog::-webkit-scrollbar {
  width: 8px;
}

.suggestion-dialog::-webkit-scrollbar-track {
  background: var(--card);
  border-radius: 10px;
}

.suggestion-dialog::-webkit-scrollbar-thumb {
  background: var(--border);
  border: 2px solid var(--card);
  border-radius: 10px;
}

.suggestion-dialog::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* DARK MODE */
body.dark .suggestion-dialog {
  scrollbar-color: #586078 #252b3b;
}

body.dark .suggestion-dialog::-webkit-scrollbar-track {
  background: #252b3b;
}

body.dark .suggestion-dialog::-webkit-scrollbar-thumb {
  background: #586078;
  border-color: #252b3b;
}

body.dark .suggestion-dialog::-webkit-scrollbar-thumb:hover {
  background: #78829e;
}


/* =========================================================
   FAVORITE BUTTON
========================================================= */

.card {
  position: relative;
}

.favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;

  width: 34px;
  height: 34px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(141, 124, 255, 0.18);
  border-radius: 11px;

  background: rgba(255, 255, 255, 0.82);
  color: #9b91b5;

  font-family: "Nunito", sans-serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.favorite-button:hover {
  color: #ff668c;
  background: #fff0f4;
  border-color: rgba(255, 102, 140, 0.35);
  transform: scale(1.08);
}

.favorite-button.active {
  color: #ff668c;
  background: #fff0f4;
  border-color: rgba(255, 102, 140, 0.28);
  box-shadow: 0 2px 8px rgba(255, 102, 140, 0.12);
}

.favorite-button.active:hover {
  background: #ffe4ec;
  transform: scale(1.08);
}

.favorite-button:active {
  transform: scale(0.92);
}

.favorite-button:focus-visible {
  outline: 3px solid rgba(141, 124, 255, 0.35);
  outline-offset: 3px;
}

.favorite-button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

/* Dark mode */

body.dark .favorite-button {
  background: rgba(42, 48, 64, 0.92);
  border-color: rgba(141, 124, 255, 0.2);
  color: #a6a0bd;
}

body.dark .favorite-button:hover {
  background: #3a3047;
  border-color: rgba(255, 102, 140, 0.4);
  color: #ff7d9e;
}

body.dark .favorite-button.active {
  background: rgba(255, 102, 140, 0.13);
  border-color: rgba(255, 102, 140, 0.3);
  color: #ff7d9e;
}

body.dark .favorite-button.active:hover {
  background: rgba(255, 102, 140, 0.2);
}

/* Mobile */

@media (max-width: 600px) {
  .favorite-button {
    top: 9px;
    right: 9px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .favorite-button {
    transition: none;
  }
}

.tier-item-count {
  font-size: 0.75em;
  font-weight: 650;
  margin-left: 3px;
  white-space: nowrap;
}

/* =========================================================
   TIER HEADER HOVER EFFECT
========================================================= */

.tier-heading {
  cursor: pointer;
}

.tier-heading-content {
  cursor: pointer;
}

.tier-heading .tier-arrow {
  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* Default line transition */
.tier-section .line {
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease;
}

/* NEW */
.tier-section.tier-new .tier-heading:hover + .line {
  background: #b388ff;
  box-shadow: 0 0 8px rgba(179, 136, 255, 0.35);
}

/* SPECIAL */
.tier-section.tier-special .tier-heading:hover + .line {
  background: #C0C0C0;
  box-shadow: 0 0 8px rgba(192, 192, 192, 0.35);
}

/* RARE */
.tier-section.tier-rare .tier-heading:hover + .line {
  background: #ff6b8a;
  box-shadow: 0 0 8px rgba(255, 107, 138, 0.35);
}

/* COLLECTOR */
.tier-section.tier-collector .tier-heading:hover + .line {
  background: #D208FF;
  box-shadow: 0 0 8px rgba(210, 8, 255, 0.4);
}

/* SECRET */
.tier-section.tier-secret .tier-heading:hover + .line {
  background: #b388ff;
  box-shadow: 0 0 10px rgba(179, 136, 255, 0.45);
}

/* HIGH */
.tier-section.tier-high .tier-heading:hover + .line {
  background: #e8b86d;
  box-shadow: 0 0 8px rgba(232, 184, 109, 0.35);
}

/* MID */
.tier-section.tier-mid .tier-heading:hover + .line {
  background: #7fc9f0;
  box-shadow: 0 0 8px rgba(127, 201, 240, 0.35);
}

/* LOW */
.tier-section.tier-low .tier-heading:hover + .line {
  background: #9aa9c9;
  box-shadow: 0 0 8px rgba(154, 169, 201, 0.35);
}


/* =========================================================
   SMOOTH TIER COLLAPSE
========================================================= */

.tier-items-wrap {
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
  transition: grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.tier-items-wrap > .grid {
  min-height: 0;
  overflow: visible;
  padding: 10px 8px 18px;
  margin: 0 -8px -18px;
}

.tier-section.tier-collapsed .tier-items-wrap {
  grid-template-rows: 0fr;
}
