/* ============================== */
/* 🌍 BASE */
/* ============================== */

body {
  background: #0b0f1a;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(236,72,153,0.25), transparent),
    radial-gradient(circle at 80% 30%, rgba(56,189,248,0.25), transparent),
    radial-gradient(circle at 50% 0%, rgba(250,204,21,0.2), transparent),
    #020617;

  color: white;
}

h1 {
  margin-top: 20px;
}

.section {
  margin-top: 30px;
  font-size: 22px;
  color: #38bdf8;
}

/* ============================== */
/* 📦 LAYOUT */
/* ============================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 90%;
  max-width: 1200px;
  margin-top: 20px;
  
}

#cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  width: 90%;
  max-width: 1200px;
  margin: 40px auto;
}

/* ============================== */
/* 🧩 CARTAS */
/* ============================== */

.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;

  will-change: transform;
  transform-style: preserve-3d;

  position: relative;
  
  transition: transform 0.1s ease;
  will-change: transform;
  
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  padding: 15px;
  text-align: center;

  width: 100%;
  max-width: 260px;

  margin: 0 auto;
}


.card:hover {
  transform: translateY(-6px) scale(1.02);

  transform: perspective(600px) rotateX(4deg) rotateY(-4deg);

  box-shadow:
    0 10px 25px rgba(0,0,0,0.5),
    0 0 20px rgba(168,85,247,0.3);
  
}

.card img {
  width: 100%;
  max-width: 180px;
  margin: 0 auto 10px;
  display: block;
}

.info {
  margin: 10px 0;
}

/* 🔥 FILAS DE ICONO + INPUT */
.row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.row span {
  width: 18px;
  opacity: 0.85;
  font-size: 14px;
}


.price-input {
  display: flex;
  align-items: center;
  background: #020617;
  border-radius: 6px;
  padding: 3px 6px;
  gap: 4px;
}

.price-input input {
  width: 40px;
  border: none;
  background: transparent;
  color: white;
  text-align: center;
  outline: none;
  font-size: 13px;
}

.euro {
  font-size: 12px;
  opacity: 0.7;
}

/* ============================== */
/* 🔗 LINKS */
/* ============================== */

a {
  display: inline-block;
  margin-top: 6px;
  color: #38bdf8;
  text-decoration: none;
}

/* ============================== */
/* 📝 INPUTS */
/* ============================== */

/* 🔥 INPUTS LIMPIOS */
input[type="text"],
input[type="date"] {
  width: 80px;
  padding: 5px;
  border-radius: 6px;
  border: none;
  background: #020617;
  color: white;
  text-align: center;
}

/* 🔥 CHECKBOX */
input[type="checkbox"] {
  transform: scale(1.2);
}

/* ============================== */
/* 🧠 HEADER / TEXTOS */
/* ============================== */

.title {
  margin-top: 25px;
  font-size: 32px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 1px;
}

.title span {
  color: #38bdf8;
}

.subtitle {
  font-size: 14px;
  color: #94a3b8;
}

.stats {
  margin-top: 10px;
  font-size: 16px;
  color: #94a3b8;
}

/* ============================== */
/* 📊 PROGRESO */
/* ============================== */

.progress-bar {
  width: 300px;
  height: 10px;
  background: #1e293b;
  border-radius: 10px;
  margin: 10px auto 20px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: #38bdf8;
  transition: width 0.3s ease;
}

/* ============================== */
/* 🎴 ESTADOS */
/* ============================== */

.card.good {
  border-color: #22c55e;
  box-shadow: 0 0 18px rgba(34,197,94,0.7);
}

.card.bad {
  border-color: #ef4444;
  box-shadow: 0 0 18px rgba(239,68,68,0.7);
}

.card.sniper {
  border-color: #a855f7;
  animation: sniperGlow 1.5s infinite alternate;
}

@keyframes sniperGlow {
  from { box-shadow: 0 0 10px rgba(168,85,247,0.4); }
  to   { box-shadow: 0 0 18px rgba(168,85,247,1); }
}

