@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;600;900&display=swap');


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

body{
    margin:0;
    font-family:'Raleway',Arial,sans-serif;
    background:#7da9ff;
    color:#fff;
    overflow-x:hidden;
    height: 100vh;
    overflow-y: auto;
}

header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 20px;
    background:#7da9ff;
    box-shadow:0 4px 10px rgba(0,0,0,.2);
    border-radius:4px;
    text-shadow:-3px 3px 0 rgba(0,0,0,1);
    height:100px;
    position:relative;
}
.logo-container{
    display:flex;
    align-items:center;
    gap:15px;
    position:absolute;
    top:50%;
    left:20px;
    transform:translateY(-50%);
}
.logo-container img{height:110px;}
.logo-container h1{
    margin:0;
    font-size:45px;
    font-weight:900;
    text-shadow:-3px 3px 0 rgba(0,0,0,1);
}

nav{flex:1;}
nav ul{
    display:flex;
    align-items: center;
    justify-content: space-around;
    gap:15px;
    margin-left:550px;
    padding:0;
    list-style:none;
}

nav ul li a {
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 15px;
  transition: all 0.7s ease;
}

nav ul li a.active {
  color: #f8f9fa;
  font-size: 34px;
  font-weight: 900;
  text-shadow: 
      -3px 3px 0 rgba(0, 0, 0, 1), 
      0 0 30px rgba(255, 255, 255, 0.9);
  transform: scale(1.15);
  transition: all 0.7s ease; 
}

nav ul li a:not(.active) {
  color: #dcdcdc; 
  transform: scale(1);
  opacity: 0.8;
}

nav ul li a:hover {
  color: #ffffff; 
  opacity: 1; 
  transform: scale(1.1); 
}

.highlight-container{
    display:flex;
    justify-content:center;
    align-items:flex-start;
    gap:30px;
    margin-top:40px;
    padding:0 20px;
}

#token-details {
    width: 580px;
    min-height: 320px;
  
    background: #7ca9df;
    border: 3px solid #000;
    border-radius: 25px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
  
    padding: 25px;
  
    color: #ffffff;
    text-shadow: -2px 2px 0 rgba(0, 0, 0, 1);
  }
  
 
  #token-details .card {
    display: flex;
    gap: 25px;
    align-items: flex-start;
  }
  
  #token-details .avatar {
    width: 150px;
    height: 150px;
  
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid #333;
  }
  
  #token-details .kvpair,
  #token-details .kvblock .labels,
  #token-details .kvblock .values {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  
  #token-details .kvpair .label,
  #token-details .kvblock .labels span {
    font-size: 26px;
    font-weight: 700;
    opacity: 1;
  }
  
  #token-details .kvpair .value,
  #token-details .kvblock .values span {
    font-size: 26px;
    font-weight: 700;
  }
  
  #token-details .left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  #token-details .stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-left: 10px;
  }
  
  #token-details h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 900;
  }
  
#token-details .token-title{
    display:flex;        
    align-items:center;
    gap:8px;             
  }

  #token-details .verify-icon {
    width: 25px;
    height: 25px;
  }
  
  #token-details .copy-icon{
    width:20px;       
    height:20px;
    cursor:pointer;       
    filter:invert(1);    
    opacity:1;
    transition:opacity .5s;
  }
  #token-details .copy-icon:hover{
    opacity: 0.5;;            
  }

  
  #token-details .price-vol .labels span,
  #token-details .price-vol .values span {
    flex: 1;
  }

  #token-details .price-vol .labels {
    flex-direction: row;
    justify-content: space-between;
    text-align: center;

    margin-bottom: 10px; 
  }

  #token-details .price-vol .values {
    flex-direction: row;
    justify-content: space-between;
    text-align: center;
  }

  #token-details .changes {
    margin-top: 10px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    row-gap: 10px;  
  }

  #token-details .changes .labels,
  #token-details .changes .values {
    display: flex;
    justify-content: space-between;
    margin: 0;
  }

  #token-details .changes span {
    flex: 1;
    font-size: 22px;     
    font-weight: 650;
    text-align: center;
  }


  #token-details .changes .values span {
    font-size: 17px;      
    font-weight: 550;
  }
  
  .arrow {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: -2px;
  }
.dexscreener-icon {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.dexscreener-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.dexscreener-icon svg {
  width: 100%;
  height: 100%;
  fill: white;
}

#token-details {
  position: relative;
}

#treemap{
    width:1280px;
    height:780px;
    background:#ffe0b1;
    border:3px solid #000;
    border-radius:35px;
    box-shadow:0 8px 15px rgba(0,0,0,.2);
    display:flex;
    justify-content:center;
    align-items:center;
}

