:root{
  --bg1:#0f172a;
  --accent1:#ff6ec7;
  --accent2:#7afcff;
  --glass: rgba(255,255,255,0.06);
  --glass-2: rgba(255,255,255,0.03);
  --card-w: 320px;
  --card-h: 460px;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(2,6,23,0.6);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

*{box-sizing:border-box}
html,body{
  height:100%;
  margin:0;
  background: linear-gradient(180deg,#021028 0%, #05122b 50%, #0b1b36 100%);
  color: #f7f9fc;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.sky{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:32px 16px;
  background-image: radial-gradient(circle at 10% 10%, rgba(122,252,255,0.05), transparent 8%),
                    radial-gradient(circle at 90% 80%, rgba(255,110,199,0.04), transparent 10%);
}

/* Header */
.site-header{
  text-align:center;
  margin-bottom:12px;
}
.logo{
  font-size:34px;
  margin:0;
  letter-spacing:1px;
  display:inline-block;
  padding:8px 18px;
  border-radius:30px;
  background: linear-gradient(90deg,var(--accent1),var(--accent2));
  color:#021028;
  transform:skewX(-8deg);
  box-shadow: 0 6px 18px rgba(122,252,255,0.12), 0 12px 40px rgba(255,110,199,0.08);
}
.spark{font-size:20px; margin-left:8px}
.tag{opacity:0.9; margin:8px 0 20px 0}

/* App layout */
.app{
  width:100%;
  max-width:1000px;
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:24px;
  align-items:start;
}

/* Card stack area */
.card-stage{
  height:calc(var(--card-h) + 24px);
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  perspective:1200px;
}

/* Card */
/* Replace your .card background with a solid colorful background */
.card {
  background: linear-gradient(160deg, var(--accent1), var(--accent2));
  color: #021028; /* make text readable on bright background */
}

/* Ensure stacking order is clean */
.card[data-index="0"] { z-index: 60; }
.card[data-index="1"] { z-index: 50; }
.card[data-index="2"] { z-index: 40; }
.card[data-index="3"] { z-index: 30; }
.card[data-index="4"] { z-index: 20; }

/* shell art area */
.card .shell{
  height:48%;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(120deg,#0b2a2e22, #0b1b3622);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

/* colorful frame */
.card .frame{
  width:180px;height:180px;border-radius:100%;
  display:flex;align-items:center;justify-content:center;
  background: conic-gradient(from 150deg, var(--accent1), #ffd36e, var(--accent2));
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  transform: rotate(-7deg);
}

/* info */
.info{
  padding:16px;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.name{
  font-weight:700;
  font-size:20px;
  display:flex; align-items:center; gap:8px;
}
.species{color:rgba(255,255,255,0.75)}
.bio{font-size:13px; opacity:0.9; margin-top:6px; flex:1}
.meta{display:flex; gap:12px; margin-top:8px; font-size:13px; opacity:0.9}

/* small neon tags */
.tag-pill{
  padding:6px 10px; border-radius:999px; background:linear-gradient(90deg,#ffffff10,#ffffff04);
  font-size:12px; display:inline-block;
}

/* buttons column */
.controls{
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
  padding-top:24px;
}
.btn{
  padding:12px 18px;
  border-radius:999px;
  border:0;
  font-weight:700;
  cursor:pointer;
  box-shadow: 0 6px 22px rgba(2,6,23,0.45);
  transition: transform 120ms ease;
}
.btn:active{transform:translateY(2px)}
.ghost{background:transparent;color:#ffb3d1;border:1px solid rgba(255,110,199,0.12)}
.glow{background: linear-gradient(90deg,var(--accent2),#8bffda); color:#021028}
.pop{background: linear-gradient(90deg,#ffd36e,#ff7ab6); color:#021028}

/* pile layering */
.card[data-index="0"]{transform:translateY(-6px) rotate(-2deg) scale(1); z-index:60}
.card[data-index="1"]{transform:translateY(6px) rotate(3deg) scale(0.98); z-index:55}
.card[data-index="2"]{transform:translateY(12px) rotate(-4deg) scale(0.96); z-index:50}
.card.off-left{transform: translateX(-1200px) rotate(-30deg) !important; opacity:0}
.card.off-right{transform: translateX(1200px) rotate(30deg) !important; opacity:0}

/* modal */
.modal{
  position:fixed; inset:0; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(180deg, rgba(2,6,23,0.45), transparent);
  visibility:hidden; opacity:0; transition:opacity 220ms ease, visibility 220ms;
}
.modal[aria-hidden="false"]{visibility:visible; opacity:1}
.modal-card{
  background: linear-gradient(180deg,#ffffff06, #ffffff03);
  padding:24px; border-radius:16px; width:min(520px,92vw); text-align:center;
  box-shadow:0 18px 60px rgba(0,0,0,0.6);
}

/* matched profiles */
.matched-profiles{display:flex; gap:12px; justify-content:center; margin:12px 0}
.matched-profiles .mini{
  width:84px;height:84px;border-radius:14px;background:linear-gradient(90deg,var(--accent1),var(--accent2));
  display:flex;align-items:center;justify-content:center;font-weight:800;color:#021028;
  box-shadow:0 8px 30px rgba(0,0,0,0.45);
}

/* footer */
.footer{margin-top:28px; opacity:0.75; font-size:13px}

/* responsiveness */
@media(max-width:880px){
  .app{grid-template-columns:1fr; padding-bottom:40px}
  .controls{flex-direction:row; justify-content:center; margin-top:8px}
}