.card.good {
  border-color: #22c55e;
  box-shadow: 
    0 0 18px rgba(34, 197, 94, 0.7),
    0 0 18px rgba(34, 197, 94, 0.4);
}

.card.bad {
  border-color: #ef4444;
  box-shadow: 
    0 0 18px rgba(239, 68, 68, 0.7),
    0 0 18px rgba(239, 68, 68, 0.4);
}

.badge {
  font-size: 12px;
  color: #a855f7;
  margin-bottom: 6px;
  display: none;
  font-weight: bold;
}

.card.sniper {
  border-color: #a855f7;
  animation: sniperGlow 1.5s infinite alternate;
}

@keyframes sniperGlow {
  0% {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
  }
  100% {
    box-shadow: 0 0 18px rgba(168, 85, 247, 1);
  }
}



.box {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 3px;
}

.box.sniper { background: #a855f7; }
.box.good { background: #22c55e; }
.box.bad { background: #ef4444; }

/* ============================== */
/* ✨ EFECTOS */
/* ============================== */

.tooltip {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: #020617;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.card:hover .tooltip {
  opacity: 1;
}

/* ============================== */
/* 🏆 RANKING */
/* ============================== */

.ranking-box {
  margin: 20px auto;
  padding: 15px;
  width: 300px;
  background: #1e293b;
  border-radius: 14px;
  border: 2px solid #334155;
  box-shadow: 0 8px 18px rgba(0,0,0,0.6);
}

.ranking-box {
  background: rgba(30, 41, 59, 0.8);
  border-radius: 20px;

  border: 1px solid rgba(148,163,184,0.2);

  box-shadow:
    0 10px 30px rgba(0,0,0,0.6),
    0 0 20px rgba(250,204,21,0.15);

  transform: translateY(0);
  transition: all 0.25s ease;
}

.ranking-box:hover {
  transform: translateY(-4px);
}

.ranking-title {
  font-weight: 700;
  letter-spacing: 1px;

  color: #facc15;

  text-shadow:
    0 0 10px rgba(250,204,21,0.4),
    0 0 20px rgba(250,204,21,0.2);
}

#rankingList {
  list-style: none;
  padding: 0;
}

#rankingList li {
  margin: 6px 0;
  padding: 8px;
  border-radius: 8px;
  background: #020617;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

/* 🥇 */
#rankingList li:nth-child(1) {
  border-left: 4px solid gold;
}

/* 🥈 */
#rankingList li:nth-child(2) {
  border-left: 4px solid silver;
}

/* 🥉 */
#rankingList li:nth-child(3) {
  border-left: 4px solid #cd7f32;
}