.token text{
    pointer-events:none;
    fill:#fff;
    font-weight:600;
    line-height:1.1;
    text-shadow:0 0 2px rgba(0,0,0,.65);
}
.token:hover{
    transform-box:fill-box;
    transform-origin:50% 50%;
    transform:scale(.95);
    transition:transform .2s ease-in-out;
}

/* nft */

nav ul li a.active {
  color: #fff;
  text-decoration: none;
  font-size: 34px; 
  font-weight: 900; 
  transform: scale(1.1); 
  text-shadow: 
    -3px 3px 0 rgba(0,0,0,1),
    0 0 30px rgba(255,255,255,0.9); 
  transition: all 0.4s ease;
}

#nft-details {
  width: 580px;
  min-height: 320px;
  background: #7ca9df;
  border: 3px solid #000;
  border-radius: 25px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
  padding: 25px;
  color: #ffffff;
  text-shadow: -2px 2px 0 rgba(0, 0, 0, 1);
}

#nft-details .card {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

#nft-details .avatar {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 20px;
  border: 3px solid #333;
}

#nft-details .kvpair,
#nft-details .kvblock .labels,
#nft-details .kvblock .values {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

#nft-details .kvpair .label,
#nft-details .kvblock .labels span {
  font-size: 26px;
  font-weight: 700;
  opacity: 1;
}

#nft-details .kvpair .value,
#nft-details .kvblock .values span {
  font-size: 26px;
  font-weight: 700;
}

#nft-details .left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#nft-details .stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-left: 10px;
}

#nft-details h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
}

#nft-details .token-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

#nft-details .copy-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  filter: invert(1);
  opacity: 1;
  transition: opacity .5s;
}

#nft-details .copy-icon:hover {
  opacity: 0.5;
}

#nft-details .price-vol .labels span,
#nft-details .price-vol .values span {
  flex: 1;
}

#nft-details .price-vol .labels {
  flex-direction: row;
  justify-content: space-between;
  text-align: center;
  margin-bottom: 10px;
}

#nft-details .price-vol .values {
  flex-direction: row;
  justify-content: space-between;
  text-align: center;
}

#nft-details .changes {
  margin-top: 10px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  row-gap: 10px;
}

#nft-details .changes .labels,
#nft-details .changes .values {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

#nft-details .kvblock.supply-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  margin-top: 10px;
}

#nft-details .kvblock.supply-row .label {
  color: #ffffff;
}

#nft-details .kvblock.supply-row .value {
  color: #ffffff;
}

#nft-details .changes span {
  flex: 1;
  font-size: 22px;
  font-weight: 650;
  text-align: center;
}

#nft-details .changes .values span {
  font-size: 17px;
  font-weight: 550;
}

body.nft-mode #treemap {
  background: #e6e6fa;

}

body.nft-mode #nft-details {
  background: #dda0dd;

}

body.nft-mode #nft-details {
  border-color: black;
}

body.nft-mode #nft-details .avatar {
  border-color: black;
}

.opensea-icon {
  position: absolute;
  bottom: -20px; 
  right: -15px; 
  width: 40px;
  height: 40px; 
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.3s ease;
}

.opensea-icon:hover {
  opacity: 1;
  transform: scale(1.2);
}

.opensea-icon svg {
  width: 100%;
  height: 100%;
  fill: white;
}

#nft-details {
  position: relative;
}


.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 1000;
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background: white;
  transition: 0.3s;
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}


.social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-icon:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.1);
}

.social-icon img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.social-icon svg {
  width: 25px;
  height: 25px;
  fill: white;
  transition: fill 0.3s ease;
}

.social-icon:hover img {
  filter: brightness(0) invert(0.8);
}

.social-icon:hover svg {
  fill: #f0f0f0;
}

.mobile-social-icons {
  display: none;
}


