:root{
  --bg0:#0f0f1f;
  --bg1:#1f1b3a;
  --card:#1b1b27;
  --card2:#141421;
  --text:#f1f2ff;
  --muted:rgba(241,242,255,.72);
  --muted2:rgba(241,242,255,.48);
  --stroke:rgba(255,255,255,.10);
  --shadow:0 12px 30px rgba(0,0,0,.38);
  --radius:18px;
  --radius2:14px;
  --tap: cubic-bezier(.2,.9,.2,1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(122,93,255,.35), transparent 60%),
    radial-gradient(900px 600px at 80% 20%, rgba(57,190,255,.18), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  overflow-x:hidden;
}

.app{
  min-height:100%;
  padding: calc(8px + var(--safe-top)) 14px calc(18px + var(--safe-bot));
  transition: opacity 170ms var(--tap), transform 170ms var(--tap);
}
.app--dark{
  background: linear-gradient(180deg, #0d0d14 0%, #0a0a10 40%, #0b0b12 100%);
}
html[data-leave="1"] .app{
  opacity: 0;
  transform: translateY(8px);
}

/* subtle entry transition */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(0,0,0,.0), rgba(0,0,0,.0));
  opacity:0;
  transform:translateY(8px);
  transition: opacity 260ms var(--tap), transform 260ms var(--tap);
}
html[data-enter="1"] body::before{
  opacity:1;
  transform:translateY(0);
}

.topbar{
  padding-top: 6px;
}
.topbar__row{
  display:flex;
  align-items:center;
  gap:10px;
}
.topbar__title{
  font-weight:800;
  letter-spacing:.2px;
  font-size:22px;
}

.search{
  margin-top: 12px;
  height:44px;
  border-radius:14px;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  gap:10px;
  padding: 0 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 200ms var(--tap), background 200ms var(--tap), transform 200ms var(--tap);
}
.search:focus-within{
  border-color: rgba(138,114,255,.7);
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}
.search__input{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  color:var(--text);
  font-size:14px;
}
.search__input::placeholder{ color: rgba(241,242,255,.58); }

.content{
  padding-top: 12px;
}
.content--detail{
  padding-top: 10px;
}

.section{ margin-top: 18px; }
.section__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.section__title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  font-size:19px;
}
.chev{
  opacity:.7;
  font-weight:900;
  transform: translateY(-1px);
}
.link-btn{
  border:0;
  background:transparent;
  color:rgba(241,242,255,.70);
  font-weight:700;
  font-size:14px;
  padding:10px 10px;
  border-radius:12px;
  transition: transform 170ms var(--tap), color 170ms var(--tap), background 170ms var(--tap);
}
.link-btn:active{
  transform: scale(.98);
  background: rgba(255,255,255,.08);
}

.rail{
  display:flex;
  gap:12px;
  overflow:auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.rail::-webkit-scrollbar{ height:0; }

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 410px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card{
  scroll-snap-align:start;
  position:relative;
  border-radius: var(--radius);
  overflow:hidden;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transform: translateZ(0);
  transition: transform 240ms var(--tap), box-shadow 240ms var(--tap), border-color 240ms var(--tap), filter 240ms var(--tap);
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  display:block;
  text-decoration:none;
  color: inherit;
}
.card:focus-visible{
  outline: 2px solid rgba(138,114,255,.75);
  outline-offset: 2px;
}
html.using-mouse .card:focus-visible{
  outline: none;
}
.card--my{
  width: 118px;
}
.card--rec{
  width: 100%;
}

.card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(155,132,255,.22);
}
.card:active{
  transform: scale(.985);
  filter: brightness(.98);
}

.cover{
  height: 94px;
  background: linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,.02));
  position:relative;
}
.card--rec .cover{ height: 86px; }
.cover::after{
  content:"";
  position:absolute;
  inset:-40% -20%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.20), transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(255,255,255,.10), transparent 55%);
  transform: rotate(-12deg);
  opacity:.9;
}
.cover__badge{
  position:absolute;
  left: 10px;
  bottom: 10px;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,.30);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);
  z-index: 1;
}
.cover__info{
  position:absolute;
  right: 10px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,.86);
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.16);
  z-index: 1;
}

.card__body{
  padding: 8px 10px 10px;
}
.title{
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  color: rgba(241,242,255,.92);
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 30px;
}
.meta{
  margin-top: 6px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.badge{
  font-size: 12px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.12);
}
.i{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,.86);
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.16);
}

