/* ===== SkyExpress theme variables ===== */
:root {
    --primary:        #BFD4FF;
    --primary-soft:   #A3BCEC;
    --primary-deep:   #7E97CC;
    --accent:         #E1D95A;
    --accent-soft:    #C8C14E;

    /* Bright sky-mining backdrop — light blue gradient with cloud-like
       glow. User-supplied --bg-image lays on top via store-base.css. */
    --sky-top:        #6FA9DC;
    --sky-mid:        #8AC0E8;
    --sky-bottom:     #B6D8F2;

    --bg:             #6FA9DC;        /* fallback solid */
    --bg-soft:        #8AC0E8;
    --bg-image:       url('https://i.postimg.cc/gj0wZqjp/2026-05-09-12-51-57.png');
    --card-bg:        #161E2C;        /* dark cards */
    --card-bg-deep:   #0E1520;
    --card-soft:      rgba(22, 30, 44, 0.82);
    --text:           #F1F4FA;
    --text-muted:     #A8B2C5;
    --border-color:   rgba(191, 212, 255, 0.22);

    --shadow-card:    0 16px 40px rgba(8, 18, 36, 0.35);
    --shadow-soft:    0 8px 20px rgba(8, 18, 36, 0.22);

    --radius-md:      14px;
    --radius-lg:      18px;
}

/* ===== Reset ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    padding-bottom: 40px;
    background: var(--bg);
    overflow-x: hidden;
}

/* Background art is painted into a separate fixed layer so scrolling doesn't
   invalidate the 5-layer gradient stack every frame — that was the main cause
   of scroll lag, especially with `background-attachment: fixed`. Sits behind
   everything via z-index: -1 and ignores pointer events. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg,
            rgba(10, 22, 38, 0.18) 0%,
            rgba(10, 22, 38, 0)   18%,
            rgba(10, 22, 38, 0)   72%,
            rgba(10, 22, 38, 0.35) 100%),
        radial-gradient(ellipse 90% 60% at 50% 30%,
            rgba(255, 255, 255, 0.18) 0%,
            transparent 70%),
        radial-gradient(ellipse 70% 40% at 50% 100%,
            rgba(225, 217, 90, 0.10) 0%,
            transparent 70%),
        var(--bg-image, none),
        linear-gradient(180deg,
            var(--sky-top) 0%,
            var(--sky-mid) 55%,
            var(--sky-bottom) 100%);
    background-size: cover, auto, auto, cover, cover;
    background-position: center, center, center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

a { color: var(--primary); }

::selection {
    background: var(--accent);
    color: #2a2a10;
}

/* ===== Global animations ===== */
@keyframes fillGoal {
    from { width: 0; }
    to   { width: 77%; }
}

@keyframes stripeMove {
    from { background-position: 0 0; }
    to   { background-position: 40px 0; }
}

@keyframes sidebarSweep {
    from { left: -150%; }
    to   { left: 200%; }
}

/* ===== "IP copied" toast ===== */
#copy-popup {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--primary);
    color: #0b1320;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

#copy-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Layout ===== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    margin-top: 22px;
    align-items: flex-start;
}

.left-column { min-width: 0; }
.content     { min-width: 0; }

/* ===== Welcome card / generic page card ===== */
.welcome-card {
    background:
        linear-gradient(180deg, rgba(22, 30, 44, 0.92) 0%, rgba(14, 21, 32, 0.92) 100%);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 32px;
    margin-bottom: 22px;
    box-shadow:
        var(--shadow-card),
        inset 0 1px 0 rgba(191, 212, 255, 0.06);
    backdrop-filter: blur(6px);
}

.welcome-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.welcome-card h2 i {
    -webkit-text-fill-color: var(--accent);
    color: var(--accent);
}

.welcome-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.welcome-card a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    transition: color 0.15s, border-color 0.15s;
}

.welcome-card a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ===== Payment banner ===== */
.payment-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, rgba(191, 212, 255, 0.1), rgba(225, 217, 90, 0.06));
    border: 1px dashed var(--border-color);
    padding: 16px 22px;
    border-radius: 14px;
    margin: 24px 0 8px;
    flex-wrap: wrap;
}

.payment-banner i {
    color: var(--accent);
    font-size: 24px;
}

.payment-banner span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    min-width: 200px;
}

.payment-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.payment-icons i {
    font-size: 26px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.payment-icons i:hover { color: var(--primary); }

/* ===== Info cards ===== */
.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.info-card {
    background: linear-gradient(180deg, rgba(22, 30, 44, 0.92) 0%, rgba(14, 21, 32, 0.92) 100%);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(191, 212, 255, 0.06);
    backdrop-filter: blur(6px);
}

.info-card h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card h3 i { color: var(--accent); }

.info-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
}

