/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0a0b1e;
  color: #e6e6f0;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: #ff5e8a; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ===== 顶部导航 ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,11,30,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
}
.logo { display: flex; align-items: baseline; gap: 8px; }
.logo-mark {
  font-size: 22px; color: #ff5e8a;
  text-shadow: 0 0 10px #ff5e8a;
}
.logo-text { font-size: 20px; font-weight: 700; color: #fff; }
.logo-sub  { font-size: 12px; color: #8a8aa6; display: none;}
.nav { display: flex; gap: 4px; margin-left: 24px; flex: 1; }
.nav a {
  padding: 8px 16px; border-radius: 20px;
  font-size: 14px; color: #c8c8d8; transition: all .2s;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav a.active {
  color: #fff; background: linear-gradient(135deg, #ff5e8a, #7b2cbf);
}
.user-area { display: flex; align-items: center; gap: 10px; }
.balance-pill {
  background: linear-gradient(135deg, #f0c040, #ff8a3d);
  color: #2a1500;
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 0 12px rgba(240,192,64,0.4);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px; border-radius: 20px; font-size: 14px;
  border: 1px solid transparent; transition: all .2s;
}
.btn-ghost { color: #c8c8d8; border-color: rgba(255,255,255,0.15); }
.btn-ghost:hover { color: #fff; border-color: #ff5e8a; }
.btn-primary {
  background: linear-gradient(135deg, #ff5e8a, #7b2cbf);
  color: #fff; box-shadow: 0 4px 14px rgba(255,94,138,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,94,138,0.5); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 28px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ===== 主体 ===== */
.page { min-height: calc(100vh - 200px); }

/* ===== 首页 Banner ===== */
.hero {
  position: relative; height: 420px; overflow: hidden;
  background: linear-gradient(135deg, #1a0b3d, #0a0b1e);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--bg);
  background-size: cover; background-position: center;
  filter: brightness(0.55);
  z-index: 1;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,30,0.3) 0%, rgba(10,11,30,0.95) 100%);
  z-index: 2;
}
.hero-inner {
  position: relative; z-index: 3;
  max-width: 1280px; margin: 0 auto; padding: 80px 24px;
  display: flex; flex-direction: column; justify-content: center;
  height: 100%;
}
.hero h1 {
  font-size: 44px; font-weight: 800; color: #fff;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero p { font-size: 18px; color: #c8c8d8; max-width: 600px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 14px; }

/* ===== 区块 ===== */
.section { max-width: 1280px; margin: 0 auto; padding: 56px 24px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px;
}
.section-title {
  font-size: 26px; font-weight: 700; color: #fff;
  position: relative; padding-left: 16px;
}
.section-title::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 4px; background: linear-gradient(180deg, #ff5e8a, #7b2cbf);
  border-radius: 2px;
}
.section-more { color: #8a8aa6; font-size: 14px; }
.section-more:hover { color: #ff5e8a; }

/* ===== 卡片网格 ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .nav { display: none; }
  .hero h1 { font-size: 28px; }
}

/* ===== 直播卡片 ===== */
.live-card {
  background: #15163a; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all .3s; cursor: pointer;
}
.live-card:hover { transform: translateY(-4px); border-color: #ff5e8a; box-shadow: 0 12px 32px rgba(255,94,138,0.15); }
.live-card .cover {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
}
.live-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.live-card:hover .cover img { transform: scale(1.05); }
.live-card .live-tag {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, #ff3366, #ff5e8a);
  color: #fff; padding: 4px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.live-card .live-tag::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; margin-right: 6px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.live-card .viewers {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.6); color: #fff;
  padding: 4px 10px; border-radius: 12px; font-size: 12px;
}
.live-card .body { padding: 16px; }
.live-card .title { font-size: 16px; color: #fff; margin-bottom: 4px; }
.live-card .meta  { color: #8a8aa6; font-size: 13px; }

/* ===== 主播卡片 ===== */
.streamer-card {
  background: #15163a; border-radius: 14px; padding: 24px;
  text-align: center; border: 1px solid rgba(255,255,255,0.06);
  transition: all .3s; cursor: pointer;
}
.streamer-card:hover { transform: translateY(-4px); border-color: #ff5e8a; }
.streamer-card .avatar {
  width: 110px; height: 110px; border-radius: 50%;
  margin: 0 auto 14px; object-fit: cover;
  border: 3px solid #ff5e8a; box-shadow: 0 0 20px rgba(255,94,138,0.4);
}
.streamer-card .name { font-size: 18px; color: #fff; margin-bottom: 6px; }
.streamer-card .desc { color: #8a8aa6; font-size: 13px; }

/* ===== 漫画卡片 ===== */
.manga-card {
  background: #15163a; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all .3s; cursor: pointer;
}
.manga-card:hover { transform: translateY(-4px); border-color: #ff5e8a; }
.manga-card .cover { aspect-ratio: 3/4; overflow: hidden; }
.manga-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.manga-card:hover .cover img { transform: scale(1.05); }
.manga-card .body { padding: 14px 16px 18px; }
.manga-card .title { font-size: 16px; color: #fff; margin-bottom: 4px; }
.manga-card .author { color: #8a8aa6; font-size: 13px; margin-bottom: 8px; }
.manga-card .desc {
  color: #b0b0c0; font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 表单 ===== */
.form-card {
  max-width: 480px; margin: 60px auto;
  background: #15163a; border-radius: 16px;
  padding: 36px; border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.form-card h2 {
  text-align: center; font-size: 24px; color: #fff;
  margin-bottom: 8px;
}
.form-card .sub { text-align: center; color: #8a8aa6; margin-bottom: 28px; font-size: 14px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 13px; color: #b0b0c0;
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px;
  background: #0a0b1e; border: 1px solid #2c2d5a; color: #eee;
  border-radius: 8px; font-size: 14px;
  transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: 0; border-color: #ff5e8a;
}
.form-tip { color: #8a8aa6; font-size: 12px; margin-top: 4px; }
.form-msg { padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.form-msg.err { background: #3a1010; color: #ff8a8a; }
.form-msg.ok  { background: #103a1c; color: #7be58a; }
.form-foot { text-align: center; margin-top: 16px; font-size: 13px; color: #8a8aa6; }
.form-foot a { color: #ff5e8a; }

/* ===== 个人中心 ===== */
.user-panel {
  max-width: 1100px; margin: 32px auto; padding: 0 24px;
  display: grid; grid-template-columns: 280px 1fr; gap: 24px;
}
@media (max-width: 800px) { .user-panel { grid-template-columns: 1fr; } }
.user-side {
  background: #15163a; border-radius: 14px; padding: 28px;
  text-align: center; border: 1px solid rgba(255,255,255,0.06);
}
.user-side .avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg,#ff5e8a,#7b2cbf);
  color: #fff; font-size: 36px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.user-side .name { font-size: 18px; color: #fff; margin-bottom: 4px; }
.user-side .role { color: #8a8aa6; font-size: 13px; margin-bottom: 18px; }
.user-side .balance-card {
  background: linear-gradient(135deg,#f0c040,#ff8a3d);
  color: #2a1500; border-radius: 12px; padding: 18px; margin-bottom: 14px;
}
.user-side .balance-card .label { font-size: 12px; opacity: .8; }
.user-side .balance-card .val { font-size: 30px; font-weight: 700; margin-top: 4px; }
.user-side .verified {
  display: inline-block; padding: 4px 12px; border-radius: 12px;
  font-size: 12px;
}
.user-side .verified.yes { background: #103a1c; color: #7be58a; }
.user-side .verified.no  { background: #3a1010; color: #ff8a8a; }
.user-main { background: #15163a; border-radius: 14px; padding: 28px; border: 1px solid rgba(255,255,255,0.06); }
.user-main h3 { font-size: 18px; color: #fff; margin-bottom: 18px; }
.user-info-row { display: flex; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.user-info-row:last-child { border: 0; }
.user-info-row .k { width: 100px; color: #8a8aa6; }
.user-info-row .v { color: #fff; flex: 1; }

/* ===== 直播详情页 ===== */
.live-room { display: grid; grid-template-columns: 1fr 320px; gap: 16px; max-width: 1400px; margin: 16px auto; padding: 0 16px; }
@media (max-width: 1000px) { .live-room { grid-template-columns: 1fr; } }
.live-main { background: #000; border-radius: 12px; overflow: hidden; }
.live-main .player video { width: 100%; display: block; max-height: 70vh; background: #000; }
.live-info { padding: 16px; background: #15163a; border-radius: 12px; margin-top: 12px; }
.live-info h2 { color: #fff; font-size: 20px; margin-bottom: 6px; }
.live-info .streamer { color: #ff5e8a; font-size: 14px; }
.gift-bar {
  display: flex; gap: 8px; padding: 12px 16px; background: #15163a;
  border-radius: 12px; margin-top: 12px; overflow-x: auto;
}
.gift-item {
  flex: 0 0 auto; padding: 10px 14px; border-radius: 10px;
  background: #0a0b1e; border: 1px solid transparent;
  text-align: center; min-width: 80px; transition: all .2s;
}
.gift-item:hover { border-color: #ff5e8a; transform: translateY(-2px); }
.gift-item .icon { font-size: 24px; }
.gift-item .name { font-size: 12px; color: #fff; margin-top: 4px; }
.gift-item .price { font-size: 11px; color: #f0c040; }

/* ===== 聊天 ===== */
.chat-panel {
  background: #15163a; border-radius: 12px;
  display: flex; flex-direction: column; height: 70vh;
}
.chat-head { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; color: #fff; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.chat-msg { font-size: 13px; margin-bottom: 8px; line-height: 1.6; }
.chat-msg .name { color: #ff5e8a; margin-right: 6px; font-weight: 600; }
.chat-msg.system { color: #f0c040; text-align: center; font-size: 12px; }
.chat-msg.gift   { color: #ffae5a; }
.chat-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; gap: 8px; }
.chat-foot input {
  flex: 1; padding: 10px 12px; background: #0a0b1e;
  border: 1px solid #2c2d5a; color: #eee; border-radius: 20px; font-size: 13px;
}
.chat-foot input:focus { outline: 0; border-color: #ff5e8a; }

/* ===== 漫画详情 ===== */
.manga-detail { max-width: 900px; margin: 0 auto; padding: 24px; }
.manga-header { display: grid; grid-template-columns: 240px 1fr; gap: 28px; margin-bottom: 32px; }
@media (max-width: 700px) { .manga-header { grid-template-columns: 1fr; } }
.manga-header .cover {
  border-radius: 12px; overflow: hidden;
  aspect-ratio: 3/4; background: #15163a;
}
.manga-header .cover img { width: 100%; height: 100%; object-fit: cover; }
.manga-header h1 { color: #fff; font-size: 28px; margin-bottom: 8px; }
.manga-header .author { color: #8a8aa6; margin-bottom: 16px; }
.manga-header .desc { color: #c8c8d8; line-height: 1.8; }
.episodes { display: grid; gap: 12px; }
.episode-item {
  background: #15163a; border-radius: 10px; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.05);
}
.episode-item .info { display: flex; align-items: center; gap: 14px; }
.episode-item .num {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg,#ff5e8a,#7b2cbf);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.episode-item .title { color: #fff; font-size: 15px; }
.episode-item .meta { color: #8a8aa6; font-size: 12px; margin-top: 2px; }
.episode-item .tag-free { color: #7be58a; font-size: 12px; padding: 4px 10px; background: #103a1c; border-radius: 12px; }
.episode-item .tag-paid { color: #f0c040; font-size: 12px; padding: 4px 10px; background: #3a2a10; border-radius: 12px; }

.reader { max-width: 720px; margin: 0 auto; padding: 16px; }
.reader img { width: 100%; border-radius: 8px; margin-bottom: 8px; background: #f0f0f0; }

/* 漫画：付费锁定区域（带模糊预览） */
.locked-pages {
  position: relative;
  margin: 8px 0 20px;
  border-radius: 10px;
  overflow: hidden;
  min-height: 420px;
  background: linear-gradient(180deg, #0a0b1e 0%, #15163a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 94, 138, 0.18);
}
.locked-pages .blur-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px) brightness(0.45) saturate(0.8);
  transform: scale(1.18);
  opacity: 0.85;
}
.locked-pages .lock-overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px;
  color: #fff;
  max-width: 520px;
}
.locked-pages .lock-icon {
  font-size: 56px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 16px rgba(255, 94, 138, 0.45));
  animation: lock-shake 2.5s ease-in-out infinite;
}
@keyframes lock-shake {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-4px) rotate(-3deg); }
  50%      { transform: translateY(0) rotate(0deg); }
  75%      { transform: translateY(-4px) rotate(3deg); }
}
.locked-pages h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.locked-pages .lock-tip {
  color: #d8d8e8;
  margin-bottom: 20px;
  font-size: 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.locked-pages .balance {
  color: #8a8aa6;
  font-size: 13px;
  margin-bottom: 14px;
}
.locked-pages .btn {
  min-width: 220px;
}

/* 漫画：版权信息 */
.copyright-area {
  margin-top: 24px;
  padding: 20px;
  background: #15163a;
  border-radius: 12px;
  text-align: center;
}
.copyright-area img { max-width: 600px; margin: 0 auto 12px; }
.copyright-area p { color: #8a8aa6; font-size: 13px; }

/* ===== 充值中心 ===== */
.recharge-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 700px) { .recharge-grid { grid-template-columns: repeat(2,1fr); } }
.recharge-card {
  background: #15163a; border-radius: 10px; padding: 18px;
  text-align: center; cursor: pointer; border: 2px solid transparent;
  transition: all .2s;
}
.recharge-card:hover { border-color: #ff5e8a; }
.recharge-card.active { border-color: #ff5e8a; background: #1f1145; }
.recharge-card .coins { font-size: 22px; font-weight: 700; color: #f0c040; }
.recharge-card .yuan  { color: #c8c8d8; font-size: 14px; margin-top: 4px; }
.qrcode-area { text-align: center; padding: 24px; background: #15163a; border-radius: 12px; }
.qrcode-area img { width: 400px;  margin: 0 auto 14px; background: #fff; padding: 8px; border-radius: 8px; }
.qrcode-area .hint { color: #8a8aa6; font-size: 13px; }

/* ===== 联系我们 ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: #15163a; border-radius: 14px; padding: 28px; }
.contact-card h3 { color: #fff; font-size: 18px; margin-bottom: 16px; }
.contact-card p  { color: #c8c8d8; line-height: 1.8; margin-bottom: 8px; }
.contact-card strong { color: #ff5e8a; }

/* ===== 底部 ===== */
.footer {
  background: #06071a; padding: 48px 24px 24px;
  margin-top: 60px; border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr  2.2fr 1fr; gap: 32px;
}
@media (max-width: 1200px) { .footer-inner { grid-template-columns: 1fr 1fr 1fr; } .footer-col-wide { grid-column: span 3; } }
@media (max-width: 700px)  { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-col-wide { grid-column: span 2; } }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer p, .footer a { color: #8a8aa6; font-size: 13px; line-height: 1.8; display: block; }
.footer a:hover { color: #ff5e8a; }
.footer-col-wide a { display: inline-block; margin-right: 14px; margin-bottom: 4px; }
.copyright {
  max-width: 1280px; margin: 32px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center; color: #5a5a7a; font-size: 12px;
}

/* ===== 后台 ===== */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side {
  width: 220px; background: #0a0b1e; padding: 24px 0;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.admin-side h3 { color: #fff; padding: 0 24px 16px; font-size: 16px; }
.admin-side a {
  display: block; padding: 12px 24px; color: #b0b0c0;
  border-left: 3px solid transparent; transition: all .2s;
}
.admin-side a:hover, .admin-side a.active { color: #fff; background: rgba(255,94,138,0.08); border-left-color: #ff5e8a; }
.admin-main { flex: 1; padding: 28px; overflow-x: auto; }
.admin-main h2 { color: #fff; font-size: 22px; margin-bottom: 24px; }
.table {
  width: 100%; background: #15163a; border-radius: 10px;
  border-collapse: collapse; overflow: hidden;
}
.table th, .table td { padding: 12px 16px; text-align: left; font-size: 13px; }
.table th { background: #0f1030; color: #b0b0c0; font-weight: 500; }
.table td { color: #d0d0e0; border-top: 1px solid rgba(255,255,255,0.05); }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table input.inline { background: #0a0b1e; border: 1px solid #2c2d5a; color: #eee; padding: 4px 8px; border-radius: 4px; width: 80px; }

/* 弹窗 */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-body {
  background: #15163a; border-radius: 12px;
  padding: 28px; max-width: 480px; width: 90%;
  border: 1px solid rgba(255,255,255,0.08);
}
.modal-body h3 { color: #fff; margin-bottom: 16px; }

/* 提示气泡 */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  background: #15163a; color: #fff; padding: 12px 24px;
  border-radius: 8px; border: 1px solid #ff5e8a;
  z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.toast.show { opacity: 1; }
.toast.ok  { border-color: #7be58a; }
.toast.err { border-color: #ff8a8a; }

/* ===== 礼物栏（重写） ===== */
.gift-bar {
  background: #15163a; border-radius: 12px; margin-top: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.gift-tabs {
  display: flex; gap: 4px; padding: 8px 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.gift-tab {
  padding: 6px 14px; font-size: 13px; color: #8a8aa6;
  border-radius: 8px 8px 0 0; cursor: pointer; user-select: none;
  transition: all .2s;
}
.gift-tab:hover { color: #fff; }
.gift-tab.active {
  color: #fff; background: #0a0b1e;
  box-shadow: 0 -2px 0 #ff5e8a inset;
}
.gift-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 12px;
}
@media (max-width: 700px) { .gift-grid { grid-template-columns: repeat(3, 1fr); } }
.gift-item {
  position: relative;
  padding: 12px 8px; border-radius: 10px; background: #0a0b1e;
  border: 2px solid transparent; text-align: center; cursor: pointer;
  transition: all .2s;
}
.gift-item:hover { border-color: #ff5e8a; transform: translateY(-2px); }
.gift-item.selected { border-color: #ff5e8a; background: #1f1145; box-shadow: 0 0 16px rgba(255,94,138,0.3); }
.gift-item .icon { font-size: 32px; line-height: 1; }
.gift-item .name { font-size: 12px; color: #fff; margin-top: 6px; }
.gift-item .price { font-size: 11px; color: #f0c040; margin-top: 2px; }
.gift-item.gift-tier-3 { box-shadow: inset 0 0 0 1px rgba(123,44,191,0.4); }
.gift-item.gift-tier-3::after,
.gift-item.gift-tier-4::after {
  content: ''; position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd76e, #ff5e8a);
  box-shadow: 0 0 8px #ff5e8a;
}
.gift-item.gift-tier-4::after { background: linear-gradient(135deg, #ff5e8a, #7b2cbf); box-shadow: 0 0 10px #7b2cbf; }

.gift-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-top: 1px solid rgba(255,255,255,0.05);
  flex-wrap: wrap;
}
.qty-wrap { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; }
.qty-label { color: #8a8aa6; font-size: 12px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 6px;
  background: #0a0b1e; border: 1px solid #2c2d5a; color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.qty-btn:hover { border-color: #ff5e8a; }
.qty-input {
  width: 60px; height: 26px; text-align: center;
  background: #0a0b1e; border: 1px solid #2c2d5a; color: #fff;
  border-radius: 6px; font-size: 13px; padding: 0 4px;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input { -moz-appearance: textfield; }
.qty-quick { display: flex; gap: 4px; margin-left: 4px; flex-wrap: wrap; }
.qty-quick span {
  padding: 2px 8px; font-size: 12px; border-radius: 12px;
  background: #0a0b1e; color: #c8c8d8; cursor: pointer; user-select: none;
  border: 1px solid transparent;
}
.qty-quick span:hover { border-color: #ff5e8a; color: #fff; }
.gift-send-wrap { display: flex; align-items: center; gap: 10px; }
.gift-cost { color: #8a8aa6; font-size: 12px; }
.btn-send { min-width: 100px; font-weight: 600; }
.btn-send:disabled { opacity: .5; cursor: not-allowed; }

/* 聊天：等级徽章 */
.chat-msg .tier-badge {
  display: inline-block; font-size: 10px; padding: 1px 6px;
  border-radius: 4px; margin-right: 6px; vertical-align: middle;
}
.chat-msg .tier-badge.t3 { background: linear-gradient(135deg, #7b2cbf, #ff5e8a); color: #fff; }
.chat-msg .tier-badge.t4 { background: linear-gradient(135deg, #ffd76e, #ff5e8a); color: #2a1500; animation: tier-glow 1.2s infinite; }
@keyframes tier-glow { 0%,100%{box-shadow:0 0 0 #ffd76e} 50%{box-shadow:0 0 12px #ffd76e} }
.chat-msg.gift .qty { color: #ff5e8a; }
.chat-msg.gift .total { color: #8a8aa6; font-size: 11px; margin-left: 4px; }

/* ===== 礼物特效层 ===== */
.gift-fx-layer {
  position: fixed; inset: 0; pointer-events: none;
  z-index: 1500; overflow: hidden;
}

/* 普通飘屏 */
.gift-fx-float {
  position: absolute; font-size: 38px;
  animation: float-up linear forwards;
  filter: drop-shadow(0 4px 12px rgba(255,94,138,.4));
  will-change: transform, opacity;
}
.gift-fx-float.tier-2 { font-size: 48px; }
@keyframes float-up {
  0%   { transform: translateY(0)      translateX(0)   scale(.4) rotate(0);   opacity: 0; }
  10%  { transform: translateY(-20px)  translateX(0)   scale(1)  rotate(0);   opacity: 1; }
  60%  { transform: translateY(-60vh)  translateX(20px) scale(1)  rotate(15deg); opacity: 1; }
  100% { transform: translateY(-110vh) translateX(40px) scale(.6) rotate(30deg); opacity: 0; }
}

/* 全屏特效基础 */
.gift-fx-screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800;
}
.gift-fx-screen .sc-icon { font-size: 120px; animation: pop 1s ease forwards; }
@keyframes pop {
  0%   { transform: scale(0);   opacity: 0; }
  40%  { transform: scale(1.2); opacity: 1; }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* 跑车 */
.fx-screen-car { background: linear-gradient(180deg, transparent, rgba(0,0,0,.4), transparent); }
.fx-screen-car .car-body { position: absolute; font-size: 140px; top: 50%; left: -200px; transform: translateY(-50%); animation: car-move 3s ease-out forwards; filter: drop-shadow(0 8px 20px rgba(255,94,138,.6)); }
.fx-screen-car .car-dust { position: absolute; bottom: 30%; left: 0; width: 100%; height: 60px; background: repeating-linear-gradient(90deg, transparent, rgba(255,255,255,.1) 10px, transparent 20px); animation: car-dust 3s linear forwards; }
.fx-screen-car .car-text { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); font-size: 28px; color: #ffd76e; text-shadow: 0 2px 12px #ff5e8a; animation: text-fade 3s ease-out forwards; }
@keyframes car-move { 0%{left:-200px} 100%{left:120%} }
@keyframes car-dust { 0%{opacity:0} 20%{opacity:1} 100%{opacity:0} }
@keyframes text-fade { 0%,60%{opacity:0;transform:translateX(-50%) translateY(20px)} 20%,80%{opacity:1;transform:translateX(-50%) translateY(0)} 100%{opacity:0} }

/* 火箭 */
.fx-screen-rocket { background: radial-gradient(ellipse at center, rgba(123,44,191,.25), transparent 70%); }
.fx-screen-rocket .rk-body { position: absolute; bottom: -200px; left: 50%; transform: translateX(-50%); font-size: 140px; animation: rk-fly 3s ease-in forwards; filter: drop-shadow(0 0 20px #ff5e8a); }
.fx-screen-rocket .rk-trail { position: absolute; bottom: 0; left: 50%; width: 6px; height: 0; background: linear-gradient(180deg, #ff5e8a, transparent); transform: translateX(-50%); animation: rk-trail 3s ease-in forwards; box-shadow: 0 0 20px #ff5e8a; }
.fx-screen-rocket .rk-text { position: absolute; top: 15%; left: 50%; transform: translateX(-50%); font-size: 32px; color: #ffd76e; text-shadow: 0 2px 16px #ff5e8a; opacity: 0; animation: text-fade 3s ease-out forwards; }
@keyframes rk-fly { 0%{bottom:-200px;transform:translateX(-50%) rotate(0)} 50%{transform:translateX(-50%) rotate(-8deg)} 100%{bottom:120%;transform:translateX(-50%) rotate(0)} }
@keyframes rk-trail { 0%{height:0;opacity:1} 90%{height:90vh;opacity:1} 100%{height:90vh;opacity:0} }

/* 烟花 */
.fx-screen-firework { background: radial-gradient(ellipse at center, rgba(255,94,138,.2), transparent 60%); }
.fx-screen-firework .fw-icon { font-size: 100px; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); animation: pop 1s ease forwards; }
.fx-screen-firework .fw-text { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 32px; color: #ffd76e; text-shadow: 0 2px 16px #ff5e8a; animation: text-fade 4s ease-out forwards; }
.fx-screen-firework .fw-burst {
  position: absolute; top: 40%; left: 50%;
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, #ffd76e, transparent 70%);
  transform: translate(-50%,-50%);
  animation: fw-burst 2s ease-out infinite;
}
.fx-screen-firework .fw-burst::before,
.fx-screen-firework .fw-burst::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, #ff5e8a, transparent 70%);
  animation: fw-burst 2s ease-out infinite .6s;
}
.fx-screen-firework .fw-burst::after { background: radial-gradient(circle, #7b2cbf, transparent 70%); animation-delay: 1.2s; }
.fx-screen-firework .b2 { top: 30%; left: 30%; }
.fx-screen-firework .b3 { top: 60%; left: 70%; }
@keyframes fw-burst {
  0%   { transform: translate(-50%,-50%) scale(0);  opacity: 0; }
  30%  { transform: translate(-50%,-50%) scale(8);  opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(20); opacity: 0; }
}

/* 城堡 */
.fx-screen-castle { background: radial-gradient(ellipse at center, rgba(255,215,110,.25), transparent 70%); }
.fx-screen-castle .cs-body { font-size: 220px; animation: castle-in 2.5s ease-out forwards; filter: drop-shadow(0 0 40px #ffd76e); }
.fx-screen-castle .cs-text { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 30px; color: #ffd76e; text-shadow: 0 2px 16px #7b2cbf; animation: text-fade 3.5s ease-out forwards; }
.fx-screen-castle .cs-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #fff, transparent),
    radial-gradient(2px 2px at 80% 20%, #fff, transparent),
    radial-gradient(1px 1px at 50% 50%, #fff, transparent),
    radial-gradient(2px 2px at 30% 70%, #fff, transparent),
    radial-gradient(1px 1px at 70% 80%, #fff, transparent),
    radial-gradient(2px 2px at 10% 50%, #fff, transparent);
  background-size: 200px 200px;
  animation: star-twinkle 2s ease-in-out infinite alternate;
  opacity: .8;
}
@keyframes castle-in {
  0%   { transform: translateY(60vh) scale(.2); opacity: 0; }
  60%  { transform: translateY(0)    scale(1.1); opacity: 1; }
  100% { transform: translateY(0)    scale(1);   opacity: 1; }
}
@keyframes star-twinkle { 0%{opacity:.3} 100%{opacity:1} }

/* 皇冠（传说） */
.fx-screen-crown {
  background: radial-gradient(ellipse at center, rgba(255,215,110,.35), rgba(123,44,191,.2), transparent 70%);
}
.fx-screen-crown .cr-body { font-size: 260px; animation: crown-in 2.5s ease-out forwards; filter: drop-shadow(0 0 60px #ffd76e); }

/* ===== 协议中心 ===== */
.agreement-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .agreement-layout { grid-template-columns: 1fr; }
  .agreement-side   { position: static !important; }
}

.agreement-side {
  background: #15163a;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 18px 16px;
  position: sticky;
  top: 88px;
  height: max-content;
}
.side-title { color: #fff; font-size: 15px; margin-bottom: 14px; padding: 0 6px; }
.side-list  { list-style: none; padding: 0; margin: 0; }
.side-list li { margin-bottom: 2px; }
.side-list a {
  display: block;
  padding: 9px 12px;
  font-size: 13px;
  color: #c8c8d8;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.side-list a:hover { background: rgba(255,94,138,0.08); color: #ff5e8a; }
.side-list a.active { background: linear-gradient(90deg, rgba(255,94,138,0.18), rgba(123,44,191,0.12)); color: #ff5e8a; font-weight: 600; }
.side-foot { margin-top: 14px; padding: 10px 6px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.side-foot a { font-size: 12px; color: #8a8aa6; }

.agreement-main {
  background: #15163a;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 36px 44px;
  min-width: 0;
}
@media (max-width: 700px) { .agreement-main { padding: 24px 20px; } }

.agree-head { border-bottom: 1px solid rgba(255,255,255,0.06); padding-bottom: 18px; margin-bottom: 24px; }
.agree-head h1 { color: #fff; font-size: 26px; font-weight: 700; }
.agree-meta { color: #8a8aa6; font-size: 13px; margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

.agree-body { color: #d8d8e8; font-size: 15px; line-height: 1.85; }
.agree-body h2 { color: #fff; font-size: 18px; font-weight: 600; margin: 28px 0 12px; padding-left: 12px; border-left: 3px solid #ff5e8a; }
.agree-body h2:first-child { margin-top: 0; }
.agree-body p  { margin-bottom: 12px; }
.agree-body ol, .agree-body ul { padding-left: 24px; margin-bottom: 14px; }
.agree-body li { margin-bottom: 6px; }
.agree-body b { color: #fff; }
.agree-body a { color: #ff5e8a; text-decoration: underline; }

.agree-foot {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #8a8aa6;
  font-size: 13px;
}
.agree-foot a { color: #ff5e8a; text-decoration: underline; }
.fx-screen-crown .cr-rays {
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255,215,110,.15) 10deg, transparent 20deg, transparent 60deg, rgba(255,215,110,.15) 70deg, transparent 80deg, transparent 120deg, rgba(255,215,110,.15) 130deg, transparent 140deg, transparent 180deg, rgba(255,215,110,.15) 190deg, transparent 200deg, transparent 240deg, rgba(255,215,110,.15) 250deg, transparent 260deg, transparent 300deg, rgba(255,215,110,.15) 310deg, transparent 320deg, transparent 360deg);
  animation: crown-rays 4s linear infinite;
}
.fx-screen-crown .cr-text { position: absolute; top: 16%; left: 50%; transform: translateX(-50%); font-size: 36px; color: #ffd76e; text-shadow: 0 0 20px #ff5e8a, 0 0 40px #ffd76e; animation: text-fade 3.5s ease-out forwards; letter-spacing: 4px; }
@keyframes crown-in {
  0%   { transform: translateY(-60vh) scale(.5) rotate(-20deg); opacity: 0; }
  60%  { transform: translateY(0)     scale(1.1) rotate(0);     opacity: 1; }
  100% { transform: translateY(0)     scale(1)   rotate(0);     opacity: 1; }
}
@keyframes crown-rays { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

/* 连击 */
.gift-combo {
  position: absolute; left: 50%; top: 30%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,94,138,.9), rgba(123,44,191,.9));
  box-shadow: 0 0 30px rgba(255,94,138,.5);
  color: #fff; font-weight: 800;
  opacity: 0; transition: opacity .2s;
}
.gift-combo.bump { animation: combo-bump .35s ease; }
.gift-combo .c-icon { font-size: 48px; }
.gift-combo .c-num { font-size: 48px; line-height: 1; }
.gift-combo .c-num span { color: #ffd76e; font-size: 64px; }
.gift-combo .c-tip { font-size: 14px; opacity: .9; }
@keyframes combo-bump {
  0%   { transform: translate(-50%, -50%) scale(1); }
  40%  { transform: translate(-50%, -50%) scale(1.25); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