.icon-btn{
  border:0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  display:grid;
  place-items:center;
  transition: transform 180ms var(--tap), background 180ms var(--tap), border-color 180ms var(--tap);
  color: var(--text);
}
.icon-btn:active{ transform: scale(.96); background: rgba(255,255,255,.12); }

.icon{
  display:inline-block;
  width: 18px;
  height: 18px;
  opacity:.92;
  background: currentColor;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
}
.icon--menu{
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6.5h16v2H4v-2zm0 6h16v2H4v-2zm0 6h16v2H4v-2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6.5h16v2H4v-2zm0 6h16v2H4v-2zm0 6h16v2H4v-2z'/%3E%3C/svg%3E");
}
.icon--search{
  width: 16px;
  height: 16px;
  opacity:.78;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 4a6 6 0 104.472 10.03l3.749 3.75 1.414-1.415-3.75-3.749A6 6 0 0010 4zm0 2a4 4 0 110 8 4 4 0 010-8z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 4a6 6 0 104.472 10.03l3.749 3.75 1.414-1.415-3.75-3.749A6 6 0 0010 4zm0 2a4 4 0 110 8 4 4 0 010-8z'/%3E%3C/svg%3E");
}
.icon--controller{
  width: 18px;
  height: 18px;
  opacity:.9;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 9h10a4 4 0 014 4v3a2 2 0 01-2 2h-1.3a2 2 0 01-1.6-.8l-1.1-1.47a2 2 0 00-1.6-.8h-2a2 2 0 00-1.6.8L8.9 17.2a2 2 0 01-1.6.8H6a2 2 0 01-2-2v-3a4 4 0 014-4zm1 2v2H6v2h2v2h2v-2h2v-2H10v-2H8zm9 1a1 1 0 100 2 1 1 0 000-2zm2 2a1 1 0 100 2 1 1 0 000-2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 9h10a4 4 0 014 4v3a2 2 0 01-2 2h-1.3a2 2 0 01-1.6-.8l-1.1-1.47a2 2 0 00-1.6-.8h-2a2 2 0 00-1.6.8L8.9 17.2a2 2 0 01-1.6.8H6a2 2 0 01-2-2v-3a4 4 0 014-4zm1 2v2H6v2h2v2h2v-2h2v-2H10v-2H8zm9 1a1 1 0 100 2 1 1 0 000-2zm2 2a1 1 0 100 2 1 1 0 000-2z'/%3E%3C/svg%3E");
}

/* detail page */
.detailbar{
  display:flex;
  align-items:center;
  gap: 10px;
  padding-top: calc(2px + var(--safe-top));
  padding-bottom: 10px;
}
.back{
  border:0;
  background: transparent;
  color: rgba(241,242,255,.86);
  font-weight: 800;
  padding: 10px 10px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  gap: 8px;
  transition: transform 170ms var(--tap), background 170ms var(--tap);
}
.back:active{ transform: scale(.98); background: rgba(255,255,255,.08); }
.chev--left{ font-size: 22px; opacity:.8; transform: translateY(-1px); }
.pill{
  margin: 0 auto 0 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 800;
  color: rgba(241,242,255,.92);
  transition: transform 200ms var(--tap), background 200ms var(--tap), border-color 200ms var(--tap);
}
.pill:active{ transform: scale(.985); background: rgba(255,255,255,.12); }
.spacer{ flex:1; }