/* estados */
.rank-sniper { color: #a855f7; }
.rank-good { color: #22c55e; }
.rank-bad { color: #ef4444; }

#sortBtn {
  margin: 15px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #38bdf8;
  color: #020617;
  cursor: pointer;
  font-weight: bold;
}

#sortBtn:hover {
  background: #0ea5e9;
}

.condition-row select {
  border-radius: 6px;
  padding: 3px;
  background: #020617;
  color: white;
}

/* colores dinámicos */
select[data-cond="PO"] { color: #ef4444; }
select[data-cond="PL"] { color: #f97316; }
select[data-cond="LP"] { color: #eab308; }
select[data-cond="GD"] { color: #22c55e; }
select[data-cond="EX"] { color: #38bdf8; }

/* ============================== */
/* 📜 HISTORIAL */
/* ============================== */

.history-panel {
  margin-top: 20px;
  text-align: center;
}

/* botón principal */
#toggleHistory {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

#toggleHistory:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(56,189,248,0.6);
}

/* caja */
.history-box {
  margin-top: 15px;
  padding: 15px;
  background: #020617;
  border-radius: 15px;
  border: 1px solid #1e293b;
  box-shadow: 0 10px 18px rgba(0,0,0,0.6);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* oculto */
.hidden {
  display: none;
}

/* botones dentro */
.history-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.history-actions button {
  background: #0f172a;
  border: 1px solid #334155;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.history-actions button:hover {
  border-color: #38bdf8;
}

/* textarea PRO */
.history-box textarea {
  width: 100%;
  background: #020617;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  resize: none;
  font-family: monospace;
  font-size: 13px;
}

/* BOTONES HISTORIAL */
.history-actions button {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.history-actions button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(56,189,248,0.5);
}



#clearHistory {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

#saveLog {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.history-entry {
  position: relative;
  margin-bottom: 10px;
}

.delete-entry {
  position: absolute;
  right: 5px;
  top: 5px;
  background: #ef4444;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px 6px;
}

/* ============================== */
/* 💰 MONEY */
/* ============================== */

.money-block {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.money-block span {
  font-weight: bold;
}

.money-card {
  background: rgba(15,23,42,0.7);
  border-radius: 16px;
  padding: 15px;

  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}

.money-card:nth-child(1) {
  box-shadow: 0 0 18px rgba(168,85,247,0.5);
}

.money-card:nth-child(2) {
  box-shadow: 0 0 18px rgba(250,204,21,0.5);
}

.money-card:nth-child(3) {
  box-shadow: 0 0 18px rgba(34,197,94,0.5);
}

.money-title {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 5px;
}

.money-value {
  font-size: 18px;
  font-weight: bold;
}

.legend-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;

  margin: 10px 0 20px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;

  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;

  font-size: 12px;
  color: #cbd5f5;

  border: 1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(10px);

  white-space: nowrap;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.sniper-dot { background: #a855f7; }
.good-dot { background: #22c55e; }
.bad-dot { background: #ef4444; }


.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.6);
}

.card.sniper {
  border: 1px solid #a855f7;
  box-shadow: 0 0 10px rgba(168,85,247,0.6);
}

button {
  border-radius: 14px;

  box-shadow: 0 5px 15px rgba(0,0,0,0.4);

  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 8px 25px rgba(0,0,0,0.6),
    0 0 15px rgba(56,189,248,0.4);
}
.card.sniper {
  border: 1px solid var(--purple);
  box-shadow: 0 0 10px rgba(168,85,247,0.4);
}

.card.good {
  border: 1px solid var(--green);
}

.card.bad {
  border: 1px solid var(--red);
}

#cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;

  width: 90%;
  max-width: 1200px;
  margin: 40px auto;
}

.history-day {
  border: 1px solid #1f2937;
  border-radius: 10px;
  margin: 10px 0;
  overflow: hidden;
}

.history-header {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  cursor: pointer;
  background: #111827;
}

.history-content {
  padding: 10px;
  background: #020617;
}

.hidden {
  display: none;
}

.delete-day {
  background: #ef4444;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

/* 🎴 CALIDADES MEJORADAS */

.card[data-cond="PO"] {
  border-color: #374151;
  box-shadow: 0 0 8px rgba(55,65,81,0.5);
}

.card[data-cond="PL"] {
  border-color: #92400e;
  box-shadow: 0 0 10px rgba(146,64,14,0.5);
}

.card[data-cond="LP"] {
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59,130,246,0.6);
}

.card[data-cond="GD"] {
  border-color: #ec4899;
  box-shadow: 
    0 0 15px rgba(236,72,153,0.7),
    0 0 18px rgba(236,72,153,0.4);
}

/* ✨ EX - HOLO PREMIUM */

.card[data-cond="EX"] {
  border: 1px solid #facc15;
  position: relative;
  overflow: hidden;

  box-shadow: 
    0 0 18px rgba(250,204,21,0.9),
    0 0 25px rgba(250,204,21,0.6),
    0 0 30px rgba(250,204,21,0.3);
}

/* 🎨 CAPA HOLO */
.card[data-cond="EX"]::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    120deg,
    rgba(255,0,150,0.5),
    rgba(0,255,255,0.5),
    rgba(255,255,0,0.5),
    rgba(0,255,150,0.5)
  );

  background-size: 300% 300%;
  mix-blend-mode: color-dodge;
  opacity: 0.2;

  animation: holoShift 4s linear infinite;
  pointer-events: none;
}

/* ✨ ANIMACIÓN */
@keyframes holoShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 200% 50%; }
}

.bought-item {
  margin-bottom: 10px;
  padding: 8px;
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1f2937;
}

.binder-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  z-index: 999;
}

.binder-btn:hover {
  transform: scale(1.05);
}

/* ============================== */
/* 📕 BINDER (ÁLBUM POKÉMON) */
/* ============================== */

#binderView {
  display: grid;
  display: grid;
  grid-template-columns: repeat(3, 200px);
  justify-content: center;
  gap: 25px;
  gap: 20px;
  padding: 40px;
  max-width: 800px;
  margin: 20px auto;

  background: #020617;
  background: radial-gradient(circle at center, #020617, #000);
  border-radius: 16px;
  border: 2px solid #1f2937;

  box-shadow: 0 0 18px rgba(0,0,0,0.8);
}

/* 🎴 CARTA DEL BINDER */
.binder-card {
  width: 180px;
  margin: 0 auto;
  background: #111827;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #1f2937;

  transition: transform 0.2s;
}

.binder-card:hover {
  transform: scale(1.05);
}

/* 🖼️ IMAGEN */
.binder-card img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
}

