* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

:root {
    --bg:#07050d; --bg2:#0d0b16; --surface:#13111e; --surface2:#1a1828;
    --border:rgba(255,255,255,0.07); --border2:rgba(255,255,255,0.12);
    --text1:#f0f4ff; --text2:#9096b8; --text3:#52566e;
    --accent1:#7033ff; --accent2:#a855f7; --accent3:#d084ff;
    --gold:#c8882a; --gold-bg:#1e1508; --green:#1a7a4a; --green-bg:#0a1a0f;
    --purple:#5533bb; --purple-bg:#110d22; --blue:#1a4a88; --blue-bg:#090f1e;
    --red:#8a2233; --red-bg:#1a080c; --glow1:rgba(112,51,255,0.25);
}

body { font-family:'Outfit',sans-serif; background:var(--bg); color:var(--text1); min-height:100vh; overflow-x:hidden; }

body::before {
    content:""; position:fixed; top:0; left:0; right:0; height:2px;
    background:linear-gradient(90deg,transparent,var(--accent1),var(--accent2),var(--accent3),transparent);
    z-index:9999;
}

.page { display:none; min-height:100vh; }
.page.active { display:block; animation:fadeIn 0.2s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Login Page */
#loginPage { min-height:100vh; display:none; align-items:center; justify-content:center; padding:32px 20px; position:relative; overflow:hidden; }
#loginPage.active { display:flex; }

.orb { position:absolute; border-radius:50%; pointer-events:none; filter:blur(80px); opacity:0.12; }
.orb1 { width:300px; height:300px; background:var(--accent1); top:-80px; right:-80px; }
.orb2 { width:240px; height:240px; background:var(--accent2); bottom:-60px; left:-60px; }

.login-inner { width:100%; max-width:400px; position:relative; z-index:2; }

.brand { display:flex; flex-direction:column; align-items:center; margin-bottom:36px; gap:8px; }
.brand-mark { width:66px; height:66px; border-radius:20px; background:linear-gradient(135deg,var(--accent1),var(--accent2)); display:flex; align-items:center; justify-content:center; animation:pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 28px var(--glow1)} 50%{box-shadow:0 0 50px rgba(112,51,255,0.4)} }
.brand-mark i { font-size:28px; color:#fff; }
.brand-name { font-size:22px; font-weight:800; color:var(--text1); }
.brand-sub { font-size:11px; color:var(--text3); letter-spacing:1.5px; text-transform:uppercase; }

.login-card { background:var(--surface); border:1px solid var(--border2); border-radius:24px; padding:28px 24px; }
.lc-title { font-size:14px; font-weight:700; margin-bottom:12px; }
.lc-sub { font-size:12px; color:var(--text3); margin-bottom:14px; line-height:1.5; }

.field-row { display:flex; gap:10px; margin-bottom:10px; }
.field-wrap { flex:1; }
.field-wrap input { width:100%; height:50px; background:var(--bg2); border:1px solid var(--border2); border-radius:12px; outline:none; padding:0 14px; color:var(--text1); font-size:15px; font-family:'Outfit',sans-serif; transition:border-color 0.15s; }
.field-wrap input::placeholder { color:var(--text3); }
.field-wrap input:focus { border-color:var(--accent1); }

.verified-card { display:none; align-items:center; gap:12px; padding:12px 14px; border-radius:14px; background:rgba(34,197,94,0.07); border:1px solid rgba(34,197,94,0.2); margin-bottom:14px; }
.verified-card.show { display:flex; animation: cardPop 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
.verified-avatar { width:44px; height:44px; border-radius:50%; background:linear-gradient(135deg,var(--accent1),var(--accent2)); display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:800; color:#fff; flex-shrink:0; }
.verified-card.show .verified-avatar { animation: avatarSpin 0.6s cubic-bezier(0.34,1.56,0.64,1) both; }
.emoji-inner { display:inline-block; }
.verified-card.show .emoji-inner { animation: emojiBounce 0.7s ease-in-out 0.5s both; }

@keyframes cardPop {
    0%   { opacity:0; transform: scale(0.8) translateY(10px); }
    100% { opacity:1; transform: scale(1) translateY(0); }
}
@keyframes avatarSpin {
    0%   { transform: scale(0) rotate(-180deg); }
    60%  { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes avatarPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(168,85,247,0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(168,85,247,0); }
}
@keyframes emojiBounce {
    0%   { transform: scale(0) rotate(-180deg); }
    50%  { transform: scale(1.4) rotate(15deg); }
    70%  { transform: scale(0.9) rotate(-8deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.verified-name { font-size:14px; font-weight:700; color:#22c55e; }
.verified-sub { font-size:11px; color:var(--text3); margin-top:2px; }
.verified-badge { margin-left:auto; font-size:10px; font-weight:700; background:#22c55e; color:#fff; padding:3px 8px; border-radius:20px; }

.enter-btn { width:100%; height:50px; border:none; border-radius:12px; background:linear-gradient(135deg,var(--accent1),var(--accent2)); color:#fff; font-size:15px; font-weight:600; cursor:pointer; font-family:'Outfit',sans-serif; transition:opacity 0.15s; }
.enter-btn:active { opacity:0.86; }
.enter-btn:disabled { opacity:0.5; cursor:not-allowed; }
.login-footer { text-align:center; margin-top:22px; font-size:11px; color:var(--text3); }

.region-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; background: #a855f700; border: 1px solid #ffffff5c; color: #f0f4ff; }

/* Home Page */
#homePage { padding:16px 16px 100px; background:#000000; min-height:100vh; }

@media (min-width: 768px) {
    #homePage, #storePage {
        max-width: 500px;
        margin: 0 auto;
        padding: 20px 20px 100px;
    }
}

.topbar { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:18px; }
.player-name { font-size:20px; font-weight:800; color:#fff; letter-spacing:0.5px; line-height:1.1; text-transform:uppercase; }
.player-sub { font-size:12px; color:#888; margin-top:4px; }

/* Cloud Balance Card - No Coin */
.xpoin-card { 
    background: linear-gradient(135deg,#2d1b4e 0%,#1e1035 50%,#150c28 100%); 
    border-radius: 16px; 
    padding: 20px 18px 16px; 
    margin-bottom: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    position: relative; 
    overflow: hidden; 
    cursor: pointer; 
}
.xpoin-left { display: flex; align-items: center; gap: 14px; }
.xpoin-logo { width: 52px; height: 52px; flex-shrink: 0; }
.xpoin-logo svg { width: 52px; height: 52px; }
.xpoin-lbl { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #b060ff; margin-bottom: 4px; }
.xpoin-num { font-size: 32px; font-weight: 800; color: #fff; line-height: 1; }
.xpoin-arrow { width: 32px; height: 32px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #999; font-size: 16px; flex-shrink: 0; }

/* Cloud Share Row */
.xshard-row { background:#000000; border-radius:18px; padding:13px 16px; display:flex; align-items:center; gap:12px; margin-bottom:16px; cursor:pointer; border:0.001px solid #101010; }
.xshard-icon { width:34px; height:34px; background:linear-gradient(135deg,#1a1a3e,#2a1b5e); border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; border:1px solid rgba(100,80,255,0.3); }
.xshard-icon i { font-size:16px; color:#7b6fff; }
.xshard-count { font-size:15px; font-weight:700; color:#fff; }
.xshard-lbl { font-size:13px; font-weight:700; color:#7b6fff; margin-left:2px; }
.xshard-arrow { margin-left:auto; font-size:14px; color:#555; }

/* Stats Grid */
.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:18px; }
.stat-card { background:#000000; border:1px solid #1c1b1ba3; border-radius:14px; padding:16px 16px 14px; cursor:pointer; transition:all 0.2s; position:relative; }
.stat-card:active { transform:scale(0.97); }
.stat-badge { position:absolute; top:12px; right:12px; font-size:10px; font-weight:600; color:#716d6d; background:#000000; padding:3px 8px; border-radius:20px; border:1px solid #2a2a2a; }
.stat-head-icon2 { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; margin-bottom:14px; }
.shi-blue2 { background:rgba(30,80,160,0.25); border:1px solid rgba(40,100,200,0.3); }
.shi-purple2 { background:rgba(80,40,160,0.25); border:1px solid rgba(100,60,200,0.3); }
.stat-head-icon2 i { font-size:18px; }
.shi-blue2 i { color:#5599ff; }
.shi-purple2 i { color:#aa77ff; }
.stat-big { font-size:28px; font-weight:800; color:#fff; line-height:1; }
.stat-big small { font-size:12px; font-weight:400; color:#666; margin-left:4px; }

/* Feature Row */
.feat-row { display:flex; justify-content:space-between; align-items:flex-start; gap:6px; margin-bottom:22px; }
.feat-item { display:flex; flex-direction:column; align-items:center; gap:8px; flex:1; cursor:pointer; }
.feat-icon { width:56px; height:56px; border-radius:16px; display:flex; align-items:center; justify-content:center; }
.feat-icon i { font-size:22px; }
.fi-gold { background:#1a1200; border:1.5px solid #5a3d00; }
.fi-gold i { color:#c8882a; }
.fi-green { background:#001a0d; border:1.5px solid #005a25; }
.fi-green i { color:#00c853; }
.fi-purple { background:#0d0a1a; border:1.5px solid #3a2080; }
.fi-purple i { color:#7c4dff; }
.fi-blue { background:#050f1a; border:1.5px solid #0a3060; }
.fi-blue i { color:#2979ff; }
.fi-red { background:#1a050a; border:1.5px solid #5a0018; }
.fi-red i { color:#e05070; }
.feat-lbl { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; color:#666; }

/* Community */
.sec-hd { font-size:17px; font-weight:800; color:#fff; margin-bottom:12px; }
.comm-list { display:flex; flex-direction:column; gap:8px; }
.comm-btn { display:flex; align-items:center; gap:14px; padding:14px 18px; border-radius:14px; cursor:pointer; border:none; width:100%; }
.comm-icon-wrap { width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,0.2); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.comm-icon-wrap i { font-size:20px; color:#fff; }
.comm-info { flex:1; text-align:left; }
.comm-title { font-size:14px; font-weight:700; color:#fff; }
.comm-sub { font-size:11px; color:rgba(255,255,255,0.7); margin-top:1px; }
.comm-ext { width:28px; height:28px; border-radius:50%; background:rgba(255,255,255,0.15); display:flex; align-items:center; justify-content:center; }
.comm-ext i { font-size:13px; color:rgba(255,255,255,0.8); }

/* Dock Nav */
.dock-container-wrapper { 
    position:fixed; 
    bottom:30px; 
    left:50%; 
    transform:translateX(-50%); 
    z-index:9000; 
    /* No animation — dock never moves */
    animation:none !important;
    transition:none !important;
    will-change:auto;
}
.floating-action-bar { display:flex; align-items:center; background:rgba(255, 255, 255, 0); border:1px solid rgba(255, 255, 255, 0.06); border-radius:999px; padding:5px 16px; gap:8px; box-shadow:0 5px 16px rgba(0,0,0,0.35); backdrop-filter:blur(16px); }
.bar-tab-node { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; transition: transform 0.2s ease, opacity 0.2s ease; will-change:transform; }
.bar-tab-node i { font-size:20px; color:rgba(255,255,255,0.4); transition: color 0.2s ease; }
.bar-tab-node:hover { transform: translateY(-2px); }
.bar-tab-node:active { transform:scale(0.88); }
.bar-tab-node.tab-selected i { color:#fff; }

/* Store Page */
#storePage { padding:16px 16px 90px; }
.store-topbar { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.back-btn { display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text1); font-size:17px; flex-shrink:0; }
.pg-title { font-size:19px; font-weight:800; color:var(--text1); }
.store-banner { background:linear-gradient(89deg, #30009d45, #040404); border:1px solid rgb(255 255 255 / 2%);; border-radius:20px; padding:18px 20px; display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.store-history-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(168,85,247,0.25), rgba(112,51,255,0.18));
    border: 1px solid rgba(168,85,247,0.35);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(168,85,247,0.2);
    position: relative;
    flex-shrink: 0;
    left: 145px;
}
.store-history-btn i {
    font-size: 15px;
    color: #c084fc;
    transition: transform 0.2s ease;
}
.store-history-btn:hover {
    background: linear-gradient(135deg, rgba(168,85,247,0.45), rgba(112,51,255,0.35));
    box-shadow: 0 0 18px rgba(168,85,247,0.45);
    transform: scale(1.08);
}
.store-history-btn:hover i { transform: rotate(-20deg); }
.store-history-btn:active { transform: scale(0.92); }
.store-history-btn::after {
    content: 'History';
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20,16,36,0.95);
    color: #c084fc;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    border: 1px solid rgba(168,85,247,0.25);
}
.store-history-btn:hover::after { opacity: 1; }
.banner-l { display:flex; align-items:center; gap:14px; }
.banner-icon { width:52px; height:52px; border-radius:16px; background:linear-gradient(136deg, #7033ff, #a855f700); display:flex; align-items:center; justify-content:center; }
.banner-icon i { font-size:24px; color:#fff; }
.banner-title { font-size:16px; font-weight:700; color:var(--text1); }
.banner-sub { font-size:12px; color:var(--text3); margin-top:2px; }
.region-bar { display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:12px; background:#13111e2e; border:1px solid var(--border); margin-bottom:14px; font-size:12px; color:var(--text2); }
.region-bar i { color:var(--accent3); }
.region-bar strong { color:var(--text1); }
.tabs { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; margin-bottom:18px; }
.tabs::-webkit-scrollbar { display:none; }
.tab-btn { border:1px solid rgb(255 255 255 / 5%); background: #13111e05; color:#403e49; font-size:12px; font-weight:600; white-space:nowrap; padding:9px 16px; border-radius:30px; cursor:pointer; font-family:'Outfit',sans-serif; transition:all 0.15s; }
.tab-btn.active { background:linear-gradient(135deg, #7033ff, #a855f700); color:#fff; border-color:transparent; box-shadow:0 6px 18px var(--glow1); }
.prod-list { display:flex; flex-direction:column; gap:12px; margin-bottom:20px; }
.prod-card { background:#13111e59; border: 1px solid var(--border); border-radius:18px; padding:10px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.prod-left { display:flex; gap:12px; min-width:0; flex:1; }
.prod-img { width:82px; height:82px; border-radius:14px; object-fit:cover; background:var(--surface2); flex-shrink:0; border:1px solid var(--border); }
.prod-details { min-width:0; flex:1; }
.prod-badge { display:inline-flex; height:18px; padding:0 8px; border-radius:5px; font-size:9px; font-weight:700; text-transform:uppercase; margin-bottom:7px; align-items:center; background:var(--bg2); border:1px solid var(--border2); color:var(--text2); width:fit-content; }
.prod-name { font-size:13px; font-weight:600; color:var(--text1); line-height:1.4; margin-bottom:6px; }
.prod-price { font-size:16px; font-weight:800; color:var(--accent3); }
.buy-btn { flex-shrink:0; width:64px; height:38px; border:none; border-radius:12px; background:linear-gradient(135deg, #7033ff, #a855f700); color:#fff; font-size:12px; font-weight:700; cursor:pointer; font-family:'Outfit',sans-serif; position: relative;
    right: 12px;}
.buy-btn:active { opacity:0.82;}

/* Modals */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.85); z-index:2000; display:none; align-items:center; justify-content:center; padding:20px; backdrop-filter:blur(6px); }
.modal-overlay.open { display:flex; }
.modal-box { background: #13111e9c; border:1px solid var(--border2); border-radius:24px; width:100%; max-width:360px; padding:28px 24px; }
.modal-title { font-size:18px; font-weight:800; margin-bottom:6px; }
.modal-sub { font-size:12px; color:var(--text3); margin-bottom:20px; }
.modal-prod { display:flex; align-items:center; gap:12px; padding:14px; background:var(--surface2); border-radius:14px; border:1px solid var(--border); margin-bottom:18px; }
.modal-prod img { width:54px; height:54px; border-radius:10px; object-fit:cover; }
.modal-prod-name { font-size:14px; font-weight:700; }
.modal-prod-price { font-size:18px; font-weight:800; color:var(--accent3); margin-top:3px; }
.modal-player { font-size:12px; color:var(--text3); margin-bottom:20px; padding:10px 14px; background:var(--bg2); border-radius:10px; }
.modal-player strong { color:var(--text1); }
.modal-btns { display:flex; gap:10px; }
.modal-btn-cancel { flex:1; height:46px; border:1px solid var(--border2); border-radius:12px; background:var(--surface2); color:var(--text2); font-size:14px; font-weight:600; cursor:pointer; font-family:'Outfit',sans-serif; }
.modal-btn-confirm { flex:2; height:46px; border:none; border-radius:12px; background:linear-gradient(135deg, #7033ff, #a855f700); color:#fff; font-size:14px; font-weight:700; cursor:pointer; font-family:'Outfit',sans-serif; }
.success-icon { width:64px; height:64px; border-radius:50%; background:rgba(34,197,94,0.12); border:2px solid rgba(34,197,94,0.3); display:flex; align-items:center; justify-content:center; margin:0 auto 16px; font-size:28px; }

/* Toast */
.toast { position:fixed; bottom:88px; left:50%; transform:translateX(-50%); background:var(--surface); color:var(--text1); padding:9px 20px; border-radius:50px; font-size:12px; font-weight:500; z-index:9999; white-space:nowrap; pointer-events:none; border:1px solid var(--border2); border-left:3px solid var(--accent2); box-shadow:0 8px 28px rgba(0,0,0,0.5); animation:toastAni 2.5s ease forwards; }
@keyframes toastAni { 0%{opacity:0;transform:translateX(-50%) translateY(10px)} 14%{opacity:1;transform:translateX(-50%) translateY(0)} 76%{opacity:1} 100%{opacity:0;transform:translateX(-50%) translateY(-7px)} }

.loading-spinner { display:inline-block; width:16px; height:16px; border:2px solid rgba(255,255,255,0.3); border-radius:50%; border-top-color:#fff; animation:spin 0.6s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }
/* ── Login hint text ─────────────────────────────────────────────────────────── */
.login-hint-text { display:flex; align-items:center; gap:7px; font-size:11.5px; color:var(--text3); margin:6px 0 10px; padding:9px 12px; background:rgba(168,85,247,0.07); border:1px solid rgba(168,85,247,0.15); border-radius:10px; }
.login-hint-text i { color:var(--accent2); font-size:13px; flex-shrink:0; }

/* ── Cloud Share progress tag ───────────────────────────────────────────────── */
.xshard-prog { margin-left:auto; margin-right:6px; font-size:10px; color:#535050; background:#000000; padding:3px 8px; border-radius:18px; border:0.01px solid #121212; white-space:nowrap; }

/* ── Cloud Balance Page ─────────────────────────────────────────────────────── */
#cloudBalancePage { min-height:100vh; background:#07050d; padding-bottom:40px; }
.cb-topbar { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; }
.cb-back { width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,255,255,0.07); cursor:pointer; color:#fff; font-size:18px; }
.cb-title { font-size:17px; font-weight:800; color:#fff; }
.cb-card { margin:0 16px 20px; border-radius:22px; background:linear-gradient(135deg,#9333ea 0%,#ec4899 60%,#f97316 100%); padding:22px 18px 18px; }
.cb-card-top { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; }
.cb-lbl { font-size:12px; color:rgba(255,255,255,0.75); font-weight:600; margin-bottom:6px; }
.cb-amount { font-size:36px; font-weight:900; color:#fff; line-height:1; }
.cb-unit { font-size:14px; font-weight:600; opacity:0.8; }
.cb-transfer-btn { display:flex; align-items:center; gap:6px; background:rgba(255, 255, 255, 0.049); border:1.5px solid rgba(255,255,255,0.4); border-radius:30px; color:#fff; font-size:13px; font-weight:700; padding:9px 18px; cursor:pointer; font-family:'Outfit',sans-serif; backdrop-filter:blur(8px);position:relative; top:11px; }
.cb-transfer-btn i { font-size:15px; }
.cb-info-box { background:rgba(255,255,255,0.15); border-radius:14px; padding:11px 14px; font-size:12px; color:rgba(255,255,255,0.85); backdrop-filter:blur(6px); margin-bottom:14px; display:flex; align-items:center; gap:5px; }
.cb-info-box i { font-size:16px; flex-shrink:0; }
.cb-info-box strong { color:#fff; }
.cb-load-btn { width:100%; height:48px; border:none; border-radius:14px; background:rgba(255,255,255,0.22); color:#fff; font-size:14px; font-weight:700; cursor:pointer; font-family:'Outfit',sans-serif; backdrop-filter:blur(8px); border:1.5px solid rgba(255,255,255,0.35); display:flex; align-items:center; justify-content:center; gap:8px; }
.cb-load-btn i { font-size:16px; }
.cb-tabs { display:flex; margin:0 16px 16px; background:#111; border-radius:14px; padding:4px; gap:4px; }
.cb-tab { flex:1; height:40px; border:none; border-radius:10px; background:transparent; color:#666; font-size:13px; font-weight:600; cursor:pointer; font-family:'Outfit',sans-serif; display:flex; align-items:center; justify-content:center; gap:6px; transition:all 0.2s; }
.cb-tab.active { background:#1e1e1e; color:#fff; }
.cb-tab i { font-size:14px; }
.cb-pane { padding:0 16px; }
.cb-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:60px 0; }

/* ── Purchase History items ──────────────────────────────────────────────────── */
.hist-item { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--border); }
.hist-icon { width:40px; height:40px; border-radius:12px; background:linear-gradient(135deg,var(--accent1),var(--accent2)); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.hist-icon i { font-size:18px; color:#fff; }
.hist-info { flex:1; min-width:0; }
.hist-name { font-size:13px; font-weight:600; color:var(--text1); }
.hist-date { font-size:11px; color:var(--text3); margin-top:2px; }
.hist-price { font-size:14px; font-weight:800; color:var(--accent3); }

/* ── Payment Options Modal ───────────────────────────────────────────────────── */
.pay-opt-price { font-size:28px; font-weight:900; color:var(--accent3); text-align:center; margin:10px 0 20px; }
.pay-opts { display:flex; flex-direction:column; gap:10px; }
.pay-opt-btn { display:flex; align-items:center; gap:14px; padding:14px 16px; background:var(--surface2); border:1px solid var(--border2); border-radius:16px; cursor:pointer; font-family:'Outfit',sans-serif; transition:all 0.15s; text-align:left; }
.pay-opt-btn:active { transform:scale(0.98); }
.pay-opt-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.pay-opt-icon i { font-size:20px; color:#fff; }
.pay-opt-name { font-size:14px; font-weight:700; color:var(--text1); }
.pay-opt-sub { font-size:11px; color:var(--text3); margin-top:2px; }/* ============================================================
   MOBILE RESPONSIVE ADDITIONS
   Add this at the END of style.css
   ============================================================ */

/* ── Safe area for notch / home bar (iOS/Android) ─────────── */
:root {
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top:    env(safe-area-inset-top, 0px);
}

/* ── Fix store history button — remove hardcoded left offset ─ */
.store-history-btn {
    left: unset !important;
    margin-left: auto;
    flex-shrink: 0;
}

.banner-l {
    width: 100%;
    gap: 10px;
}

/* ── Dock: respect safe area + adjust for all screen sizes ─── */
.dock-container-wrapper {
    bottom: calc(16px + var(--safe-bottom));
    width: auto;
    max-width: calc(100vw - 32px);
}

.floating-action-bar {
    padding: 6px 20px;
    gap: 10px;
}

/* ── Home page: safe padding bottom so dock doesn't cover ─── */
#homePage {
    padding-bottom: calc(90px + var(--safe-bottom));
}

#storePage {
    padding-bottom: calc(90px + var(--safe-bottom));
}

/* ── Login page: handle small heights (compact phones) ──────── */
@media (max-height: 680px) {
    .brand { margin-bottom: 20px; gap: 6px; }
    .brand-mark { width: 54px; height: 54px; }
    .brand-mark i { font-size: 22px; }
    .brand-name { font-size: 18px; }
    .login-card { padding: 20px 18px; }
    #loginPage { padding: 20px 16px; }
}

/* ── Very small phones (≤ 360px width) ──────────────────────── */
@media (max-width: 360px) {
    /* Login */
    .login-card { padding: 18px 14px; border-radius: 18px; }
    .field-wrap input { height: 44px; font-size: 14px; }
    .enter-btn { height: 44px; font-size: 14px; }

    /* Cloud Balance card */
    .xpoin-num { font-size: 26px; }
    .xpoin-logo { width: 42px; height: 42px; }
    .xpoin-logo svg { width: 42px; height: 42px; }
    .xpoin-card { padding: 16px 14px 12px; }

    /* Stats grid */
    .stat-big { font-size: 22px; }
    .stat-card { padding: 12px 12px 10px; }

    /* Feature icons row */
    .feat-icon { width: 44px; height: 44px; border-radius: 12px; }
    .feat-icon i { font-size: 18px; }
    .feat-lbl { font-size: 8px; }

    /* Products */
    .prod-img { width: 68px; height: 68px; }
    .prod-name { font-size: 12px; }
    .prod-price { font-size: 14px; }
    .buy-btn { width: 56px; height: 34px; font-size: 11px; right: 8px; }

    /* Tabs */
    .tab-btn { padding: 7px 12px; font-size: 11px; }

    /* Modals */
    .modal-box { padding: 20px 16px; }
    .modal-title { font-size: 16px; }
    .modal-prod img { width: 44px; height: 44px; }
    .modal-prod-name { font-size: 13px; }
    .modal-prod-price { font-size: 16px; }
    .modal-btn-cancel, .modal-btn-confirm { height: 42px; font-size: 13px; }

    /* Community buttons */
    .comm-btn { padding: 12px 14px; }

    /* Dock */
    .bar-tab-node { width: 36px; height: 36px; }
    .bar-tab-node i { font-size: 17px; }
}

/* ── Medium phones (361px – 480px) ──────────────────────────── */
@media (min-width: 361px) and (max-width: 480px) {
    .xpoin-num { font-size: 28px; }

    .feat-icon { width: 50px; height: 50px; }
    .feat-icon i { font-size: 20px; }

    .prod-img { width: 74px; height: 74px; }

    .modal-box { padding: 22px 18px; }
}

/* ── Landscape mode on phones ────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    #loginPage {
        padding: 16px;
        align-items: flex-start;
        overflow-y: auto;
    }
    .brand { flex-direction: row; margin-bottom: 12px; align-items: center; }
    .brand-mark { width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; }
    .brand-name { font-size: 17px; }
    .brand-sub { display: none; }
    .login-card { padding: 16px 18px; }
    #homePage, #storePage {
        padding-bottom: 80px;
    }
}

/* ── Tablets (≥ 600px) ───────────────────────────────────────── */
@media (min-width: 600px) {
    #loginPage .login-inner { max-width: 440px; }

    #homePage, #storePage, #cloudBalancePage {
        max-width: 520px;
        margin: 0 auto;
    }

    /* Products: 2-column grid on tablets */
    .prod-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .prod-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
    }
    .prod-left {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    .prod-img {
        width: 100%;
        height: 120px;
        border-radius: 12px;
        object-fit: cover;
    }
    .buy-btn {
        position: static;
        width: 100%;
        height: 40px;
        margin-top: 10px;
        right: unset;
    }

    /* Feature row: more spacing */
    .feat-item { gap: 10px; }
    .feat-icon { width: 62px; height: 62px; }

    /* Stats grid */
    .stat-big { font-size: 32px; }
}

/* ── Desktop (≥ 768px) ───────────────────────────────────────── */
@media (min-width: 768px) {
    #homePage, #storePage {
        max-width: 520px;
        padding: 24px 24px calc(100px + var(--safe-bottom));
    }

    .modal-box { max-width: 400px; }

    .dock-container-wrapper {
        bottom: calc(28px + var(--safe-bottom));
    }
}

/* ── Fix buy-btn: remove position relative/right hack ────────── */
@media (max-width: 599px) {
    .buy-btn {
        position: relative;
        right: 8px;
        flex-shrink: 0;
    }
    .prod-card {
        padding: 10px 6px 10px 10px;
    }
}

/* ── Modal: full-width bottom sheet on small screens ──────────── */
@media (max-width: 480px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal-box {
        border-radius: 24px 24px 0 0;
        max-width: 100%;
        width: 100%;
        padding: 24px 20px calc(20px + var(--safe-bottom));
        animation: slideUp 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) both;
    }
    @keyframes slideUp {
        from { transform: translateY(60px); opacity: 0; }
        to   { transform: translateY(0); opacity: 1; }
    }

    /* History modal: full screen on mobile */
    #historyModal .modal-box {
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 24px 24px 0 0;
    }
}

/* ── Cloud Balance page responsive ───────────────────────────── */
@media (max-width: 360px) {
    .cb-card { margin: 0 10px 16px; padding: 18px 14px 14px; border-radius: 18px; }
    .cb-amount { font-size: 28px; }
    .cb-transfer-btn { padding: 7px 14px; font-size: 12px; }
    .cb-tabs { margin: 0 10px 12px; }
    .cb-pane { padding: 0 10px; }
}

/* ── Topbar spacing for notch ────────────────────────────────── */
.store-topbar {
    padding-top: max(16px, var(--safe-top));
}

/* ── Scrollbar improvements ───────────────────────────────────── */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(112, 51, 255, 0.3) transparent;
}
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(112, 51, 255, 0.3); border-radius: 4px; }

/* ── Touch improvements ───────────────────────────────────────── */
.buy-btn, .enter-btn, .tab-btn, .comm-btn, .pay-opt-btn,
.modal-btn-cancel, .modal-btn-confirm, .cb-load-btn,
.cb-transfer-btn, .feat-item, .stat-card, .bar-tab-node {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* ── Prevent zoom on input focus (iOS) ───────────────────────── */
input, select, textarea {
    font-size: max(16px, 1em);
}

/* ── xshard-prog: hide on very small screens ──────────────────── */
@media (max-width: 360px) {
    .xshard-prog { display: none; }
    .xshard-lbl { font-size: 11px; }
}

/* ── Store banner: stack on small screens ─────────────────────── */
@media (max-width: 360px) {
    .store-banner { padding: 14px; }
    .banner-icon { width: 42px; height: 42px; }
    .banner-icon i { font-size: 20px; }
    .banner-title { font-size: 14px; }
}

/* ── Pay options modal ────────────────────────────────────────── */
@media (max-width: 480px) {
    .pay-opt-price { font-size: 24px; }
    .pay-opt-name { font-size: 13px; }
    .pay-opt-btn { padding: 12px 14px; }
}