/* Card detail modal overlay */
.trading-card-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: linear-gradient(120deg, rgba(30,30,40,0.55) 0%, rgba(60,60,80,0.45) 100%);
  backdrop-filter: blur(20px) saturate(60%);
  -webkit-backdrop-filter: blur(20px) saturate(60%);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s;
}

/* Card detail modal content */
.trading-card-detail-content {
  background: transparent;
  max-width: 80%;
  max-height: 80dvh;
  aspect-ratio: 5/7;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trading-card-detail-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 30px;
  width: 30px;
  height: 30px;
  text-align: end;
  background: none;
  border: none;
  cursor: pointer;
  color: black;
  -webkit-tap-highlight-color: transparent;
}

.trading-card-detail-img {
  width: 100%;
  height: 100%;
}

.trading-card-detail-title {
  margin: 0 0 1rem 0;
}

.trading-card-detail-desc {
  text-align: center;
  font-size: 1.1rem;
  color: #333;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.trading-card-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  padding: 0px;
  padding-top: 100px;
  display: flex;
  justify-content: center;
  overflow-y: hidden;
  touch-action: none;
}

.trading-card-modal-content {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  width: 90vw;
  height: calc(100dvh - 200px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  position: relative;
}

.trading-card-grid-container {
  width: 100%;
  height: calc(100% - 50px);
  margin-top: 50px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 8px 12px -8px rgba(0,0,0,0.22);
  border-radius: 0 0 16px 16px;
}



  .trading-card-detail-content .trading-card-modal-card{
    border-radius: 2rem;
  }


.trading-card-modal-close {
  position: absolute;
  top: 10px;
  float: right;
  right: 10px;
  font-size: 30px;
  width: 30px;
  height: 30px;
  color: black;
  text-align: end;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
.trading-card-modal-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin: 1rem;
}

.trading-card-modal-card {
  background: #ababab;
  --s: 50px; /* control the size*/
  --c1: #737373;
  --c2: #636363;
  
  --_g: var(--c1) 90deg,#0000 90.5deg;
  background:
   conic-gradient(from -45deg,var(--_g)),
   conic-gradient(from 135deg,var(--_g)) calc(var(--s)/2) 0,
   var(--c2);
  background-size: var(--s) var(--s);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 5/7;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(.25,.8,.25,1), box-shadow 0.25s cubic-bezier(.25,.8,.25,1);
  position: relative;
}

.card-not-found-text{
  font-size: 5rem;
  font-weight: 800;
  color: white;
  text-align: center;
  line-height: 7;
}

.trading-card-modal-card img{
    width: 100%;
}

.trading-card-modal-empty {
  text-align: center;
  opacity: 0.7;
}

.trading-card-modal-top-image{
  width: 150px;
  position: absolute;
  top: 25px;
  z-index: 1000;
  left: 0;
  right: 0;
  margin: auto;
}

.trading-card-modal-message{
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

s {
		position: absolute;
		inset: 0;
    --s-o: 0.2;
    --s-s: 100%;
    --angle: 45deg;
		opacity: var(--s-o, 0);
		pointer-events: none;
		transition: --angle 0.2s, opacity 0.6s, background-size 0.3s;
		background-size: var(--s-s, 400%);
background-size: var(--s-s, 400%);
  background-image: linear-gradient(
      var(--angle, 135deg),
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0) 15%,
      rgba(255,255,255,0.9) 20%,
      rgba(255,255,255,0.9) 25%,
      rgba(255,255,255,0) 30%,
      rgba(255,255,255,0.3) 100%
    ),
    linear-gradient(
      calc(var(--angle, 135deg) - 180deg),
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0) 15%,
      rgba(255,255,255,0.8) 20%,
      rgba(255,255,255,0.8) 25%,
      rgba(255,255,255,0) 30%,
      rgba(255,255,255,0) 100%
    ),
    linear-gradient(
      var(--angle, 135deg),
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0) 30%,
      rgba(255,255,255,0.75) 33%,
      rgba(255,255,255,0.75) 33%,
      rgba(255,255,255,0) 35%,
      rgba(255,255,255,0.2) 100%
    );
	}


  .trading-card-notification {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 90vw;
  padding: 1rem 2rem;
  background: rgb(255, 255, 255);
  color: #000000;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 20000;
  opacity: 0;
  pointer-events: none;
  transition:
    top 0.5s cubic-bezier(.4,1.6,.4,1),
    opacity 0.4s cubic-bezier(.4,1.6,.4,1);
  text-align: center;
}

