/* Meowniverse — catxz.com */
:root {
    --cream: #fff8ef;
    --paper: #ffffff;
    --ink: #2b1d3a;
    --ink-soft: #6b5d7a;
    --line: #efe3d3;
    --coral: #ff6b5e;
    --coral-dark: #e8503f;
    --mint: #2fc39a;
    --lilac: #8f6cf0;
    --sun: #ffc24b;
    --sky: #5ab8f5;
    --radius: 22px;
    --shadow: 0 10px 30px rgba(43, 29, 58, .08);
    --shadow-lg: 0 24px 60px rgba(43, 29, 58, .14);
    --font-display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .8em 1.5em; border-radius: 999px; border: 0; cursor: pointer;
    font: 800 1rem var(--font-body); text-decoration: none; white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 8px 0 var(--coral-dark); }
.btn-primary:hover { box-shadow: 0 10px 0 var(--coral-dark); }
.btn-primary:active { box-shadow: 0 4px 0 var(--coral-dark); }
.btn-ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn-lg { font-size: 1.15rem; padding: 1em 1.9em; }
.btn-sm { font-size: .9rem; padding: .55em 1.1em; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 248, 239, .88); backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 1.45rem var(--font-display); text-decoration: none; }
.logo-mark {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--coral), var(--lilac)); color: #fff; font-size: 1.3rem;
    transform: rotate(-6deg);
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 700; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-auth { display: flex; gap: 10px; align-items: center; }
.nav-user { font-weight: 800; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--sun); font-weight: 800; color: var(--ink); text-transform: uppercase;
}
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav-links, .nav-auth { display: none; }
    .nav.open .nav-links, .nav.open .nav-auth {
        display: flex; flex-direction: column; position: absolute; left: 0; right: 0;
        background: var(--cream); padding: 16px 20px; gap: 14px;
    }
    .nav.open .nav-links { top: 72px; }
    .nav.open .nav-auth { top: 250px; flex-direction: row; border-bottom: 1px solid var(--line); }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 60px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.eyebrow {
    display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px;
    background: var(--paper); box-shadow: var(--shadow); font-weight: 800; font-size: .9rem; margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(47,195,154,.2); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -.02em; }
.hero h1 .hl { color: var(--coral); position: relative; white-space: nowrap; }
.hero h1 .hl::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: .08em; height: .22em; z-index: -1;
    background: var(--sun); border-radius: 8px; opacity: .55;
}
.hero-lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 520px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--ink-soft); }

.hero-art { position: relative; aspect-ratio: 1; }
.blob {
    position: absolute; inset: 6%; border-radius: 42% 58% 55% 45% / 48% 40% 60% 52%;
    background: linear-gradient(140deg, #ffd9c7, #e7dcff 60%, #c9f2e4);
    animation: morph 12s ease-in-out infinite;
}
@keyframes morph {
    0%, 100% { border-radius: 42% 58% 55% 45% / 48% 40% 60% 52%; }
    50% { border-radius: 58% 42% 45% 55% / 40% 58% 42% 60%; }
}
.hero-photo {
    position: absolute; left: 50%; top: 50%; width: 66%; aspect-ratio: 3/4; transform: translate(-50%, -50%) rotate(3deg);
    border-radius: 32px; overflow: hidden; border: 8px solid #fff; box-shadow: var(--shadow-lg);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.float-card {
    position: absolute; background: var(--paper); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow-lg);
    display: flex; gap: 10px; align-items: center; font-weight: 800; animation: bob 5s ease-in-out infinite;
}
.float-card small { display: block; font-weight: 700; color: var(--ink-soft); font-size: .78rem; }
.float-card .big { font-size: 1.6rem; }
.float-card.fc1 { left: 0; top: 18%; }
.float-card.fc2 { right: 0; top: 40%; animation-delay: -1.6s; }
.float-card.fc3 { left: 6%; bottom: 10%; animation-delay: -3.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { max-width: 440px; margin: 0 auto; width: 100%; }
}