/* 📝 INFO */
.binder-info {
  margin-top: 6px;
  font-size: 12px;
  text-align: center;
  color: #cbd5f5;
}

.binder-card {
  background: linear-gradient(145deg, #020617, #111827);
  border: 2px solid #1f2937;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(2px);
}

.binder-title {
  text-align: center;
  font-size: 24px;
  margin: 20px 0;
}

/* ============================== */
/* 🔍 ZOOM CARTA */
/* ============================== */

#zoomModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);

  display: none;
  justify-content: center;
  align-items: center;

  z-index: 9999;
}

#zoomModal img {
  height: 85vh;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.info-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.legend-icon {
  font-size: 14px;
}


.legend-panel {
  text-align: center;
  margin: 10px 0;
  margin-top: 25px;
  margin-bottom: 10px;
}

#toggleLegend {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#legendBox {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.legend-item {

  width: auto !important;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;

  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;

  font-size: 12px;
  color: #cbd5f5;

  border: 1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(10px);

  white-space: nowrap;
}

.legend-box {
  display: flex;
  justify-content: center;
  align-items: center;

  gap: 12px;
  flex-wrap: wrap;

  max-width: 600px;
  margin: 0 auto;
}

#toggleLegend {
  
  margin-top: 20px;
  margin-bottom: 20px;
}

.hero {
  position: relative;
  padding: 60px 20px 40px;
  border-radius: 25px;
  overflow: hidden;
  text-align: center;
  transform: translateZ(0);
  contain: layout paint;
  will-change: transform;
  background:
    radial-gradient(circle at 20% 40%, rgba(236,72,153,0.5), transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(56,189,248,0.4), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(168,85,247,0.4), transparent 50%),
    #020617;

    box-shadow:
    inset 0 0 100px rgba(168,85,247,0.2),
    inset 0 0 150px rgba(56,189,248,0.1);

}

.hero-glow {
  animation: none;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.hero-center {
  position: relative;
  z-index: 3;
  text-align: center;
}

.hero-title {
  font-size: 64px;
  font-weight: 900;

  background: linear-gradient(90deg, #facc15, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow:
    0 0 20px rgba(250,204,21,0.4),
    0 0 40px rgba(56,189,248,0.3),
    0 0 60px rgba(168,85,247,0.3);
}

.hero-sub {
  font-size: 20px;
  margin-top: 10px;
  color: #cbd5f5;
  letter-spacing: 3px;
}

@keyframes fadeGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.hero-content {
  margin-top: 30px;
  position: relative;
  z-index: 3;
}

.hero-art {
  position: absolute;
  left: 80px;
  top: 40px;

  width: 260px;
  transform: rotate(-15deg);

  z-index: 3;

  box-shadow:
    0 0 18px rgba(236,72,153,0.8),
    0 0 25px rgba(168,85,247,0.6),
    0 0 30px rgba(56,189,248,0.4);
}

.hero-art:hover {
  transform: rotate(-6deg) scale(1.05);
}

.hero-art:hover {
  transform: rotate(-6deg) scale(1.05);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.8), transparent 60%);

  opacity: 0;

  animation: shootingStar 6s linear infinite;

  z-index: 2;
  pointer-events: none;
}