/* ===== Package grid ===== */
/* Fixed columns by breakpoint: 3 on wide desktop (>1200), 2 on tablet/laptop
   (≤1200), 1 on mobile (≤480). The 3-col breakpoint is bumped above the
   1024 sidebar-collapse point so the main column never gets squeezed. */
.rank-store {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* Reserve consistent space for 6 packages (2 rows × 3 columns on wide desktop)
   so every category page renders at the same height regardless of how
   many packages a category currently has. The row size has a generous
   buffer so the card's bottom padding never gets clipped by `overflow:
   hidden`, and the min-height makes the section line up with the sidebar. */
.rank-store--full {
    grid-auto-rows: 470px;
    min-height: 1060px;
    align-content: start;
}

@media (max-width: 1200px) {
    .rank-store { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .rank-store--full {
        grid-auto-rows: minmax(440px, auto);
        min-height: auto;
    }
}

@media (max-width: 650px) {
    .rank-store { grid-template-columns: 1fr; gap: 22px; }
}

.rank-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(22, 30, 44, 0.95) 0%, rgba(14, 21, 32, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px 18px 22px;
    text-align: center;
    color: var(--text);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(191, 212, 255, 0.06);
    overflow: hidden;
    /* New stacking context so the hover ::before glint can't leak onto
       sibling cards (a Chrome quirk when overflow:hidden lives next to
       transform-animated pseudos). */
    isolation: isolate;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Block elements need explicit width so text-align: center keeps working
   inside the flex column (flex items shrink to content otherwise). */
.rank-card h3,
.rank-description,
.rank-price,
.rank-actions {
    width: 100%;
}

/* Pin the action row to the card bottom regardless of content above. */
.rank-actions { margin-top: auto; }

.rank-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(225, 217, 90, 0.18) 50%, transparent 70%);
    transform: translateX(-150%) skewX(-20deg);
    transition: transform 0.7s ease;
    pointer-events: none;
}

.rank-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--primary);
}

.rank-card:hover::before {
    transform: translateX(150%) skewX(-20deg);
}

.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: #2a2a10;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 800;
    z-index: 3;
}

.rank-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 22px;
    z-index: 2;
}

.rank-icon-wrap::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(191, 212, 255, 0.25) 0%, transparent 65%);
    z-index: -1;
    filter: blur(8px);
}

.rank-icon {
    width: 180px;
    height: 180px;
    object-fit: contain;
    /* Crisp rendering for pixel-art images and GIFs across browsers. */
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
}

.rank-card h3 {
    margin: 0;
    font-weight: 800;
    font-size: 18px;
    color: var(--text);
    position: relative;
    z-index: 2;
}

.rank-description {
    color: var(--text-muted);
    font-size: 12px;
    margin: 6px 0 0;
    position: relative;
    z-index: 2;
    min-height: 32px;
}

.rank-price {
    font-weight: 800;
    margin: 14px 0 18px;
    font-size: 18px;
    color: var(--accent);
    position: relative;
    z-index: 2;
}

.rank-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.info-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(15, 22, 32, 0.6);
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-btn:hover {
    border-color: var(--primary);
    background: rgba(191, 212, 255, 0.1);
}

.cart-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    border: none;
    padding: 11px 16px;
    border-radius: 12px;
    color: #0c1626;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(191, 212, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(191, 212, 255, 0.4);
}

.cart-btn.added {
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    box-shadow: 0 8px 20px rgba(225, 217, 90, 0.3);
}

/* ===== Page heading helper ===== */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.section-heading h2 i { color: var(--accent); }

.section-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

/* ===== Empty state ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 56px;
    color: var(--primary);
    opacity: 0.4;
    margin-bottom: 14px;
}

.empty-state h3 {
    color: var(--text);
    margin: 0 0 6px;
    font-size: 18px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .body { grid-template-columns: 1fr; gap: 20px; }
    .info-cards { grid-template-columns: 1fr 1fr; }
    .welcome-card { padding: 24px; border-radius: 18px; }
    .welcome-card h2 { font-size: 22px; }
}

@media (max-width: 768px) {
    .container { padding: 0 12px; }
    .info-cards { grid-template-columns: 1fr; }
    .welcome-card { padding: 22px 20px; }
    .welcome-card h2 { font-size: 19px; }
    .section-heading { padding-left: 4px; padding-right: 4px; }
    .rank-card { padding: 18px 12px 16px; border-radius: 14px; }
    .rank-icon { width: 145px; height: 145px; }
    .rank-card h3 { font-size: 15px; }
    .rank-price { margin: 10px 0 14px; font-size: 16px; }
    .info-btn { width: 38px; height: 38px; }
    .cart-btn { font-size: 12px; padding: 10px 12px; }
    .section-heading h2 { font-size: 18px; }
}

@media (max-width: 480px) {
    .container { padding: 0 10px; }
    .welcome-card { padding: 16px 12px; border-radius: 14px; }
    .rank-icon { width: 130px; height: 130px; }
}
