*{box-sizing:border-box}
:root{color-scheme:dark}
html,body{margin:0;min-height:100%;background:#080302;color:#fff4d8;font-family:Inter,Manrope,"Segoe UI",Arial,sans-serif}
body{display:flex;justify-content:center;background:radial-gradient(circle at 50% 0,rgba(171,92,18,.18),transparent 38%),#080302}
button,a{font:inherit}
.history-page{width:min(100%,720px);min-height:100dvh;padding-bottom:max(42px,env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(15,6,3,.98),rgba(8,3,2,.99));box-shadow:0 0 60px rgba(0,0,0,.48)}
.history-header{height:78px;padding:0 18px;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;border-bottom:3px solid #d7a12d;background:linear-gradient(115deg,#120804,#080604 34%,#24170c 50%,#080604 66%,#120804)}
.history-back{width:40px;height:40px;display:grid;place-items:center;color:#f7ce66;text-decoration:none;font-size:38px;line-height:1}
.history-brand{grid-column:2;min-width:0;display:flex;align-items:center;justify-content:center;gap:11px;color:#ffd16a;text-decoration:none}
.history-brand img{width:50px;height:50px;object-fit:contain}
.history-brand strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px;letter-spacing:.3px}
.history-content{padding:34px 30px 0}
.history-title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}
.history-eyebrow{display:block;margin-bottom:5px;color:#d9a83e;font-size:12px;font-weight:800;letter-spacing:1.3px}
h1{margin:0;color:#ffd875;font-size:clamp(26px,5vw,35px);line-height:1.08;text-shadow:0 3px 14px rgba(0,0,0,.5)}
#historyRefresh{min-width:86px;height:44px;padding:0 19px;border:1px solid #b97819;border-radius:999px;background:linear-gradient(145deg,#2a160d,#140b08);color:#ffd775;font-weight:850;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,229,153,.12)}
#historyRefresh:hover{filter:brightness(1.13)}
#historyRefresh:disabled{opacity:.55;cursor:wait}
.history-account{min-height:58px;margin-bottom:18px;padding:9px 16px;display:flex;align-items:center;justify-content:space-between;gap:15px;border:1px solid rgba(218,157,47,.35);border-radius:14px;background:rgba(35,18,11,.74);color:#cdbb9d;font-size:13px}
.history-account strong{color:#ffe09a;font-size:17px;letter-spacing:.5px}
.history-status{margin:0 0 14px;padding:11px 14px;border:1px solid rgba(239,87,87,.45);border-radius:12px;background:rgba(88,22,22,.32);color:#ffb4b4;font-size:13px}
.history-list{overflow:hidden;border:1px solid rgba(225,163,52,.38);border-radius:20px;background:linear-gradient(145deg,rgba(30,15,9,.94),rgba(13,8,6,.97));box-shadow:0 22px 44px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,224,143,.07)}
.history-row{min-height:132px;padding:22px 20px;display:grid;grid-template-columns:70px minmax(0,1fr) auto;align-items:center;gap:18px;border-bottom:1px solid rgba(255,224,169,.12)}
.history-row:last-child{border-bottom:0}
.history-coin,.history-coin img{width:62px;height:62px;display:block;border-radius:50%}
.history-coin img{object-fit:contain}
.history-copy{min-width:0;display:grid;gap:5px}
.history-copy b{font-size:18px;color:#fff5d8}
.history-copy small{font-size:13px;color:#cdbb9d}
.history-copy .history-detail{color:#e9c56d}
.history-value{text-align:right;color:#31ee91;font-size:24px;font-weight:900;white-space:nowrap}
.history-value small{display:block;margin-top:9px;color:#cdbb9d;font-size:12px;font-weight:600}
.history-empty{min-height:290px;padding:40px 20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;color:#ad9f8d;text-align:center}
.history-empty span{width:74px;height:74px;display:grid;place-items:center;border:1px solid rgba(226,171,67,.34);border-radius:50%;background:rgba(45,25,14,.65);color:#efc866;font-size:38px}
.history-empty .history-empty-chest{position:relative;width:92px;height:76px;display:block;border:0;border-radius:0;background:transparent;color:inherit;filter:drop-shadow(0 10px 16px rgba(0,0,0,.38))}
.history-empty .history-empty-chest::before{content:"";position:absolute;left:8px;right:8px;bottom:7px;height:38px;border:2px solid #d69b30;border-radius:8px 8px 13px 13px;background:linear-gradient(90deg,#6e4215 0%,#e1aa3f 22%,#8b541a 50%,#e6b347 78%,#6a3d12 100%);box-shadow:inset 0 6px 10px rgba(255,225,133,.18),inset 0 -8px 12px rgba(50,22,3,.42),0 0 0 1px rgba(255,224,128,.08)}
.history-empty .history-empty-chest::after{content:"";position:absolute;left:5px;right:5px;top:12px;height:31px;border:2px solid #e4ad42;border-radius:25px 25px 8px 8px;background:linear-gradient(90deg,#704416 0%,#e9ba52 24%,#8b561c 50%,#efc35e 76%,#6d4013 100%);box-shadow:inset 0 5px 9px rgba(255,235,159,.23),0 5px 8px rgba(20,7,1,.35)}
.history-empty .history-empty-chest i{position:absolute;z-index:2;left:50%;top:34px;width:22px;height:27px;transform:translateX(-50%);border:1px solid #f4cf73;border-radius:5px;background:linear-gradient(180deg,#f0c866,#9d621b);box-shadow:0 2px 7px rgba(0,0,0,.38)}
.history-empty .history-empty-chest i::before{content:"";position:absolute;left:50%;top:7px;width:5px;height:8px;transform:translateX(-50%);border-radius:50% 50% 3px 3px;background:#3b2109}
.history-empty b{font-size:17px}
@media(max-width:520px){
  .history-header{grid-template-columns:38px minmax(0,1fr) 38px;padding:0 10px}
  .history-brand{gap:7px}.history-brand img{width:43px;height:43px}.history-brand strong{font-size:15px}
  .history-content{padding:25px 12px 0}.history-title-row{align-items:center;margin-bottom:14px}
  #historyRefresh{min-width:72px;height:40px;padding:0 14px;font-size:14px}
  .history-row{min-height:112px;padding:16px 12px;grid-template-columns:52px minmax(0,1fr) auto;gap:11px}
  .history-coin,.history-coin img{width:48px;height:48px}.history-copy b{font-size:15px}.history-copy small{font-size:11px}.history-value{font-size:18px}.history-value small{font-size:10px}
}