@media (max-width: 768px) {

  .burger-menu {
      display: flex;
  }
  

  .social-icons {
      display: none;
  }
  

  header {
      height: 70px;
      padding: 10px 20px;
  }
  
  .logo-container {
      left: 20px;
  }
  
  .logo-container img {
      height: 50px;
  }
  
  .logo-container h1 {
      font-size: 24px;
  }
  

  nav {
      display: none;
      position: fixed;
      top: 0;
      right: -300px;
      width: 300px;
      height: 100vh;
      background: #7da9ff;
      box-shadow: -4px 0 10px rgba(0,0,0,0.3);
      z-index: 999;
      transition: right 0.3s ease;
      padding: 80px 0 20px 0;
      flex-direction: column;
      justify-content: space-between;
  }
  
  nav.active {
      right: 0;
      display: flex;
  }
  
  nav ul {
      flex-direction: column;
      gap: 0;
      margin: 0;
      padding: 0 20px;
      flex: 1;
  }
  
  nav ul li {
      margin: 15px 0;
      text-align: center;
  }
  
  nav ul li a {
      font-size: 24px;
      padding: 15px 20px;
      display: block;
      border-radius: 8px;
      transition: background 0.3s;
  }
  
  nav ul li a:hover {
      background: rgba(255,255,255,0.1);
  }
  

  .mobile-social-icons {
      display: flex;
      justify-content: center;
      gap: 20px;
      padding: 20px;
      border-top: 1px solid rgba(255,255,255,0.2);
  }
  
  .mobile-social-icons .social-icon {
      width: 40px;
      height: 40px;
      background: rgba(255,255,255,0.1);
      border-radius: 50%;
  }
  

  .highlight-container {
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    padding: 0 15px; 
  }
  
  #treemap {
    width: 100% !important;
    height: 500px !important;
    order: 1;
    overflow: visible;
    padding: 0px 10px 10px 10px; 
    box-sizing: border-box;
    align-items: flex-start !important; 
  }
  #treemap svg {
      width: 100% !important;
      height: 480px !important;
      max-width: none !important; 
      margin: 0 !important;    
  }

  #treemap rect {
    rx: 10px !important;
    ry: 10px !important;
  }


  #token-details,
  #nft-details {
      width: 100% !important;
      min-height: 180px;
      order: 2;
  }
  

  .menu-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      z-index: 998;
  }
  
  .menu-overlay.active {
      display: block;
  }
}

@media (max-width: 480px) {
  .logo-container h1 {
      font-size: 20px;
  }
  
  .logo-container img {
      height: 40px;
  }
  
  nav {
      width: 280px;
  }
  
  nav ul li a {
      font-size: 20px;
      padding: 12px 15px;
  }
  
  #treemap {
      height: 300px;
  }
  
  .mobile-social-icons {
      gap: 15px;
  }
  
  .mobile-social-icons .social-icon {
      width: 35px;
      height: 35px;
  }
}

