/* =========================================================
   COMIC CENTRIC — WALLET
   ========================================================= */

:root {
    --w-bg: #08090d;
    --w-surface: #11131b;
    --w-surface-light: #171a24;
    --w-text: #f7f7fa;
    --w-text-soft: #c7c9d2;
    --w-text-muted: #858996;
    --w-pink: #f052a5;
    --w-orange: #ff8a65;
    --w-gold: #fbbf24;
    --w-border: rgba(255, 255, 255, 0.075);
    --w-border-strong: rgba(255, 255, 255, 0.13);
    --w-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 6%, rgba(240, 82, 165, 0.07), transparent 26%),
        radial-gradient(circle at 88% 18%, rgba(255, 138, 101, 0.06), transparent 28%),
        var(--w-bg);
    color: var(--w-text);
    font-family: var(--w-font);
    -webkit-font-smoothing: antialiased;
}

/* Hide the global AI assistant widget on wallet pages. */
#comicVaultAI {
    display: none !important;
}

/* =========================================================
   BACK BUTTON
   ========================================================= */

.wallet-home-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--w-border);
    background: rgba(17, 19, 27, 0.82);
    color: var(--w-text-soft);
    text-decoration: none;
    backdrop-filter: blur(14px);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wallet-home-btn:hover {
    color: #fff;
    border-color: var(--w-border-strong);
    transform: translateY(-1px);
}

/* =========================================================
   PAGE
   ========================================================= */

.wallet-page {
    width: min(880px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0 48px;
}

/* =========================================================
   HEADER
   ========================================================= */

.wallet-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-right: 56px;
}

.wallet-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid rgba(240, 82, 165, 0.22);
    background: rgba(240, 82, 165, 0.08);
    color: var(--w-pink);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.wallet-eyebrow span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--w-pink);
    box-shadow: 0 0 8px var(--w-pink);
}

.wallet-header h1 {
    margin: 14px 0 0;
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* =========================================================
   CURRENCY DROPDOWN
   ========================================================= */

.wallet-currency {
    position: relative;
    flex-shrink: 0;
}

.wallet-currency-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--w-border-strong);
    background: var(--w-surface);
    color: var(--w-text-soft);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.wallet-currency-trigger:hover,
.wallet-currency.is-open .wallet-currency-trigger {
    border-color: rgba(240, 82, 165, 0.4);
    color: #fff;
}

.wallet-currency-trigger > i:first-child {
    color: var(--w-pink);
}

.wallet-currency-caret {
    font-size: 9px;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.wallet-currency.is-open .wallet-currency-caret {
    transform: rotate(180deg);
}

.wallet-currency-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    min-width: 160px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: 13px;
    border: 1px solid var(--w-border-strong);
    background: #14161f;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.wallet-currency.is-open .wallet-currency-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wallet-currency-menu li {
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--w-text-soft);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.wallet-currency-menu li:hover,
.wallet-currency-menu li:focus-visible {
    background: rgba(240, 82, 165, 0.14);
    color: #fff;
    outline: none;
}

.wallet-currency-menu li.is-selected {
    background: rgba(240, 82, 165, 0.2);
    color: #fff;
}

/* =========================================================
   BALANCE CARD
   ========================================================= */

.wallet-balance-card {
    position: relative;
    overflow: hidden;
    padding: 26px 28px 20px;
    border-radius: 22px;
    border: 1px solid var(--w-border-strong);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
        var(--w-surface);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.wallet-balance-glow {
    position: absolute;
    top: -80px;
    right: -50px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.16), transparent 68%);
    pointer-events: none;
}

.wallet-balance-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.wallet-balance-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wallet-balance-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--w-text-muted);
}

.wallet-balance-label i {
    color: var(--w-pink);
}

.wallet-balance-value {
    font-size: clamp(34px, 6vw, 42px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--w-gold);
}

.wallet-balance-hint {
    font-size: 12px;
    color: var(--w-text-muted);
}

.wallet-coin-img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.35));
}

.wallet-bonus-row {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--w-border);
}

.wallet-bonus-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--w-pink), var(--w-orange));
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.wallet-bonus-text {
    font-size: 12px;
    color: var(--w-text-muted);
}

/* =========================================================
   TABS
   ========================================================= */

.wallet-tabs {
    display: flex;
    gap: 6px;
    margin: 26px 0 18px;
    padding: 5px;
    border-radius: 14px;
    border: 1px solid var(--w-border);
    background: rgba(17, 19, 27, 0.7);
}

.wallet-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--w-text-muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.wallet-tab:hover {
    color: var(--w-text-soft);
}

.wallet-tab.is-active {
    background: rgba(240, 82, 165, 0.14);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(240, 82, 165, 0.26);
}

.wallet-tab i {
    font-size: 11px;
}

/* =========================================================
   PANELS
   ========================================================= */

.wallet-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.wallet-panel-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wallet-panel-head span {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--w-text-muted);
}