.shooting-star {
  position: absolute;

  width: 160px;
  height: 2px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.9),
    rgba(56,189,248,0.6),
    rgba(168,85,247,0.4),
    transparent
  );

  border-radius: 50%;

  filter: blur(0.5px) drop-shadow(0 0 6px white);

  opacity: 0;

  animation: starDiagonal linear infinite;

  pointer-events: none;
}

.shooting-star::before {
  content: "";
  position: absolute;

  right: 0;
  top: 50%;

  width: 6px;
  height: 6px;

  background: white;
  border-radius: 50%;

  transform: translateY(-50%);

  box-shadow:
    0 0 6px white,
    0 0 12px #38bdf8,
    0 0 20px #a855f7;
}


.hero .shooting-star {
  position: absolute;
  width: 180px;
  height: 2px;

  background: linear-gradient(to right, white, transparent);

  opacity: 0;

  animation: starDiagonal linear infinite;
  animation-fill-mode: both;

  pointer-events: none;
}

/* desde arriba */
.shooting-star:nth-child(1) {
  top: -20px;
  left: 10%;
  animation-duration: 3s;
}

.shooting-star:nth-child(2) {
  top: -20px;
  left: 50%;
  animation-duration: 5s;
}

/* desde izquierda */
.shooting-star:nth-child(3) {
  top: 30%;
  left: -200px;
  animation-duration: 4s;
}

/* desde derecha */
.shooting-star:nth-child(4) {
  top: 60%;
  right: -200px;
  animation-duration: 3s;
}

/* otra random */
.shooting-star:nth-child(5) {
  top: -20px;
  left: 80%;
  animation-duration: 3.5s;
}

.shooting-star:nth-child(2),
.shooting-star:nth-child(5) {
  opacity: 0.6;
  filter: blur(1px);
}

.shooting-star:nth-child(3) {
  height: 3px;
  filter: drop-shadow(0 0 10px white);
}

@keyframes starDiagonal {
  0% {
    transform: translate(0,0) rotate(25deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  100% {
    transform: translate(800px, 500px) rotate(25deg);
    opacity: 0;
  }
}


.hero::after {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 80% 40%, #38bdf8, transparent),
    radial-gradient(1.5px 1.5px at 60% 70%, #a855f7, transparent),
    radial-gradient(2px 2px at 40% 80%, #facc15, transparent);

  background-size: 300px 300px;

  opacity: 0.6; /* 🔥 antes estaba demasiado bajo */

  z-index: 2;
  pointer-events: none;
}


.hero + * {
  position: relative;
}

.hero + *::before {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at center,
    rgba(168,85,247,0.08),
    transparent 70%
  );

  pointer-events: none;
}

.app-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px;

  background: rgba(2, 6, 23, 0.85);
  border-radius: 30px;

  box-shadow:
    0 0 18px rgba(0,0,0,0.9),
    inset 0 0 20px rgba(255,255,255,0.05);
}

.pokeball {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);

  width: 70px;
  height: 70px;

  border-radius: 50%;

  background: linear-gradient(
    to bottom,
    #ff1a1a 0%,
    #ff1a1a 48%,
    #000 48%,
    #000 52%,
    #fff 52%,
    #fff 100%
  );

  border: 3px solid #000;

  box-shadow:
    0 0 18px rgba(255,255,255,0.4),
    0 0 25px rgba(168,85,247,0.5),
    0 0 30px rgba(56,189,248,0.3);

  z-index: 5;
}

.pokeball::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 20px;
  height: 20px;

  background: white;
  border: 4px solid black;
  border-radius: 50%;

  z-index: 2;
}