@media (max-width: 768px) {

  #token-details, #nft-details {
    overflow: hidden;
    box-sizing: border-box;
  }

  #token-details .card, #nft-details .card {
    overflow: hidden;
    box-sizing: border-box;
  }

  #token-details .card {
    display: flex;
    gap: 3px;
    align-items: flex-start;
  }

  #token-details .avatar {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid #333;
  }

  #token-details .kvpair,
  #token-details .kvblock .labels,
  #token-details .kvblock .values {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }

  #token-details .kvpair .label,
  #token-details .kvblock .labels span {
    font-size: 16px;
    font-weight: 700;
    opacity: 1;
    max-width: 100%;
    overflow: visible;
  }

  #token-details .kvpair .value,
  #token-details .kvblock .values span {
    font-size: 16px;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
  }

  #token-details .left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 130px;
    max-width: 130px;
  }

  #token-details .stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-left: 10px;
    min-width: 0;
    overflow: hidden;
  }

  #token-details h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.2em;
    max-width: 100%;
    line-height: 1.1;
  }

  #token-details .token-title{
    display:flex;        
    align-items:center;
    gap:8px;             
  }

  #token-details .verify-icon {
    width: 25px;
    height: 25px;
  }

  #token-details .copy-icon{
    width:20px;       
    height:20px;
    cursor:pointer;       
    filter:invert(1);    
    opacity:1;
    transition:opacity .5s;
  }

  #token-details .copy-icon:hover{
    opacity: 0.5;
  }

  #token-details .price-vol .labels span,
  #token-details .price-vol .values span {
    flex: 1;
  }

  #token-details .price-vol .labels {
    flex-direction: row;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 10px; 
  }

  #token-details .price-vol .values {
    flex-direction: row;
    justify-content: space-between;
    text-align: center;
  }

  #token-details .kvblock .values span {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
  }

  #token-details .changes {
    margin-top: -14px;
    margin-bottom: 5px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    row-gap: 10px;  
  }

  #token-details .changes .labels,
  #token-details .changes .values {
    display: flex;
    justify-content: space-between;
    margin: 0;
  }

  #token-details .changes span {
    flex: 1;
    font-size: 16px;     
    font-weight: 650;
    text-align: center;
  }

  #token-details .changes .values span {
    font-size: 15px;      
    font-weight: 550;
  }

  #token-details .kvpair.mkcap {
    max-width: 130px;
    overflow: hidden;
  }

  #token-details .kvpair.mkcap .label,
  #token-details .kvpair.mkcap .value {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  .dexscreener-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.2s ease;
  }

  .dexscreener-icon:hover {
    opacity: 1;
    transform: scale(1.1);
  }

  .dexscreener-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
  }

  #token-details {
    position: relative;
  }

  #nft-details .card {
    display: flex;
    gap: 7px;
    align-items: flex-start;
  }

  #nft-details .avatar {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid #333;
  }

  #nft-details .kvpair,
  #nft-details .kvblock .labels,
  #nft-details .kvblock .values {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }

  #nft-details .kvpair .label,
  #nft-details .kvblock .labels span {
    font-size: 18px;
    font-weight: 700;
    opacity: 1;
    max-width: 100%;
    overflow: visible;
  }

  #nft-details .kvpair .value,
  #nft-details .kvblock .values span {
    font-size: 18px;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
  }

  #nft-details .left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 130px;
    max-width: 130px;
  }

  #nft-details .stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 10px;
    min-width: 0;
    overflow: hidden;
    padding-bottom: 20px;
  }

  #nft-details h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.2em;
    max-width: 100%;
    line-height: 1.1;
  }

  #nft-details .token-title {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  #nft-details .copy-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    filter: invert(1);
    opacity: 1;
    transition: opacity .5s;
  }

  #nft-details .copy-icon:hover {
    opacity: 0.5;
  }

  #nft-details .price-vol .labels span,
  #nft-details .price-vol .values span {
    flex: 1;
  }

  #nft-details .price-vol .labels {
    flex-direction: row;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 8px;
  }

  #nft-details .price-vol .values {
    flex-direction: row;
    justify-content: space-between;
    text-align: center;
  }

  #nft-details .kvblock .values span {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
  }

  #nft-details .changes {
    margin-top: 8px;
    margin-bottom: 5px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    row-gap: 10px;
  }

  #nft-details .changes .labels,
  #nft-details .changes .values {
    display: flex;
    justify-content: space-around;
    margin: 0;
  }

  #nft-details .changes span {
    flex: 1;
    font-size: 18px;
    font-weight: 650;
    text-align: center;
    min-width: 60px;
  }

  #nft-details .changes .values span {
    font-size: 17px;
    font-weight: 550;
  }

  #nft-details .kvblock.supply-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 18px;
    font-weight: 700;
    margin-top: 6px;
    text-align: center;
    max-width: 130px;
    overflow: hidden;
  }

  #nft-details .kvblock.supply-row .label {
    color: #ffffff;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  #nft-details .kvblock.supply-row .value {
    color: #ffffff;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  #nft-details .kvpair.mkcap {
    max-width: 130px;
    overflow: hidden;
  }

  #nft-details .kvpair.mkcap .label,
  #nft-details .kvpair.mkcap .value {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  .opensea-icon {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.2s ease;
  }

  .opensea-icon:hover {
    opacity: 1;
    transform: scale(1.1);
  }

  .opensea-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
  }

  #nft-details {
    position: relative;
  }

}


.pnl-search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px auto 40px auto;
  max-width: none; 
  padding: 0 20px;
  width: 100vw; 
  position: relative;
}

.pnl-title {
  font-family: 'Raleway', sans-serif;
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  text-shadow: -3px 3px 0 rgba(0, 0, 0, 1);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.4;
}

.address-input-container {
  display: flex;
  gap: 15px;
  width: 100%;
  max-width: 600px;
}

.address-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 25px;
  border: none;
  background: white;
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.address-input:focus {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.address-input::placeholder {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  color: #999;
}

.check-btn {
  padding: 12px 25px;
  border-radius: 25px;
  border: none;
  background: #98f78f;
  color: white;
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(152, 247, 143, 0.3);
  white-space: nowrap;
  letter-spacing: 1.5px;
  text-shadow: -1px 1px 0 rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
}

.check-btn:hover {
  background: #85e87a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(152, 247, 143, 0.4);
}

.check-btn:disabled {
  background: #ccc !important;
  cursor: not-allowed;
  transform: none;
}

.check-btn:disabled:hover {
  background: #ccc !important;
  box-shadow: none;
}





/* Card container with smooth transitions */
.pnl-card-container {
  position: relative;
  width: 800px;
  height: 500px;
  margin: 0;
}

.pnl-skeleton-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  opacity: 1;
  z-index: 2;
  transition: opacity 0.5s ease-in-out;
}

.pnl-skeleton-card.fade-out {
  opacity: 0;
}

.pnl-visual-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.5s ease-in-out;
}

