* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #fff2d1;
  background-color: #170409;
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(190, 25, 45, .5), transparent 62%),
    radial-gradient(ellipse 80% 45% at 50% 108%, rgba(150, 95, 10, .45), transparent 58%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .014) 0 2px, transparent 2px 7px);
  min-height: 100dvh;
  font-size: 15px;
  line-height: 1.6;
}
a { color: #ffd76a; text-decoration: none; }
.wrap { max-width: 520px; margin: 0 auto; padding: 0 12px 40px; min-height: 100dvh; display: flex; flex-direction: column; }

/* ============ 导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(23, 4, 9, .96), rgba(23, 4, 9, .82) 70%, rgba(23, 4, 9, 0));
  backdrop-filter: blur(6px);
}
.nav .brand {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 17px; letter-spacing: .08em; color: #ffe17a;
  text-shadow: 0 0 10px rgba(255, 160, 40, .8);
  white-space: nowrap;
}
.nav .brand span { color: #ff4a5c; }
.navlinks { display: flex; gap: 12px; font-size: 13.5px; flex: 1; }
.navlinks a { color: #d9bf93; }
.navlinks a:hover { color: #ffd76a; }
.navuser { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.navuser .bal { color: #7dffc4; font-weight: 700; white-space: nowrap; }
.navuser a { color: #c0a478; }
.btn-sm { padding: 3px 10px; border: 1px solid rgba(247, 201, 75, .5); border-radius: 7px; color: #ffd76a !important; }
.main { flex: 1; }

/* ============ 通用组件 ============ */
.card {
  background: rgba(255, 240, 200, .04);
  border: 1px solid rgba(247, 201, 75, .16);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.cardhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card h2 { font-size: 18px; color: #ffe6a8; }
.card h3 { font-size: 15px; color: #ffe6a8; margin-bottom: 10px; }
.balance-big { font-size: 13px; color: #b99a6a; }
.balance-big b { color: #7dffc4; font-size: 18px; }
.flash {
  margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px;
  background: rgba(90, 255, 180, .12); border: 1px solid rgba(90, 255, 180, .35); color: #8dffcd;
}
.flash.err { background: rgba(255, 90, 90, .12); border-color: rgba(255, 90, 90, .4); color: #ff9f9f; }
.notice {
  padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.7;
  background: rgba(255, 200, 90, .07); border: 1px solid rgba(255, 200, 90, .22); color: #e3c691;
  margin-bottom: 12px;
}
.notice.small { font-size: 12px; padding: 8px 12px; }
.empty { color: #8a7350; text-align: center; padding: 24px 0; font-size: 13.5px; }
.dim { color: #8a7350; }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
.center { text-align: center; }
.divider { height: 1px; background: rgba(247, 201, 75, .14); margin: 14px 0; }
.linkrow { text-align: center; margin-top: 14px; display: flex; gap: 10px; justify-content: center; }

/* 按钮 */
.btn {
  display: inline-block; padding: 11px 26px; border-radius: 10px; border: none;
  font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
  color: #401600;
  background: linear-gradient(180deg, #ffe9a8, #f7c94b 42%, #c98a10 72%, #a06a08);
  box-shadow: 0 4px 0 #4a2b02, 0 8px 18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: transform .08s;
  text-align: center;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #4a2b02, 0 4px 10px rgba(0, 0, 0, .4); }
.btn.full { display: block; width: 100%; }
.btn.ghost {
  background: transparent; color: #ffd76a; border: 1px solid rgba(247, 201, 75, .5);
  box-shadow: none; font-weight: 600;
}

/* 表单 */
.field { display: block; margin-bottom: 13px; }
.field span { display: block; font-size: 12.5px; color: #b99a6a; margin-bottom: 5px; }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: 9px;
  border: 1px solid rgba(247, 201, 75, .22);
  background: rgba(0, 0, 0, .38);
  color: #fff2d1; font-family: inherit; font-size: 15px;
  outline: none; transition: border-color .18s;
}
.field input:focus, .field textarea:focus { border-color: rgba(247, 201, 75, .7); }
.authcard { max-width: 380px; margin: 30px auto 0; }
.authcard h2 { font-size: 20px; margin-bottom: 4px; }
.authcard .tip { font-size: 13px; color: #8dffcd; margin-bottom: 14px; }
.authcard .alt { text-align: center; font-size: 13px; color: #8a7350; margin-top: 14px; }

/* ============ 老虎机 ============ */
.machine {
  position: relative;
  border-radius: 22px;
  padding: 0 12px 14px;
  background: linear-gradient(180deg, #4a3416 0%, #241609 16%, #1b1108 50%, #26190c 84%, #4a3416 100%);
  box-shadow:
    0 0 0 2px rgba(247, 201, 75, .45),
    0 0 0 6px #120a04,
    0 22px 48px rgba(0, 0, 0, .65),
    inset 0 1px 0 rgba(255, 232, 165, .3);
  overflow: hidden;
}
.machine::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 215, 120, .03) 0 1px, transparent 1px 6px);
}
.machine-locked { filter: saturate(.8) brightness(.95); }

.lamps { display: flex; justify-content: center; gap: 6px; padding: 9px 0 2px; }
.lamps i {
  width: 6px; height: 6px; border-radius: 50%; background: #ffd267;
  box-shadow: 0 0 6px #ffae2b, 0 0 12px #ff8400;
  animation: blink 1.6s infinite;
}
.lamps i:nth-child(3n) { animation-delay: .3s; }
.lamps i:nth-child(2n) { animation-delay: .55s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.brandline { text-align: center; padding: 2px 0 8px; }
.brandline .sub { display: block; font-size: 9px; letter-spacing: .38em; color: #c99a45; font-weight: 700; }
h1.neon {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(24px, 7.2vw, 34px);
  letter-spacing: .05em; color: #ffe17a;
  text-shadow: 0 0 8px rgba(255, 190, 40, .95), 0 0 24px rgba(255, 90, 20, .8), 0 3px 0 #6b1a00;
}

.meters { display: flex; gap: 7px; margin: 0 2px 9px; }
.meter {
  flex: 1; border-radius: 9px; padding: 6px 11px;
  background: linear-gradient(180deg, #071014, #0d1b16 55%, #060c10);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(120, 255, 190, .22);
  display: flex; align-items: center; justify-content: space-between;
}
.meter .lbl { font-size: 8.5px; letter-spacing: .14em; color: #6fe3b4; font-weight: 700; }
.meter .val {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(14px, 4.2vw, 18px); font-weight: 700; color: #7dffc4;
  text-shadow: 0 0 10px rgba(90, 255, 180, .7);
}
.meter.win .lbl { color: #ffc85c; }
.meter.win .val { color: #ffd76a; text-shadow: 0 0 10px rgba(255, 190, 60, .7); }

.window {
  position: relative; border-radius: 14px; padding: 7px;
  background: linear-gradient(180deg, #090204, #1b0608 48%, #090204);
  box-shadow: inset 0 0 0 2px rgba(247, 201, 75, .28), inset 0 0 30px rgba(0, 0, 0, .92), 0 0 20px rgba(255, 60, 0, .14);
  overflow: hidden;
}
.reels { display: flex; gap: 5px; position: relative; z-index: 1; }
.reel {
  flex: 1; min-width: 0;
  height: calc(var(--cell, 76px) * 3);
  border-radius: 6px; overflow: hidden; background: #0f0508;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, .96), inset 0 0 0 1px rgba(255, 200, 90, .18);
  position: relative;
}
.reel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent 18%, transparent 82%, rgba(0,0,0,.6));
}
.strip { will-change: transform; }
.cell {
  height: var(--cell, 76px);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(255, 210, 110, .05);
  transition: background .25s;
}
.cell.flashcell {
  background: radial-gradient(ellipse at center, rgba(255, 210, 80, .26), transparent 70%);
  animation: cellPulse 1.1s ease-in-out infinite;
}
@keyframes cellPulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 215, 90, .5); }
  50% { box-shadow: inset 0 0 20px rgba(255, 215, 90, .8); }
}
.glyph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ico { height: 66%; aspect-ratio: 1; width: auto; display: block; filter: drop-shadow(0 3px 5px rgba(0,0,0,.6)); }
.seven {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: calc(var(--cell, 76px) * .6); line-height: 1;
  color: #ff2f3f; -webkit-text-stroke: 2px #ffdb6b;
  text-shadow: 0 0 18px rgba(255, 45, 65, .85), 0 3px 0 #7a0c16;
}
.barbox {
  font-weight: 900; font-size: calc(var(--cell, 76px) * .23); letter-spacing: .03em;
  color: #331800; padding: .2em .48em; border-radius: 5px;
  background: linear-gradient(180deg, #fff5cc, #f7c94b 44%, #b3801a);
  box-shadow: 0 3px 0 #6b4a05, inset 0 0 0 1px #fff6cc;
}
.payline {
  position: absolute; left: 8px; right: 8px;
  top: calc(7px + var(--cell, 76px));
  height: var(--cell, 76px);
  border-top: 2px dashed rgba(255, 70, 70, .38);
  border-bottom: 2px dashed rgba(255, 70, 70, .38);
  border-radius: 4px; pointer-events: none; z-index: 4;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.payline.hit {
  border-color: #ffd76a; background: rgba(255, 205, 70, .09);
  box-shadow: 0 0 24px rgba(255, 190, 60, .5);
}
.glass {
  position: absolute; inset: 0; pointer-events: none; z-index: 5; border-radius: 14px;
  background: linear-gradient(118deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 26%, transparent 42%);
}

.bets { display: flex; gap: 5px; margin: 11px 2px 0; }
.bet {
  flex: 1; padding: 8px 0; border-radius: 8px;
  border: 1px solid rgba(247, 201, 75, .28);
  background: rgba(255, 220, 120, .05); color: #ffe3a4;
  font-weight: 700; font-size: 13px; font-family: inherit; cursor: pointer;
  transition: all .18s;
}
.bet.on {
  background: linear-gradient(180deg, #ffdf8a, #f7c94b 46%, #b8801a);
  color: #341700; border-color: #fff0bf;
  box-shadow: 0 0 14px rgba(255, 185, 45, .5);
}
.spin {
  display: block; width: 100%; height: 56px; margin: 9px 0 0;
  border: none; border-radius: 13px;
  font-family: inherit; font-size: 19px; font-weight: 900; letter-spacing: .14em;
  color: #4a1200; cursor: pointer;
  background: linear-gradient(180deg, #fff0bb, #f7c94b 40%, #cd8f12 70%, #8a5c05);
  box-shadow: 0 5px 0 #46290a, 0 10px 22px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .8);
  transition: transform .07s, box-shadow .07s, filter .2s;
}
.spin:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #46290a, 0 6px 12px rgba(0,0,0,.45); }
.spin:disabled { filter: saturate(.5) brightness(.85); cursor: default; }
.spin.rolling span { animation: rollpulse .7s ease-in-out infinite; }
@keyframes rollpulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.payout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 11px; }
.tag {
  background: rgba(0, 0, 0, .32); border: 1px solid rgba(247, 201, 75, .15);
  border-radius: 6px; padding: 4px; text-align: center;
  font-size: 10px; color: #b99a6a; line-height: 1.5;
}
.tag b { color: #ffd76a; font-size: 10.5px; }
.tag.wide { grid-column: span 3; font-size: 10px; }

.loginhint { text-align: center; padding: 22px 16px 6px; }
.loginhint p { font-size: 13px; color: #b99a6a; margin-bottom: 14px; }
.loginhint .btn { margin: 0 5px; }

.toast {
  position: fixed; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(.85);
  padding: 14px 30px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 226, 130, .97), rgba(215, 150, 20, .97));
  color: #42170a; font-weight: 900; font-size: 19px; letter-spacing: .06em;
  box-shadow: 0 0 0 3px rgba(255,255,255,.5), 0 16px 40px rgba(0,0,0,.6), 0 0 50px rgba(255,180,40,.6);
  opacity: 0; pointer-events: none; z-index: 60; white-space: nowrap;
  transition: opacity .2s, transform .3s cubic-bezier(.1, 1.4, .5, 1);
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.flashfx {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255, 225, 130, .5), transparent 65%);
}
.flashfx.on { animation: flashbang .55s ease-out; }
@keyframes flashbang { 0% { opacity: .9; } 100% { opacity: 0; } }

/* ============ 商城 ============ */
.pagehead { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 14px; }
.pagehead h2 { font-size: 19px; color: #ffe6a8; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcard {
  display: block; border-radius: 14px; overflow: hidden;
  background: rgba(255, 240, 200, .045);
  border: 1px solid rgba(247, 201, 75, .15);
  transition: transform .18s, border-color .18s;
}
.pcard:active { transform: scale(.98); }
.pthumbnail, .pthumb {
  position: relative; height: 110px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #2a1108, #150608);
  overflow: hidden;
}
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pthumb .ph {
  font-size: 13px; color: #c99a45; letter-spacing: .18em;
  border: 1px dashed rgba(247, 201, 75, .3); border-radius: 8px; padding: 8px 14px;
}
.pthumb .ph.big { font-size: 18px; padding: 22px 40px; }
.ptype {
  position: absolute; top: 6px; left: 6px; font-style: normal; font-size: 10px;
  padding: 1px 7px; border-radius: 20px; color: #ffd76a;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(247, 201, 75, .3);
}
.pbody { padding: 9px 10px 11px; }
.pbody h4 { font-size: 13.5px; color: #ffe6c0; font-weight: 600; line-height: 1.35; height: 38px; overflow: hidden; }
.pfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price { color: #ffd76a; font-weight: 800; font-size: 15px; }
.price i { font-style: normal; font-size: 10px; color: #a88a55; font-weight: 400; }
.stock { font-size: 10.5px; color: #8a7350; }

.product-detail .pd-top { display: flex; gap: 14px; margin-bottom: 14px; }
.pd-img {
  width: 118px; min-width: 118px; height: 118px; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #2a1108, #150608);
  border: 1px solid rgba(247, 201, 75, .15);
}
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-img .ph { font-size: 15px; color: #c99a45; letter-spacing: .16em; }
.pd-img .ph.big { padding: 26px 20px; }
.pd-meta { flex: 1; min-width: 0; }
.ptag { font-size: 10.5px; color: #8dffcd; }
.pd-meta h2 { font-size: 17px; color: #ffe6a8; margin: 6px 0; line-height: 1.4; }
.pd-price { font-size: 22px; font-weight: 900; color: #ffd76a; }
.pd-price i { font-style: normal; font-size: 11px; color: #a88a55; font-weight: 400; }
.pd-stock { font-size: 12px; color: #8a7350; margin-top: 4px; }
.pd-desc {
  padding: 12px; border-radius: 10px; background: rgba(0, 0, 0, .28);
  font-size: 13px; color: #d3bb93; line-height: 1.75; margin-bottom: 14px;
}
.confirmline { font-size: 13px; color: #b99a6a; margin: 4px 0 14px; text-align: center; }
.confirmline b { color: #ffd76a; font-size: 16px; }

/* 订单 */
.ordercard {
  display: block; border-radius: 13px; padding: 12px 14px; margin-bottom: 10px;
  background: rgba(255, 240, 200, .04);
  border: 1px solid rgba(247, 201, 75, .14);
}
.ordercard:active { background: rgba(255, 240, 200, .08); }
.oc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.oc-mid { display: flex; justify-content: space-between; align-items: center; }
.oc-name { font-size: 14px; color: #ffe6c0; }
.oc-price { font-size: 13px; color: #ffd76a; font-weight: 700; }
.oc-bot { font-size: 11.5px; margin-top: 6px; }
.pill { font-size: 11px; padding: 2px 9px; border-radius: 20px; }
.pill.ok { background: rgba(90, 255, 180, .15); color: #8dffcd; }
.pill.wait { background: rgba(255, 200, 90, .15); color: #ffd76a; }
.pill.dim { background: rgba(255, 255, 255, .06); color: #8a7350; }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13.5px; }
.kv span { color: #8a7350; flex: none; }
.kv b { color: #ffe6c0; font-weight: 600; text-align: right; word-break: break-all; }
.codebox { background: rgba(0, 0, 0, .4); border: 1px dashed rgba(255, 215, 100, .35); border-radius: 10px; padding: 12px; }
.codebox-h { font-size: 11.5px; color: #a88a55; margin-bottom: 7px; letter-spacing: .1em; }
.codebox pre { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; color: #8dffcd; white-space: pre-wrap; word-break: break-all; }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; color: #8a7350; font-weight: 500; padding: 7px 8px; border-bottom: 1px solid rgba(247, 201, 75, .14); white-space: nowrap; }
.tbl td { padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, .04); color: #d9c8a8; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.winv { color: #8dffcd; font-weight: 700; }
.res span { display: inline-block; padding: 1px 5px; margin-right: 2px; border-radius: 4px; background: rgba(0,0,0,.35); font-size: 11px; }

/* 充值 */
.quick { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.qbtn {
  flex: 1; min-width: 56px; padding: 9px 0; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(247, 201, 75, .28); background: rgba(255, 220, 120, .05);
  color: #ffe3a4; font-family: inherit; font-weight: 700; font-size: 14px;
}
.qbtn:hover { background: rgba(255, 220, 120, .14); }
.paych { display: flex; gap: 9px; margin: 4px 0 16px; }
.ch {
  flex: 1; padding: 11px 12px; border-radius: 11px; cursor: pointer;
  border: 1px solid rgba(247, 201, 75, .18); background: rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; gap: 2px;
}
.ch.on { border-color: rgba(247, 201, 75, .75); background: rgba(255, 210, 90, .1); }
.ch input { display: none; }
.cname { font-size: 14px; font-weight: 700; color: #ffe6c0; }
.cdesc { font-size: 10.5px; color: #8a7350; }

.foot { text-align: center; font-size: 11px; color: #5e4a30; padding: 24px 0 4px; margin-top: auto; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