.trading-card-notification.show {
  top: 20px;
  opacity: 1;
  pointer-events: auto;
}


/* Floating thumbs animation style */
.trading-card-floating-thumb {
  position: fixed;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  background: #eee;
  z-index: 99999;
  pointer-events: none;
  transition:
    transform 0.8s linear(0, -0.0002, -0.0007, -0.0015, -0.0025, -0.0039, -0.0055, -0.0074, -0.0095, -0.0118, -0.0143, -0.017, -0.0198, -0.0228, -0.0259, -0.0291, -0.0325, -0.0359, -0.0393, -0.0429, -0.0464, -0.05, -0.0535, -0.0571, -0.0606, -0.0641, -0.0675, -0.0708, -0.074, -0.0771, -0.0801, -0.0829, -0.0856, -0.0881, -0.0904, -0.0925, -0.0943, -0.096, -0.0973, -0.0984, -0.0992, -0.0997, -0.0998, -0.0997, -0.0991, -0.0982, -0.0969, -0.0952, -0.0931, -0.0905, -0.0875, -0.084, -0.08, -0.0756, -0.0706, -0.065, -0.059, -0.0523, -0.0451, -0.0372, -0.0288, -0.0197, -0.01, 0.0004, 0.0115, 0.0232, 0.0357, 0.0489, 0.0629, 0.0776, 0.0931, 0.1094, 0.1265, 0.1444, 0.1632, 0.1828, 0.2033, 0.2247, 0.247, 0.2702, 0.2944, 0.3195, 0.3456, 0.3727, 0.4008, 0.4299, 0.46, 0.4912, 0.5235, 0.5568, 0.5913, 0.6269, 0.6636, 0.7014, 0.7405, 0.7807, 0.8221, 0.8647, 0.9085, 0.9536, 1),
    opacity 0.6s;
  will-change: transform, opacity;
}

/* Deck button badge for new cards */
.trading-card-deck-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  background: #e53935;
  color: #fff;
  border-radius: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s;
}

.trading-card-deck-badge span {
  font-family: inherit;
  font-size: 1.1rem;
  line-height: 1;
}

.trading-card-deck-badge.textvariant{
  width: auto;
  padding: 2px 8px;
  top: 5px;
  right: 5px;
}

.trading-card-scroll-pointer{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
    width: auto;
  padding: 4px 10px;
  background: #e53935;
  color: #fff;
  font-weight: bold;
  border-radius: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 50;
}

.trading-card-scroll-pointer.up{
  top: 60px;
}

.trading-card-scroll-pointer.down{
  bottom: 10px;
}

.new-triangle{
  font-size: 15px;
  margin-right: 5px;
}

@media (max-width: 850px) {
  .trading-card-modal-content {
    max-width: calc(100vw - 10px);
    height: calc(100dvh - 135px);
  }
    
  .trading-card-modal-top-image{
    max-width: 50%;
  }

  .trading-card-modal-grid {
    gap: 0.5rem;
    margin: 0.5rem;
    grid-template-columns: repeat(3, 1fr);
  }
  .trading-card-detail-content .trading-card-modal-card {
    border-radius: 1rem;
  }
  .trading-card-grid-container {
  height: calc(100% - 75px);
  margin-top: 75px;
  }

  .trading-card-scroll-pointer.up{
  top: 85px;
}
}