.pokeball::after {
  content: "";
  position: absolute;
  inset: -20px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(255,255,255,0.25),
    rgba(168,85,247,0.2),
    transparent
  );

  filter: blur(20px);

  z-index: -1;
}

.pokeball {
  animation: floatBall 8s ease-in-out infinite;
}

@keyframes floatBall {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}



.main-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

body.scrolling .hero-glow {
  animation: none;
}

.hero,
.card {
  transform: translateZ(0);
}

.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: perspective(800px) rotateX(6deg) rotateY(-6deg) scale(1.03);

  box-shadow:
    0 15px 30px rgba(0,0,0,0.6),
    0 0 20px rgba(168,85,247,0.4);
}

@media (max-width: 480px) {

  .app-container {
    margin: 10px;
    padding: 15px;
  }

}

@media (max-width: 480px) {

  .hero {
    padding: 20px 10px;
  }

}

@media (max-width: 480px) {

  .hero-art {
    position: relative;
    left: auto;
    top: auto;

    display: block;
    margin: 0 auto 10px;

    transform: rotate(-5deg);
    width: 120px;
  }

}

@media (max-width: 480px) {

  .hero-title {
    font-size: 24px;
    text-align: center;
  }

}

@media (max-width: 480px) {

  .money-cards {
    gap: 10px;
  }

}

@media (max-width: 480px) {

  .pokeball {
    top: 0px;
    left: 40%;
    transform: translateX(-50%);
  }

}

@media (max-width: 480px) {

  /* SOLO botones principales */
  .main-actions button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: 12px;
  }

  /* botones normales (como Leyenda) */
  .btn,
  button {
    width: auto;
    padding: 10px 16px;
    font-size: 14px;
  }

}

@media (max-width: 480px) {

  .hero + *,
  .main-actions,
  .stats,
  .info-row,
  .money-cards {
    margin-top: 20px !important;
  }

}

@media (max-width: 480px) {

  body {
    padding-bottom: 20px;
  }

  .app-container {
    border-radius: 20px;
  }

}

@media (max-width: 480px) {

  .ranking-title,
  .mejores-compras,
  .highlight-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

}

@media (max-width: 480px) {

  .ranking-title {
    margin: 0 auto;
    padding: 12px;
  }

}

@media (max-width: 480px) {

  .legend-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
  }

  .legend-item {
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
    box-sizing: border-box;
  }

}

@media (max-width: 480px) {

  button,
  .btn {
    transition: transform 0.1s ease, box-shadow 0.1s ease;
  }

  button:active,
  .btn:active {
    transform: scale(0.96);
  }

}

@media (max-width: 480px) {

  #sortBtn {
    width: auto;
    padding: 10px 16px;
    font-size: 14px;
  }

}

.cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 480px) {

  .cards-container {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    margin: 0 auto;
  }

}

.cards-container > * {
  width: 100%;
}

@media (max-width: 768px) {

  .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 480px) {

  #cards-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

}

@media (max-width: 480px) {

  #binderViewWrapper {
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .binder-view {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 16px;

    width: 100%;
    margin: 0;
    padding: 0;
  }

  .binder-card {
    width: 100%;
    max-width: 280px;
  }

}

#binderViewWrapper {
  overflow: visible;
}

@media (max-width: 480px) {

  .binder-view {
    display: block !important;
  }

  .binder-card {
    display: block;
    width: 90% !important;
    margin: 0 auto 20px auto;
  }

}

#zoomModal {
  position: fixed;
  inset: 0;

  background: rgba(0,0,0,0.85);
  z-index: 999;

  display: flex;
  align-items: center;
  justify-content: center;
}

#zoomModal img {
  max-width: 90vw;
  max-height: 90vh;

  width: auto;
  height: auto;

  position: static !important;
  transform: none !important;

  object-fit: contain;
}

#zoomModal img {
  animation: zoomIn 0.2s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}