.hero{
  margin-top: 2px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  padding: 14px;
}
.hero__top{
  display:flex;
  gap: 14px;
  align-items:flex-start;
}
.hero__cover{
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.10);
  position:relative;
  overflow:hidden;
  flex: 0 0 auto;
}
.hero__cover::after{
  content:"";
  position:absolute;
  inset:-40% -40%;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,.22), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,.10), transparent 60%);
  transform: rotate(-18deg);
}
.hero__info{
  flex: 1 1 auto;
  min-width: 0;
}
.hero__name{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  margin-top: 2px;
}
.age{
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 255, 132, .14);
  border: 1px solid rgba(56, 255, 132, .30);
  color: rgba(56, 255, 132, .95);
}
.hero__sub{
  margin-top: 6px;
  color: rgba(241,242,255,.66);
  font-weight: 700;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dot{ opacity:.35; }
.hero__stats{
  margin-top: 14px;
  display:flex;
  justify-content:space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(241,242,255,.82);
}
.stat{
  display:flex;
  align-items:center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  opacity:.95;
  white-space: nowrap;
}
.thumb{
  width: 16px;
  height: 16px;
  opacity:.92;
  background: currentColor;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 10h4v12H2V10zm20 1c0-1.1-.9-2-2-2h-6.3l.9-4.3.02-.2c0-.26-.1-.5-.26-.68L13.2 3 7.6 8.6c-.38.38-.6.89-.6 1.42V20c0 1.1.9 2 2 2h8c.82 0 1.54-.5 1.84-1.22l2.02-4.71c.09-.23.14-.47.14-.72v-4.3z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 10h4v12H2V10zm20 1c0-1.1-.9-2-2-2h-6.3l.9-4.3.02-.2c0-.26-.1-.5-.26-.68L13.2 3 7.6 8.6c-.38.38-.6.89-.6 1.42V20c0 1.1.9 2 2 2h8c.82 0 1.54-.5 1.84-1.22l2.02-4.71c.09-.23.14-.47.14-.72v-4.3z'/%3E%3C/svg%3E");
}
.star{
  width: 16px;
  height: 16px;
  opacity:.95;
  background: currentColor;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27z'/%3E%3C/svg%3E");
}
.stat__label{ color: rgba(241,242,255,.52); font-weight: 800; }

.play{
  margin-top: 14px;
  width: 100%;
  border:0;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(117,91,255,.95), rgba(132,90,255,.92));
  color: rgba(255,255,255,.96);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: .2px;
  box-shadow: 0 14px 30px rgba(92,72,255,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  transform: translateZ(0);
  transition: transform 200ms var(--tap), filter 200ms var(--tap), box-shadow 200ms var(--tap);
}
.play:hover{ filter: brightness(1.04); box-shadow: 0 18px 40px rgba(92,72,255,.32); }
.play:active{ transform: scale(.985); filter: brightness(.98); }
.play__tri{
  width: 0; height: 0;
  border-left: 10px solid rgba(255,255,255,.95);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  transform: translateX(1px);
}

.shots{ margin-top: 12px; }
.shots__rail{
  display:flex;
  gap: 12px;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.shots__rail::-webkit-scrollbar{ height:0; }
.shot{
  width: 148px;
  height: 118px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
  position:relative;
  flex: 0 0 auto;
  transition: transform 220ms var(--tap), filter 220ms var(--tap);
}
.shot:hover{ transform: translateY(-3px); }
.shot:active{ transform: scale(.99); filter: brightness(.98); }
.shot::after{
  content:"";
  position:absolute;
  inset:-30% -20%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.22), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,.10), transparent 60%);
  transform: rotate(-10deg);
}
.shot__cap{
  position:absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,.92);
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

.about{
  margin-top: 12px;
  padding-top: 10px;
}
.about__title{
  margin: 0;
  font-size: 28px;
  font-weight: 900;
}
.about__text{
  margin-top: 10px;
  line-height: 1.55;
  color: rgba(241,242,255,.72);
  font-weight: 650;
}

/* ripple effect */
.ripple{
  position:relative;
  overflow:hidden;
}
.ripple > .rip{
  position:absolute;
  border-radius:999px;
  transform: scale(0);
  opacity:.55;
  background: radial-gradient(circle, rgba(255,255,255,.8) 0%, rgba(255,255,255,.35) 40%, rgba(255,255,255,0) 70%);
  animation: rip 560ms var(--tap) forwards;
  pointer-events:none;
}
@keyframes rip{
  to{ transform: scale(1); opacity: 0; }
}

/* toast */
.toast{
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bot));
  transform: translateX(-50%) translateY(16px);
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  opacity: 0;
  pointer-events:none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 220ms var(--tap), transform 220ms var(--tap);
  max-width: 92vw;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.toast.is-on{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* loading & error */
.loading, .error{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: rgba(241,242,255,.58);
  font-weight: 700;
  font-size: 14px;
}
.loading::before{
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: rgba(138,114,255,.8);
  border-radius: 999px;
  margin-right: 10px;
  animation: spin 800ms linear infinite;
}
@keyframes spin{
  to{ transform: rotate(360deg); }
}
.error{
  color: rgba(255,100,100,.8);
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
  body::before{ transition:none !important; }
}