/* =========================================================
   PURCHASE LIST
   ========================================================= */

.wallet-pack-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wallet-pack {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 15px 18px;
    border-radius: 16px;
    border: 1px solid var(--w-border);
    background: var(--w-surface);
    color: var(--w-text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.wallet-pack:hover {
    transform: translateY(-2px);
    border-color: rgba(240, 82, 165, 0.38);
    background: var(--w-surface-light);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.wallet-pack:focus-visible {
    outline: 2px solid var(--w-pink);
    outline-offset: 3px;
}

.wallet-pack.is-popular {
    border-color: rgba(240, 82, 165, 0.42);
    background:
        linear-gradient(150deg, rgba(240, 82, 165, 0.11), rgba(255, 255, 255, 0.012)),
        var(--w-surface);
}

.wallet-pack-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    border: 1px solid var(--w-border);
    background: rgba(255, 255, 255, 0.03);
}

.wallet-pack-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.3));
}

.wallet-pack-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.wallet-pack-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wallet-pack-tag {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(240, 82, 165, 0.18);
    border: 1px solid rgba(240, 82, 165, 0.35);
    color: #ff8fc4;
    font-size: 9.5px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wallet-pack-sub {
    font-size: 11.5px;
    color: var(--w-text-muted);
}

.wallet-pack-price {
    flex-shrink: 0;
    min-width: 92px;
    padding: 9px 14px;
    border-radius: 11px;
    border: 1px solid var(--w-border);
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    font-weight: 700;
    color: var(--w-text-soft);
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wallet-pack:hover .wallet-pack-price,
.wallet-pack.is-popular .wallet-pack-price {
    border-color: rgba(240, 82, 165, 0.35);
    background: rgba(240, 82, 165, 0.14);
    color: #fff;
}

.wallet-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
    font-size: 11.5px;
    color: var(--w-text-muted);
}

.wallet-note i {
    color: var(--w-pink);
}

/* =========================================================
   HISTORY
   ========================================================= */

.wallet-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 46px 20px;
    border-radius: 16px;
    border: 1px dashed var(--w-border-strong);
    background: rgba(255, 255, 255, 0.012);
    text-align: center;
}

.wallet-history-empty > i {
    font-size: 22px;
    color: var(--w-text-muted);
    margin-bottom: 6px;
}

.wallet-history-empty strong {
    font-size: 14px;
    font-weight: 700;
}

.wallet-history-empty span {
    font-size: 12px;
    color: var(--w-text-muted);
}

.wallet-history-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid var(--w-border);
    background: var(--w-surface);
}

.wallet-history-row .wallet-history-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
}

.wallet-history-row.is-credit .wallet-history-icon {
    color: #4ade80;
}

.wallet-history-row.is-debit .wallet-history-icon {
    color: var(--w-orange);
}

.wallet-history-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wallet-history-meta strong {
    font-size: 13px;
    font-weight: 700;
    text-transform: capitalize;
}

.wallet-history-meta span {
    font-size: 11px;
    color: var(--w-text-muted);
}

.wallet-history-amount {
    flex-shrink: 0;
    font-size: 13.5px;
    font-weight: 800;
}

.wallet-history-row.is-credit .wallet-history-amount {
    color: #4ade80;
}

.wallet-history-row.is-debit .wallet-history-amount {
    color: var(--w-orange);
}

/* =========================================================
   FOOTER
   ========================================================= */

.wallet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--w-border);
    font-size: 12px;
    color: var(--w-text-muted);
}

.wallet-footer-logo {
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--w-text-soft);
}

.wallet-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--w-text-soft);
    text-decoration: none;
    transition: color 0.2s ease;
}

.wallet-footer a:hover {
    color: var(--w-pink);
}

/* =========================================================
   TOAST
   ========================================================= */

.wallet-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border-radius: 13px;
    border: 1px solid var(--w-border-strong);
    background: rgba(17, 19, 27, 0.96);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
    color: var(--w-text);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 14px);
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s;
}

.wallet-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.wallet-toast i {
    color: var(--w-gold);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 720px) {

    .wallet-page {
        padding: 58px 0 36px;
    }

    .wallet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding-right: 0;
    }

    .wallet-balance-card {
        padding: 22px 20px 18px;
    }

    .wallet-coin-img {
        width: 50px;
        height: 50px;
    }

    .wallet-tab {
        font-size: 11.5px;
        padding: 10px 8px;
    }

    .wallet-pack {
        gap: 12px;
        padding: 13px 14px;
    }

    .wallet-pack-price {
        min-width: 76px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .wallet-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 420px) {

    .wallet-pack-icon {
        width: 40px;
        height: 40px;
    }

    .wallet-pack-icon img {
        width: 26px;
        height: 26px;
    }

    .wallet-pack-title {
        font-size: 13.5px;
    }

    .wallet-pack-sub {
        font-size: 10.5px;
    }
}