.pnl-visual-card.fade-in {
  opacity: 1;
}

/* Skeleton background */
.skeleton-background-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.skeleton-blur-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.skeleton-background-layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1px) brightness(0.7);
}

.skeleton-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(240, 240, 240, 0.3);
  z-index: 2;
  backdrop-filter: blur(1px);
}

/* Skeleton elements positioned exactly like real card elements */
.skeleton-line {
  position: absolute;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3) 25%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.3) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-user-avatar {
  position: absolute;
  top: 70px;
  left: 90px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255,255,255,0.3) 25%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.3) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border: 3px solid rgba(255, 255, 255, 0.5);
}

.skeleton-user-nickname {
  top: 210px;
  left: 80px;
  width: 160px;
  height: 25px;
}

.skeleton-profit-label {
  top: 90px;
  left: 250px;
  width: 120px;
  height: 35px;
}

.skeleton-profit-value {
  top: 150px;
  left: 250px;
  width: 180px;
  height: 45px;
}

.skeleton-token-name {
  top: 250px;
  width: 120px;
  height: 30px;
}

.skeleton-token-name-1 { left: 250px; }
.skeleton-token-name-2 { left: 395px; }
.skeleton-token-name-3 { left: 545px; }

.skeleton-token-pnl {
  top: 310px;
  width: 120px;
  height: 30px;
}

.skeleton-token-pnl-1 { left: 250px; }
.skeleton-token-pnl-2 { left: 395px; }
.skeleton-token-pnl-3 { left: 545px; }

.skeleton-token-percent {
  top: 355px;
  width: 100px;
  height: 25px;
}

.skeleton-token-percent-1 { left: 260px; }
.skeleton-token-percent-2 { left: 405px; }
.skeleton-token-percent-3 { left: 555px; }

@keyframes skeleton-loading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
.main-card-flex {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin: 30px 0;
  position: relative;
  min-height: 600px;
}


.background-gallery {
  position: absolute; 
  left: 70px; 
  top: 33px;
  width: 400px;
  z-index: 1;
}

.bg-thumb {
  width: 185px;
  height: 125px;
  border-radius: 22px;
  cursor: pointer;
  border: 3px solid transparent;
  object-fit: cover;
  transition: border 0.17s, box-shadow 0.18s;
  box-shadow: 0 2px 14px rgba(0,0,0,0.09);
}
.bg-thumb.active {
  border: 3px solid white;
  box-shadow: 0 6px 30px rgba(70, 125, 87, 0.14);
}

.gallery-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 25px;
  width: 400px;
  align-content: start;
}



.pagination-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

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

.background-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.card-with-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin: -20px 0 0 0;
}

.token-selector-container {
  width: 300px;
  text-align: center;
  position: absolute;
  right: 120px;
  bottom: 0;
  top: -50px;
  z-index: 1;
}

.token-selector-title {
  font-size: 18px;
  font-weight: 900;
  color: white;
  margin-bottom: 20px;
  text-shadow: -2px 2px 0 rgba(0, 0, 0, 0.8);
}

.token-search-container {
  position: relative;
  margin-bottom: 15px;
}

.token-search-input {
  width: 100%;
  padding: 10px 35px 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.token-search-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.token-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.token-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  color: white;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.token-search-clear:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.token-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr); 
  gap: 10px;
  margin-bottom: 20px;
  align-content: start;
}

.token-selector-item {
  background: linear-gradient(135deg, #6c757d, #495057);
  border: 2px solid #000;
  border-radius: 15px;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
  font-size: 14px;
  color: white; 
  text-shadow: -1px 1px 0 rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
  opacity: 0.6; 
}

.token-selector-item:hover:not(.selected):not(.hidden-scam) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0.8;
}

.token-selector-item.selected {
  opacity: 1 !important; 
  color: white !important; 
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border-color: black; 
}

.token-selector-item.selected.gainer {
  background: linear-gradient(135deg, #4ecdc4, #44a08d) !important;
  border-color: #2c3e50;
}
.token-selector-item.selected.loser {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e) !important;
  border-color: #c0392b;
}
.token-selector-item.selected.neutral {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
  border-color: #34495e;
}

