:root{
  --bg: #0c0f08;
  --bg-soft: #14180d;
  --bg-sidebar: #10140a;
  --gold: #ffc233;
  --leaf: #7cb342;
  --coral: #ff6f61;
  --cream: #f5f0e1;
  --cream-dim: rgba(245,240,225,0.62);
  --sidebar-w: 260px;
}

*{ box-sizing: border-box; }

html,body{
  margin:0;
  padding:0;
  height:100%;
  background: var(--bg);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

/* textura sutil tipo piel de piña, de fondo */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    repeating-linear-gradient(60deg, var(--gold) 0px, var(--gold) 1.5px, transparent 1.5px, transparent 34px),
    repeating-linear-gradient(-60deg, var(--gold) 0px, var(--gold) 1.5px, transparent 1.5px, transparent 34px);
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar{
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(245,240,225,0.06);
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: transform 0.25s ease;
}

.sidebar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(245,240,225,0.06);
  flex-shrink: 0;
}

.sidebar-brand{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Bungee', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-decoration: none;
}

.sidebar-brand-icon{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-close{
  display: none;
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-close:hover{
  color: var(--cream);
  background: rgba(245,240,225,0.06);
}

.sidebar-top{
  padding: 0.6rem 0.75rem 0.4rem;
  flex-shrink: 0;
}

.sidebar-item{
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: none;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.sidebar-item:hover{
  background: rgba(245,240,225,0.04);
}

.sidebar-item.active{
  border-color: rgba(255,194,51,0.45);
  background: rgba(255,194,51,0.08);
  color: var(--gold);
}

.sidebar-item-icon{
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
}

.sidebar-scroll{
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.4rem 0.75rem 0.6rem;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,194,51,0.35) transparent;
}

.sidebar-scroll::-webkit-scrollbar{ width: 6px; }
.sidebar-scroll::-webkit-scrollbar-track{ background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb{
  background: rgba(255,194,51,0.3);
  border-radius: 3px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover{
  background: rgba(255,194,51,0.5);
}

/* fade inferior estático */
.sidebar-scroll::after{
  content: "";
  position: sticky;
  bottom: -0.6rem;
  display: block;
  height: 24px;
  margin-top: -24px;
  background: linear-gradient(to bottom, transparent, var(--bg-sidebar));
  pointer-events: none;
}

/* fade superior dinámico */
.sidebar-scroll::before{
  content: "";
  position: sticky;
  top: -0.4rem;
  display: block;
  height: 20px;
  margin-bottom: -20px;
  background: linear-gradient(to top, transparent, var(--bg-sidebar));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.sidebar-scroll.can-scroll-up::before{
  opacity: 1;
}

.sidebar-section-title{
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin: 1rem 0.5rem 0.5rem;
}

.sidebar-chain-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-chain-item{
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.sidebar-chain-item:hover{
  background: rgba(245,240,225,0.05);
}

.sidebar-chain-item.active{
  border-color: rgba(255,194,51,0.45);
  background: rgba(255,194,51,0.08);
  color: var(--gold);
}

.sidebar-chain-item img{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-footer{
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid rgba(245,240,225,0.06);
}

.sidebar-footer a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.sidebar-footer img{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  opacity: 0.45;
  filter: grayscale(1);
  transition: all 0.2s ease;
  display: block;
}

.sidebar-footer a:hover img{
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-1px);
}

/* ============================================================
   OVERLAY (móvil)
   ============================================================ */

.drawer-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.visible{
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */

.mobile-header{
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12,15,8,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(245,240,225,0.06);
  padding: 0.7rem 0.9rem;
  align-items: center;
  gap: 0.6rem;
}

.mobile-menu-btn{
  background: none;
  border: 1px solid rgba(245,240,225,0.12);
  border-radius: 10px;
  color: var(--cream);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn i,
.mobile-menu-btn svg{
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.mobile-header-title{
}

.mobile-header-spacer{
}

/* ============================================================
   PANEL
   ============================================================ */

.panel{
  position: relative;
  z-index: 1;
  margin-left: var(--sidebar-w);
  min-height: 100dvh;
}

.view{
  padding: 3rem 2rem 4rem;
}

/* ---------- Vista home ---------- */

.home-content{
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.glow{
  position: absolute;
  top: 30%;
  left: 50%;
  width: min(70vw, 560px);
  height: min(70vw, 560px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,194,51,0.20) 0%, rgba(255,111,97,0.10) 40%, transparent 72%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}

.mascota{
  position: relative;
  width: clamp(120px, 22vw, 170px);
  height: auto;
  border-radius: 50%;
  margin-bottom: 2.1rem;
  animation: flotar 6s ease-in-out infinite;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,0.55));
}

@keyframes flotar{
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.eyebrow{
  position: relative;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--leaf);
  margin: 0 0 1.1rem;
}

h1{
  position: relative;
  font-family: 'Bungee', sans-serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 10vw, 6.5rem);
  line-height: 0.92;
  margin: 0;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, var(--gold) 0%, #ffb347 45%, var(--coral) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 0 rgba(0,0,0,0.15);
}

.home-footer{
  margin-top: 2.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(245,240,225,0.35);
}

/* ---------- Vista cadena ---------- */

.chain-content{
  max-width: 900px;
  margin: 0 auto;
}

.chain-title-wrap{
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.chain-title-icon{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chain-title{
  font-family: 'Bungee', sans-serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, var(--gold) 0%, #ffb347 45%, var(--coral) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.chain-layout{
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.chain-col-info,
.chain-col-buy{
  min-width: 0; /* evita overflow en grid */
}

/* Desktop ancho: 2 columnas */
@media (min-width: 1100px){
  .chain-layout{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

/* ============================================================
   COMPONENTES (info-card, buy-btn, etc.)
   ============================================================ */

.info-card{
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0.4rem 1.3rem;
  border: 1px solid rgba(255,194,51,0.28);
  border-radius: 16px;
  background: rgba(245,240,225,0.03);
  backdrop-filter: blur(2px);
}

.info-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(245,240,225,0.08);
}

.info-row:last-child{ border-bottom: none; }

.info-label{
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  white-space: nowrap;
}

.info-value{
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  color: var(--cream);
  text-align: right;
  overflow-wrap: anywhere;
}

.info-value.address{
  font-size: 0.74rem;
  color: var(--gold);
  cursor: pointer;
  transition: color 0.15s ease;
}

.info-value.address:hover{
  color: var(--coral);
}

.copy-hint{
  display: block;
  margin-top: 0.9rem;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--cream-dim);
  text-align: center;
}

.buy-section{  
}

.buy-eyebrow{
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin: 0 0 0.9rem;
}

.buy-buttons{
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.buy-btn{
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255,194,51,0.28);
  border-radius: 14px;
  background: rgba(245,240,225,0.03);
  text-decoration: none;
  transition: all 0.2s ease;
}

.buy-btn:hover{
  border-color: rgba(255,194,51,0.6);
  background: rgba(245,240,225,0.06);
  transform: translateY(-2px);
}

.buy-btn img{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.buy-btn .buy-text{
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}

.buy-btn .buy-name{
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cream);
}

.buy-btn .buy-sub{
  font-size: 0.68rem;
  color: var(--cream-dim);
  letter-spacing: 0.02em;
}

/* disabled state */
.buy-btn.disabled{
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.7);
}

.buy-btn.disabled .buy-name{
  color: var(--cream-dim);
}

.buy-btn.disabled .buy-sub{
  color: var(--coral);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.roadmap-section{
  width: 100%;
  margin-top: 2.4rem;
}

.roadmap-list{
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255,194,51,0.28);
  border-radius: 16px;
  background: rgba(245,240,225,0.03);
  overflow: hidden;
}

.roadmap-item{
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid rgba(245,240,225,0.08);
  text-align: left;
}

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

.roadmap-mark{
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.roadmap-item.done .roadmap-mark{
  background: rgba(124,179,66,0.15);
  color: var(--leaf);
  border: 1px solid rgba(124,179,66,0.4);
}

.roadmap-item.pending .roadmap-mark{
  background: rgba(255,194,51,0.1);
  color: var(--gold);
  border: 1px solid rgba(255,194,51,0.35);
}

.roadmap-item.pending .roadmap-mark::after{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
}

.roadmap-text{
  font-size: 0.85rem;
  color: var(--cream);
}

.roadmap-item.done .roadmap-text{
  color: var(--cream-dim);
  text-decoration: line-through;
  text-decoration-color: rgba(245,240,225,0.3);
}

.estado{
  position: relative;
  margin-top: 1.6rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(124,179,66,0.4);
  border-radius: 999px;
  background: rgba(124,179,66,0.08);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--leaf);
}

.estado .punto{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 0 rgba(124,179,66,0.6);
  animation: pulso 2s infinite;
}

@keyframes pulso{
  0% { box-shadow: 0 0 0 0 rgba(124,179,66,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(124,179,66,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,179,66,0); }
}

.estado:active{ transform: scale(0.95); }

.estado.off{
  border-color: rgba(255,77,77,0.45);
  background: rgba(255,77,77,0.08);
  color: #ff6b6b;
}

.estado.off .punto{
  background: #ff4d4d;
  animation: none;
  box-shadow: none;
}

.social-section{
  width: 100%;
  margin-top: 2rem;
}

.share-buttons{
  display: flex;
  gap: 0.6rem;
}

.share-btn{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.5rem;
  border: 1px solid rgba(255,194,51,0.28);
  border-radius: 14px;
  background: rgba(245,240,225,0.03);
  text-decoration: none;
  transition: all 0.2s ease;
}

.share-btn:hover{
  border-color: rgba(255,194,51,0.6);
  background: rgba(245,240,225,0.06);
  transform: translateY(-2px);
}

.share-btn img{
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.share-btn span{
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cream-dim);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px){
  .sidebar{
    transform: translateX(-100%);
    box-shadow: 12px 0 32px rgba(0,0,0,0.4);
  }

  body.drawer-open .sidebar{
    transform: translateX(0);
  }

  .sidebar-close{
    display: block;
  }

  .mobile-header{
    display: flex;
  }

  .panel{
    margin-left: 0;
  }

  .view{
    padding: 2rem 1.2rem 3rem;
  }
}

@media (prefers-reduced-motion: reduce){
  .mascota{ animation: none; }
  .estado .punto{ animation: none; }
  .sidebar{ transition: none; }
}