/* ---------- stats strip ---------- */
.strip { background: var(--ink); color: #fff; padding: 28px 0; }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.strip b { display: block; font: 800 2.2rem var(--font-display); color: var(--sun); }
.strip span { opacity: .8; font-weight: 700; }
@media (max-width: 700px) { .strip-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
section.block { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 54px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.tag { display: inline-block; font-weight: 800; color: var(--coral); text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; margin-bottom: 10px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
    background: var(--paper); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
    transition: transform .2s;
}
.feature:hover { transform: translateY(-4px); }
.feature-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; margin-bottom: 18px; }
.feature h3 { font-size: 1.35rem; }
.feature p { color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* pets */
.pets-bg { background: linear-gradient(180deg, var(--cream), #f6efff); }
.pets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pet-card {
    position: relative; background: var(--paper); border-radius: var(--radius); padding: 26px 22px 22px; text-align: center;
    box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.pet-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: var(--shadow-lg); }
.pet-card .pet-emoji {
    width: 110px; height: 110px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 3.6rem;
}
.pet-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.pet-card p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.rarity { display: inline-block; margin: 8px 0 10px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.r-common { background: #e8f6ff; color: #1f7fbf; }
.r-uncommon { background: #e5f8f1; color: #138a69; }
.r-rare { background: #f0e9ff; color: #6a45d8; }
.r-legendary { background: #fff1d6; color: #b7791f; }
.unlock { position: absolute; top: 14px; right: 14px; font-size: .75rem; font-weight: 800; color: var(--ink-soft); }
@media (max-width: 900px) { .pets { grid-template-columns: repeat(2, 1fr); } }

/* games */
.games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.game {
    background: var(--paper); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow);
}
.game img { width: 72%; margin-inline: auto; aspect-ratio: 1; object-fit: contain; border-radius: 16px; background: #fff; margin-bottom: 10px; }
.game h4 { font-size: 1.1rem; margin: 0; }
.game p { font-size: .85rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) { .games { grid-template-columns: repeat(2, 1fr); } }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 34px 28px 28px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.step::before {
    counter-increment: step; content: counter(step);
    position: absolute; top: -20px; left: 28px; width: 44px; height: 44px; border-radius: 14px;
    display: grid; place-items: center; font: 800 1.3rem var(--font-display); color: #fff; background: var(--lilac);
}
.step:nth-child(2)::before { background: var(--mint); }
.step:nth-child(3)::before { background: var(--coral); }
.step h3 { font-size: 1.3rem; }
.step p { color: var(--ink-soft); margin: 0; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

/* diamond packages */
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pack {
    position: relative; background: var(--paper); border-radius: var(--radius); padding: 28px 22px; text-align: center;
    box-shadow: var(--shadow); border: 3px solid transparent; display: flex; flex-direction: column;
}
.pack.popular { border-color: var(--coral); }
.pack .badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--coral); color: #fff;
    padding: 4px 14px; border-radius: 999px; font-weight: 800; font-size: .78rem; white-space: nowrap;
}
.pack .gem { font-size: 2.8rem; line-height: 1; margin-bottom: 8px; }
.pack h3 { font-size: 1.15rem; margin-bottom: 6px; }
.pack .amount { font: 800 2.2rem var(--font-display); color: var(--lilac); }
.pack .bonus { font-weight: 800; color: var(--mint); min-height: 1.6em; }
.pack .price { font: 800 1.5rem var(--font-display); margin: 12px 0 16px; }
.pack .actions { margin-top: auto; }
.pack.selected { border-color: var(--lilac); box-shadow: var(--shadow-lg); }
@media (max-width: 900px) { .packs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .packs { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--paper); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--coral); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; color: var(--ink-soft); }

/* CTA band */
.cta-band {
    margin: 0 auto; border-radius: 36px; padding: 60px 40px; text-align: center; color: #fff;
    background: linear-gradient(120deg, var(--lilac), var(--coral));
    box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.cta-band p { opacity: .92; font-size: 1.1rem; }
.cta-band .btn-primary { background: #fff; color: var(--ink); box-shadow: 0 8px 0 rgba(0,0,0,.15); }

/* footer */
footer { padding: 50px 0 40px; color: var(--ink-soft); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer a { text-decoration: none; font-weight: 700; margin-left: 18px; }

/* ---------- auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card {
    width: min(440px, 100%); background: var(--paper); border-radius: 28px; padding: 38px 34px; box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 2rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--ink-soft); margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; font-size: .92rem; }
.field input {
    width: 100%; padding: 13px 16px; border-radius: 14px; border: 2px solid var(--line); background: #fffdfa;
    font: 600 1rem var(--font-body); color: var(--ink); outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--lilac); }
.field .hint { font-size: .8rem; color: var(--ink-soft); margin-top: 4px; }
.auth-card .btn { width: 100%; margin-top: 8px; }
.auth-alt { text-align: center; margin-top: 20px; color: var(--ink-soft); }
.auth-alt a { font-weight: 800; color: var(--coral); text-decoration: none; }
.alert { padding: 12px 16px; border-radius: 14px; font-weight: 700; margin-bottom: 16px; }
.alert-error { background: #ffe9e6; color: #b3261e; }
.alert-ok { background: #e3f8f0; color: #0f7a5c; }
.alert-info { background: #ece6ff; color: #4b2fb0; }

/* ---------- account ---------- */
.acc-head { padding: 44px 0 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.acc-head h1 { font-size: 2.4rem; margin: 0; }
.acc-tabs { display: flex; gap: 8px; margin: 26px 0; flex-wrap: wrap; }
.acc-tabs button {
    border: 0; background: var(--paper); padding: 10px 18px; border-radius: 999px; font: 800 .95rem var(--font-body);
    cursor: pointer; color: var(--ink-soft); box-shadow: var(--shadow);
}
.acc-tabs button.active { background: var(--ink); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.kpi { background: var(--paper); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.kpi .label { font-weight: 800; color: var(--ink-soft); font-size: .88rem; }
.kpi .value { font: 800 2rem var(--font-display); }
.kpi .extra { font-size: .85rem; color: var(--ink-soft); }
.kpi .extra.good { color: var(--mint); font-weight: 800; }
.xpbar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.xpbar > div { height: 100%; background: linear-gradient(90deg, var(--lilac), var(--coral)); border-radius: 999px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.panel { background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 22px; }
.panel h2 { font-size: 1.5rem; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.empty .big { font-size: 3rem; }

.my-pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.my-pet { border: 2px solid var(--line); border-radius: 20px; padding: 20px; }
.my-pet.active { border-color: var(--coral); }
.my-pet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.my-pet-head .pet-emoji { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; background: #f6efff; flex: none; }
.my-pet-head h3 { margin: 0; font-size: 1.25rem; }
.my-pet-head small { color: var(--ink-soft); font-weight: 700; }
.statrow { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: .88rem; font-weight: 700; margin-bottom: 6px; }
.statrow .bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.statrow .bar > div { height: 100%; border-radius: 999px; }
.statrow .num { text-align: right; color: var(--ink-soft); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--cream); color: var(--ink-soft); }

.stat-table { width: 100%; border-collapse: collapse; }
.stat-table td { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.stat-table td:last-child { text-align: right; font-weight: 800; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.orders { width: 100%; border-collapse: collapse; font-size: .92rem; }
.orders th, .orders td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.orders th { color: var(--ink-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.st { font-weight: 800; padding: 2px 10px; border-radius: 999px; font-size: .78rem; }
.st-ok { background: #e3f8f0; color: #0f7a5c; }
.st-wait { background: #fff1d6; color: #9a6510; }
.st-fail { background: #ffe9e6; color: #b3261e; }
.table-scroll { overflow-x: auto; }

#paypal-area { max-width: 460px; margin: 24px auto 0; text-align: center; }
.sandbox-flag { display: inline-block; background: #fff1d6; color: #9a6510; font-weight: 800; padding: 4px 12px; border-radius: 999px; font-size: .8rem; margin-bottom: 14px; }

.toast {
    position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(140%); z-index: 100;
    background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 16px; font-weight: 800; box-shadow: var(--shadow-lg);
    transition: transform .3s ease; max-width: calc(100% - 40px);
}
.toast.show { transform: translateX(-50%) translateY(0); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .blob, .float-card { animation: none; }
}

/* Firebase auth */
.btn-google { width: 100%; gap: 12px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-soft); font-size: .85rem; font-weight: 700; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-card #guest-btn { width: 100%; }
.guest-banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fff1d6; border-radius: var(--radius); padding: 18px 22px; margin-top: 18px; }
.guest-banner b { display: block; }
.guest-banner .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin: 0; flex: 1 1 200px; }