.token-selector-item.hidden-scam {
  background: linear-gradient(135deg, #6c757d, #495057) !important;
  opacity: 0.6;
  cursor: not-allowed !important;
  position: relative;
}

.token-selector-item.hidden-scam::after {
  content: '🚫';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  opacity: 0.8;
}

.token-selector-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.token-pagination-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

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


.scam-filter-container {
  margin-top: 25px;
  text-align: center;
}

.scam-filter-title {
  font-size: 16px;
  font-weight: 900;
  color: white;
  margin-bottom: 15px;
  text-shadow: -2px 2px 0 rgba(0, 0, 0, 0.8);
}


.scam-search-container {
  position: relative;
  margin-bottom: 15px;
}

.scam-search-input {
  width: 100%;
  padding: 10px 35px 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.scam-search-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.scam-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.scam-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  color: white;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.scam-search-clear:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.scam-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
  align-content: start;
}

.scam-filter-item {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  border: 2px solid #000;
  border-radius: 15px;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
  font-size: 14px;
  color: white;
  text-shadow: -1px 1px 0 rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
}

.scam-filter-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.scam-filter-item.gainer {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.scam-filter-item.loser {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
}

.scam-filter-item.neutral {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.scam-filter-item.already-hidden {
  background: linear-gradient(135deg, #6c757d, #495057);
  opacity: 0.6;
  cursor: pointer;
  position: relative;
}

.scam-filter-item.already-hidden::after {
  content: '✗';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 12px;
  color: white;
  opacity: 0.8;
}

.scam-filter-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.scam-pagination-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scam-pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

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

#mode-controls {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: flex-start;
  justify-content: left;
}

#export-controls, #dom-export-controls {
  display: flex;
  width: 100%;
  align-items: flex-end;
  justify-content: right;
}

.export-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  margin: 0;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 110px;
  justify-content: center;
}
.export-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

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

.mode-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  margin: 0;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 110px;
  justify-content: center;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}



.card-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gainer-layer {
  display: none;
}

.text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  pointer-events: none;
}

.text-base {
  font-family: 'TTTrailers Black', 'Arial Black', sans-serif;
  font-weight: 900;
  color: white;
  -webkit-text-stroke: 0.5px black;
  text-stroke: 0.5px black;
  text-shadow: -3px 3px 0px rgba(0, 0, 0, 0.8);
  position: absolute;
}

.profit-label {
  top: 80px;        
  left: 250px;     
  font-size: 45px; 
  text-align: center;
}

.profit-value {
  top: 137px;      
  left: 250px;     
  font-size: 70px; 
  text-align: center;
}

.profit-positive {
  color: #90ff90 !important;
  -webkit-text-fill-color: #90ff90;
}

.profit-negative {
  color: #ff9090 !important;
  -webkit-text-fill-color: #ff9090;
}

.token-name {
  top: 237px;       
  font-size: 38px; 
  text-align: center;
  width: 150px;
  color: white !important;
  -webkit-text-fill-color: white;
}

.token-name-small {
  font-size: 34px !important;
}

.token-name-tiny {
  font-size: 30px !important; 
}

.token-name-1 { left: 240px; }  
.token-name-2 { left: 385px; } 
.token-name-3 { left: 535px; }  

.token-pnl {
  top: 301px;       
  font-size: 38px; 
  text-align: center;
  width: 150px;
}

.token-pnl-1 { left: 240px; }    
.token-pnl-2 { left: 385px; }   
.token-pnl-3 { left: 535px; }    

.token-pnl-positive {
  color: #90ff90 !important;
  -webkit-text-fill-color: #90ff90;
}

.token-pnl-negative {
  color: #ff9090 !important;
  -webkit-text-fill-color: #ff9090;
}

.token-percent {
  top: 345px;      
  font-size: 32px; 
  text-align: center;
  width: 150px;
  color: white !important;
  -webkit-text-fill-color: white;
}

.token-percent-1 { left: 240px; }
.token-percent-2 { left: 385px; }
.token-percent-3 { left: 535px; }


.user-avatar-image {
  position: absolute;
  top: 70px;     
  left: 90px;   
  width: 130px;    
  height: 130px;   
  object-fit: cover;
  border-radius: 50%; 
  z-index: 15;    
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); 
}


.user-nickname {
  position: absolute;
  top: 200px;   
  left: 80px;    
  width: 160px;  
  text-align: center;
  font-family: 'TTTrailers Black', 'Arial Black', sans-serif;
  font-weight: 900;
  color: white; 
  -webkit-text-stroke: 1px black;
  text-stroke: 1px black;
  text-shadow: -2px 2px 0px rgba(0, 0, 0, 0.8); 
  z-index: 30; 
  background: none !important;
  padding: 5px;
  border: none;
  border-radius: 0;
  
  font-size: clamp(24px, 4vw, 36px);
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#default-avatar::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  background: red;
  z-index: 999;
}
@media (max-width: 768px) {
  .pnl-search-container {
    width: 100%;
    margin: 40px auto 30px auto;
    padding: 0 15px;
  }

  .pnl-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .address-input-container {
    flex-direction: column;
    max-width: 100%;
  }

  .address-input, .check-btn {
    padding: 14px 18px;
    font-size: 15px;
  }

  .pnl-card-container {
    width: 800px;
    height: 500px;
    zoom: 0.45; 
    margin: 0 auto;
  }
  

  @media (max-width: 480px) {
    .pnl-card-container {
      zoom: 0.42;
    }
  }
  
  @media (min-width: 481px) and (max-width: 768px) {
    .pnl-card-container {
      zoom: 0.5;
    }
  }

  .controls-container {
    flex-direction: column !important;
    gap: 8px !important; 
    margin: 15px auto 10px auto !important; 
    padding: 0 20px !important;
    align-items: center !important;
  }
  
  .main-card-flex {
    margin: 0 !important;
    min-height: auto !important;
  }
  
  .card-with-controls {
    margin: 0 !important;
  }
  
  .mode-btn {
    min-width: auto !important;
  }

  #background-controls {
    display: none !important;
  }
  

  #mode-controls {
    order: 1 !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 !important;
    margin-bottom: 10px !important;
  }
  
  #export-controls, #dom-export-controls {
    order: 3 !important;
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }


  .bg-btn {
    font-size: 12px !important;
    padding: 6px 10px !important;
    margin: 0 3px !important;
    margin-bottom: 0 !important;
  }


  .export-btn {
    padding: 6px 10px !important;
    min-width: 80px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 3px !important;
    margin-bottom: 0 !important;
    justify-content: center !important;
    align-items: center !important; 
    border-radius: 8px !important;
    display: flex !important;
    font-size: 12px !important;
  }
  
  .btn-icon {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    position: static !important; 
    text-indent: 0 !important;
    flex-shrink: 0 !important; 
  }


  .mobile-card-container {
    margin: 10px auto !important; 
  }
  
  #background-gallery {
    display: none !important;
  }



}




.controls-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 5px auto 2px auto;
  padding: 0 10px; 
}
#background-controls {
  text-align: left;
}
#export-controls, #dom-export-controls {
  text-align: right;
}
#dom-export-controls {
  margin-top: 20px;
}

.export-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  margin: 0 5px;
  margin-bottom: 0;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  
  display: inline-flex;
  align-items: center;
  gap: 4px;
  
  min-width: 110px;
  justify-content: center;
}

.export-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.export-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}




.mobile-card-container {
  display: flex;
  justify-content: center;
  margin: 20px auto;
  padding: 0 15px;
}

.mobile-card-img {
  width: 90%;
  max-width: 400px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

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

/* Hide PNL settings containers at <= 1600px and show drawer */
@media (max-width: 1600px) {
  .token-selector-container {
    display: none !important;
  }
  
  .scam-filter-container {
    display: none !important;
  }
}
  .drawer-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 0;
    min-width: 110px;
    gap: 4px;
  }

  .drawer-trigger:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
  }

  .mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #7da9ff 0%, #6b9aee 100%);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow: hidden;
    box-shadow: -4px 0 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
  }

  .mobile-drawer.open {
    right: 0;
  }

  .drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .drawer-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.1);
    flex-shrink: 0;
  }

  .drawer-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 900;
    text-shadow: -2px 2px 0 rgba(0, 0, 0, 0.8);
  }

  .drawer-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

  .drawer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
  }

  .drawer-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
  }

  .drawer-section {
    margin-bottom: 25px;
  }

  .drawer-section:last-child {
    margin-bottom: 0;
  }

  .drawer-section-title {
    font-size: 16px;
    font-weight: 900;
    color: white;
    text-shadow: -2px 2px 0 rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1px;
  }

  .drawer-content .token-selector-container,
  .drawer-content .scam-filter-container {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .drawer-content .token-selector-title,
  .drawer-content .scam-filter-title {
    display: none !important;
  }

  .drawer-content .token-search-container,
  .drawer-content .scam-search-container {
    margin-bottom: 15px !important;
  }

  .drawer-content .token-selector-grid,
  .drawer-content .scam-filter-grid {
    margin-bottom: 15px !important;
    grid-template-rows: repeat(3, 1fr) !important;
    align-content: start !important;
  }

  .drawer-content .background-gallery {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    z-index: auto !important;
  }

  .drawer-content .background-gallery .gallery-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-bottom: 15px !important;
    align-content: start !important;
  }

  .drawer-content .background-gallery .bg-thumb {
    width: 100% !important;
    height: 60px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
  }

  .drawer-content .background-gallery .bg-thumb.active {
    border: 2px solid white !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.05) !important;
  }

  .drawer-content .background-gallery .bg-thumb:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2) !important;
  }

  .drawer-bg-pagination {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }

  .drawer-bg-pagination-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    min-width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .drawer-bg-pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
  }

  .drawer-bg-pagination-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
  }


@media (min-width: 769px) {
  .mobile-card-container {
      display: none !important;
  }
}

/* Hide drawer elements only at > 1600px */
@media (min-width: 1601px) {
  .drawer-trigger,
  .mobile-drawer,
  .drawer-overlay {
    display: none !important;
  }
}
@media (min-width: 1601px) {
  #pengu-details .drawer-trigger,
  #pengu-details .mobile-drawer,
  #pengu-details .drawer-overlay {
    display: block !important;
  }
}

/* PENGU Dominance charts layout */
#pengu-details {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 45px;
  box-sizing: border-box;
}

  .dom-charts-wrapper {
    display: grid;
    grid-template-columns: minmax(220px, 25%) 1fr;
    column-gap: 5%;
    align-items: start;
    margin: 12px 0 0 0;
    width: 100%;
    box-sizing: border-box;
  }

  .dom-donut {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 360px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.08);
    border: 3px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    box-shadow: 0 8px 15px rgba(0,0,0,0.25);
    align-self: start;
    justify-self: center;
  }

  .dom-chart {
    position: relative;
    border-radius: 18px;
    padding: 12px;
    background: linear-gradient(rgba(125,169,255,0.35), rgba(125,169,255,0.35)), url('../images/gallery-2.jpg') center/cover no-repeat;
    overflow: hidden;
  }

.dom-donut canvas { width: 100% !important; height: 100% !important; display: block;}
.dom-chart canvas { width: 100% !important; display: block; height: 500px; }

@media (max-width: 900px) {
  .dom-charts-wrapper {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 12px;
    padding: 0 5%;
  }
}

/* PENGU Dominance typography (align to PnL checker) */
.dom-title {
  font-family: 'Raleway', Arial, sans-serif;
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  text-shadow: -3px 3px 0 rgba(0, 0, 0, 1);
  line-height: 1.1;
  position: relative;
}

.dom-title .dom-subtitle {
  display: block;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.95;
}

.dom-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: 5px;
}

.period-switcher { 
  position: absolute;
  top: 33px;
  right: 150px;
  display: inline-flex; 
  gap: 8px; 
  margin-left: 0;
}

.drawer-trigger {
  margin-left: 0 !important;
}

.period-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: -1px 1px 0 rgba(0, 0, 0, 0.8);
}
.period-btn.active { background: rgba(255, 255, 255, 0.35); border-color: rgba(255, 255, 255, 0.7); }

.dom-metrics { 
  display: flex; 
  gap: 10px 16px; 
  padding-top: 15px; 
  margin: 0 0 20px 40px; 
}
.dom-metrics .metric .label { 
  font-size: 20px; 
  font-weight: 800; 
  opacity: 0.95; 
  text-shadow: -3px 3px 0 rgba(0,0,0,1); 
}
.dom-metrics .metric .value { 
  font-size: 18px; 
  font-weight: 900; 
}

/* removed dom-list top section */

#dom-settings-btn {
  position: absolute;
  top: 33px;
  right: 0;
}

@media (max-width: 900px) {
  #pengu-details {
    padding: 20px !important;
  }

  .dom-charts-wrapper {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 12px;
    padding: 0 !important;
    position: relative;
  }

  .period-switcher { 
    position: absolute;
    top: 375px;
    left: 40%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0;
    z-index: 10;
  }

  #dom-settings-btn {
    position: absolute !important;
    top: 375px !important;
    left: 80% !important;
    margin: 0 !important;
    z-index: 10;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 !important;
    font-size: 0 !important;
    text-align: center !important;
    line-height: 30px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    flex: none !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
  }

  #dom-settings-btn::before {
    content: "⚙️" !important;
    font-size: 16px !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  .dom-chart {
    margin-top: 60px;
    padding: 8px !important;
  }

  .dom-chart canvas { 
    width: 100% !important; 
    display: block; 
    height: 300px !important;
  }

  .dom-donut {
    max-width: 250px !important;
  }

  .period-btn {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 6px;
  }

  .dom-metrics { 
    display: flex; 
    gap: 10px 16px; 
    padding-top: 15px; 
    margin: 0 0 20px 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .dom-title {
    font-size: 24px;
    text-align: center;
  }

  .dom-metrics .metric .label { 
    font-size: 16px; 
  }

  .dom-metrics .metric .value { 
    font-size: 14px; 
  }
}