/* Google Fonts - Nunito (SIL Open Font License) - Soft & Rounded */
@font-face {
    font-family: "Nunito";
    src: url("/static/fonts/miniapp/Nunito-Variable-Latin.woff2") format("woff2");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Nunito";
    src: url("/static/fonts/miniapp/Nunito-Variable-LatinExt.woff2") format("woff2");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "ShoorRounded";
    src: url("/static/fonts/miniapp/ShoorRounded-Medium.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ShoorRounded";
    src: url("/static/fonts/miniapp/ShoorRounded-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ShoorRounded";
    src: url("/static/fonts/miniapp/ShoorRounded-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --purple: #8b5cf6;
    --purple-deep: #6d28d9;
    --purple-hot: #a855f7;
    --purple-neon: #a855f7;
    --purple-soft: rgba(139, 92, 246, 0.14);
    --pink: #8b5cf6;
    --pink-deep: #6d28d9;
    --pink-hot: #a855f7;
    --pink-soft: rgba(139, 92, 246, 0.14);
    --blue: #38bdf8;
    --blue-deep: #2563eb;
    --gold: #f59e0b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --surface: #131626;
    --surface-strong: #171b30;
    --surface-card: #141728;
    --line: #23283f;
    --shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background-color: #07080c;
    overflow-x: clip;
    width: 100%;
    max-width: 100vw;
    -webkit-touch-callout: none;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    background-color: #07080c;
    overflow-x: clip;
    width: 100%;
    max-width: 100vw;
    font-family: "Nunito", "ShoorRounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    direction: ltr;
    position: relative;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

input, textarea {
    -webkit-user-select: text !important;
    user-select: text !important;
}

/* Fixed viewport ambient lighting that NEVER shifts or stretches during load */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 85% 4%, rgba(244, 63, 94, 0.14), transparent 32%),
        radial-gradient(circle at 12% 18%, rgba(139, 92, 246, 0.16), transparent 30%),
        radial-gradient(circle at 50% 65%, rgba(56, 189, 248, 0.05), transparent 45%),
        linear-gradient(180deg, #07080c 0%, #0d0f1a 50%, #07080c 100%);
}

button,
input {
    font: inherit;
}

*,
*::before,
*::after {
    -webkit-tap-highlight-color: transparent !important;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.mini-icon,
.local-icon-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    line-height: 0;
    color: currentColor;
}

.mini-icon img,
.local-icon-slot img,
.mini-icon svg,
.local-icon-slot svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.local-icon-svg {
    color: inherit;
}

.tg-star-icon {
    display: inline-block;
    vertical-align: -0.15em;
    width: 1.15em;
    height: 1.15em;
    object-fit: contain;
    flex-shrink: 0;
}

.page-header .mini-card-icon,
.income-summary-grid .mini-card-icon,
.wallet-balance-card .mini-card-icon,
.withdraw-balance-card .mini-card-icon,
.income-card-header .mini-card-icon {
    color: #f9a8d4;
}

.mini-nav-icon {
    width: 20px;
    height: 20px;
}

.mini-btn-icon {
    width: 17px;
    height: 17px;
}

.mini-card-icon {
    width: 22px;
    height: 22px;
}

.more-page .page-header .mini-card-icon {
    width: 25px;
    height: 25px;
}

.mini-badge-icon {
    width: 15px;
    height: 15px;
}

.webapp-shell {
    min-height: 100vh;
    padding: 0 14px calc(124px + env(safe-area-inset-bottom)) 14px;
    overflow-x: clip;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.webapp-main {
    width: min(100%, 920px);
    max-width: 100%;
    margin: 0 auto;
    padding-top: 6px;
    overflow-x: hidden;
    box-sizing: border-box;
}

.webapp-main:has(.subscription-page) {
    overflow-x: visible;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--pink-hot);
    font-size: 14px;
    font-weight: 900;
}

.page-header h1 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 30.8px;
    line-height: 1.25;
    letter-spacing: 0;
}

.filter-panel {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 6px 0 14px;
    background: transparent;
}

.search-field {
    min-width: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    direction: ltr;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(19, 22, 38, 0.9);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}

.search-icon {
    color: #a855f7;
    width: 20px;
    height: 20px;
}

.search-field input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    direction: ltr;
    text-align: left;
    color: var(--text);
    background: transparent;
    font-size: 15.5px;
}

.search-field input::placeholder {
    color: #64748b;
    font-size: 14.5px;
}

.style-switcher {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4px;
    min-height: 48px;
    padding: 4px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 18px;
    background: rgba(19, 22, 38, 0.95);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.style-switch-btn {
    min-width: 68px;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.style-switch-btn:hover:not(.is-active) {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.style-switch-btn:active {
    transform: scale(0.96);
}

.style-switch-btn.is-active {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.style-switch-btn[data-style-option="anime"].is-active {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.38);
}

.dev-telegram-box {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px dashed rgba(139, 92, 246, 0.4);
    border-radius: 16px;
    background: rgba(19, 22, 38, 0.7);
}

.dev-telegram-box > span {
    color: var(--muted);
    font-size: 12.1px;
    font-weight: 800;
}

.dev-telegram-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.dev-telegram-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 9px 11px;
    direction: ltr;
    color: var(--text);
    background: rgba(8, 7, 17, 0.82);
    outline: 0;
}

.dev-telegram-box button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    font-size: 13.2px;
    font-weight: 900;
    cursor: pointer;
}

.status-message {
    margin: 0 0 14px;
    padding: 13px 16px;
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #ddd6fe;
    background: var(--pink-soft);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.65;
    word-break: break-word;
}

.status-message b,
.status-message strong {
    font-weight: 800;
    color: #ffffff;
}

.status-message.is-success {
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.13);
    border-color: rgba(16, 185, 129, 0.25);
}

.status-message.is-success b,
.status-message.is-success strong {
    color: #ffffff;
    font-weight: 800;
}

.status-message.is-hidden {
    display: none;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.characters-sentinel {
    width: 100%;
    height: 30px;
    pointer-events: none;
}

.characters-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0 24px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.characters-loading.is-hidden {
    display: none !important;
}

.characters-loading .loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--pink);
}

.character-card {
    position: relative;
    min-width: 0;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid #23283f;
    border-radius: 22px;
    overflow: hidden;
    background: #131626;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.character-card:hover {
    border-color: rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45), 0 0 14px rgba(139, 92, 246, 0.2);
}

.characters-page.is-selecting-character .character-card,
.character-card.is-disabled {
    cursor: wait;
    opacity: 0.58;
}

.character-card.is-selecting {
    opacity: 1;
    outline: 2px solid #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5), var(--shadow);
}

.character-card.is-selecting::after {
    content: "Selecting...";
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(11, 13, 25, 0.65);
    font-size: 15px;
    font-weight: 900;
}

.character-card:active {
    transform: scale(0.985);
}

/* ========================================================
   VIP CHARACTER LIGHTNING BORDER & EFFECTS
   ======================================================== */
.character-card.is-vip {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.45),
        0 0 12px rgba(245, 158, 11, 0.35),
        0 0 24px rgba(168, 85, 247, 0.25),
        inset 0 0 14px rgba(245, 158, 11, 0.15);
}

.character-card.is-vip::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 25px;
    padding: 3.2px;
    background: linear-gradient(
        125deg,
        #facc15 0%,
        #f59e0b 20%,
        #a855f7 40%,
        #38bdf8 60%,
        #facc15 80%,
        #ec4899 100%
    );
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 4;
    animation: vip-electric-sweep 3.5s ease infinite, vip-lightning-flash 4.5s ease-in-out infinite;
}

@keyframes vip-electric-sweep {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes vip-lightning-flash {
    0%, 100% {
        filter: drop-shadow(0 0 4px #facc15) drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
        opacity: 0.85;
    }
    46% {
        filter: drop-shadow(0 0 5px #facc15) drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
        opacity: 0.9;
    }
    48% {
        filter: drop-shadow(0 0 14px #ffffff) drop-shadow(0 0 22px #facc15) drop-shadow(0 0 32px #a855f7);
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 6px #facc15) drop-shadow(0 0 12px rgba(168, 85, 247, 0.5));
        opacity: 0.92;
    }
    52% {
        filter: drop-shadow(0 0 16px #ffffff) drop-shadow(0 0 26px #38bdf8) drop-shadow(0 0 36px #f59e0b);
        opacity: 1;
    }
    55% {
        filter: drop-shadow(0 0 4px #facc15) drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
        opacity: 0.85;
    }
}

.character-card.is-vip:hover {
    border-color: rgba(250, 204, 21, 0.9);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 
        0 14px 32px rgba(0, 0, 0, 0.55),
        0 0 20px rgba(245, 158, 11, 0.6),
        0 0 35px rgba(168, 85, 247, 0.45),
        inset 0 0 18px rgba(250, 204, 21, 0.25);
}

.vip-card-badge {
    display: none !important;
}

.vip-card-badge .vip-lightning-icon {
    display: inline-block;
    color: #fbbf24;
    font-size: 13px;
    filter: drop-shadow(0 0 4px #f59e0b);
    animation: vip-icon-pulse 1.8s ease-in-out infinite;
}

@keyframes vip-icon-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px #f59e0b); }
    50% { transform: scale(1.22); filter: drop-shadow(0 0 8px #fde047); }
}

/* VIP Modal Styles */
.vip-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.vip-modal-backdrop.is-hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.vip-modal-card {
    background: #141728;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 26px 22px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
    animation: vip-modal-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    direction: ltr;
}

[dir="rtl"] .vip-modal-card,
.is-rtl .vip-modal-card {
    direction: rtl;
}

@keyframes vip-modal-pop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.vip-modal-title {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vip-modal-title-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}

.vip-modal-name {
    display: inline-block;
    margin: 0 0 14px;
    padding: 4px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #d8b4fe;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 999px;
    letter-spacing: -0.2px;
}

.vip-modal-name:empty {
    display: none;
}

.vip-modal-desc {
    margin: 0 auto 22px;
    max-width: 290px;
    font-size: 14px;
    line-height: 1.55;
    color: #cbd5e1;
    text-wrap: balance;
}

.vip-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vip-modal-btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: none;
    cursor: pointer;
}

.vip-modal-btn-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.55);
    color: #ffffff;
}

.vip-modal-btn-buy:active {
    transform: scale(0.98);
}

.vip-modal-btn-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.vip-modal-btn-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.character-media {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(15, 23, 42, 0.94));
}

.character-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-media img.is-hidden,
.character-placeholder.is-hidden {
    display: none;
}

.character-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    color: rgba(248, 237, 245, 0.74);
    font-size: 15px;
    font-weight: 900;
}

.character-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 3px;
    padding: 16px 11px 11px;
    color: #ffffff;
    text-align: left;
    background: linear-gradient(
        180deg,
        rgba(10, 12, 22, 0) 0%,
        rgba(10, 12, 22, 0.01) 35%,
        rgba(10, 12, 22, 0.08) 50%,
        rgba(10, 12, 22, 0.25) 62%,
        rgba(10, 12, 22, 0.52) 74%,
        rgba(10, 12, 22, 0.82) 86%,
        rgba(10, 12, 22, 0.96) 96%,
        rgba(10, 12, 22, 0.98) 100%
    );
    pointer-events: none;
    box-sizing: border-box;
}

.character-overlay h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.character-age {
    margin: 0;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--pink-hot);
}

.character-age:empty {
    display: none;
}

.character-description {
    margin: 0;
    font-size: 12px;
    font-weight: 450;
    line-height: 1.38;
    color: rgba(248, 237, 245, 0.82);
    display: -webkit-box;
    min-height: 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    word-break: break-word;
}

.chat-history-list {
    display: grid;
    gap: 12px;
}

.chat-history-item {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) minmax(70px, auto);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1.5px solid #23283f;
    border-radius: 20px;
    color: var(--text);
    background: #131626;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-history-item:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
    transform: translateY(-1.5px);
}

.chat-avatar {
    position: relative;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.36), rgba(56, 189, 248, 0.14));
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-avatar img.is-hidden,
.chat-avatar-placeholder.is-hidden,
.active-chat-badge.is-hidden,
.modal-actions.is-hidden {
    display: none;
}

.chat-avatar-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 6px;
    color: rgba(248, 237, 245, 0.68);
    font-size: 11px;
    font-weight: 900;
}

.chat-history-content {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.chat-history-topline {
    min-width: 0;
    display: block;
}

.chat-history-topline h2 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 17.5px;
    line-height: 1.5;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-history-meta {
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 7px;
}

.chat-history-meta time {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 800;
    direction: ltr;
    line-height: 1.4;
    text-align: right;
    white-space: nowrap;
}

.chat-history-content p {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: rgba(248, 237, 245, 0.72);
    font-size: 14.5px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-chat-badge {
    padding: 4px 9px;
    border-radius: 999px;
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.35);
    font-size: 11.5px;
    font-weight: 800;
}

.empty-state {
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 28px 16px;
    border: 1px dashed rgba(139, 92, 246, 0.35);
    border-radius: 22px;
    color: var(--muted);
    background: rgba(19, 22, 38, 0.75);
    text-align: center;
}

.empty-state p {
    margin: 0;
    font-weight: 900;
}

.empty-state a {
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    text-decoration: none;
    font-size: 13.2px;
    font-weight: 900;
}

.income-page {
    display: grid;
    gap: 22px;
}

[data-income-content] {
    display: grid;
    gap: 20px;
}

.is-hidden {
    display: none !important;
}

.wallet-balance-card,
.withdraw-balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.22), transparent 34%),
        linear-gradient(145deg, rgba(22, 26, 46, 0.96), rgba(14, 17, 31, 0.96));
    box-shadow: var(--shadow);
}

.wallet-balance-card span,
.withdraw-balance-card span {
    color: var(--muted);
    font-size: 14.3px;
    font-weight: 800;
}

.wallet-balance-card strong {
    direction: rtl;
    color: #ffffff;
    font-size: 30.8px;
    line-height: 1.1;
}

.balance-crypto {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #34d399;
    direction: ltr;
    margin-top: 3px;
}

.withdraw-balance-card {
    min-height: 58px;
    padding: 14px 16px;
    border-radius: 18px;
}

.withdraw-balance-card strong {
    direction: ltr;
    color: #ffffff;
    font-size: 19.8px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.withdraw-balance-card.is-secondary strong {
    font-size: 19.8px;
}

.income-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.income-summary-grid article,
.income-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(19, 22, 38, 0.85);
    box-shadow: var(--shadow);
}

.income-summary-grid article {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.income-summary-grid span,
.income-card p,
.withdraw-form small,
.income-list-item span {
    color: var(--muted);
    font-size: 13.2px;
}

.income-summary-grid strong {
    color: #ffffff;
    font-size: 22px;
}

.income-card {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.income-card.withdraw-balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.income-card h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 18.7px;
}

.support-content-card {
    gap: 12px;
}

.support-content-text {
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-wrap;
}

.support-content-text p {
    margin: 0;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.income-card-header h2,
.webapp-modal h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.income-disabled-card {
    min-height: calc(100vh - 116px - env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    padding: 0 18px;
    color: #ede9fe;
    line-height: 2;
    text-align: center;
    font-weight: 900;
    background: transparent;
}

.income-rates-grid {
    display: grid;
    gap: 10px;
}

.income-rates-grid article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.income-rates-grid article:last-child {
    border-bottom: 0;
}

.income-rates-grid span {
    color: var(--muted);
    font-size: 14.3px;
}

.income-rates-grid strong {
    color: #ffffff;
}

.income-card-header,
.income-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.income-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.income-secondary-actions {
    display: grid;
    gap: 10px;
}

.income-action-row a,
.income-support-link {
    text-decoration: none;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 16px;
    color: #ffffff;
    background: rgba(139, 92, 246, 0.14);
    font-weight: 900;
}

.income-card-header button,
.withdraw-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    font-weight: 900;
    cursor: pointer;
}

.income-card-header button {
    min-height: 36px;
    padding: 0 14px;
}

.referral-link-box {
    direction: ltr;
    overflow-wrap: anywhere;
    padding: 12px;
    border: 1px dashed rgba(139, 92, 246, 0.45);
    border-radius: 16px;
    color: #ede9fe;
    background: rgba(8, 7, 17, 0.56);
    font-size: 14.3px;
}

.withdraw-form,
.income-list,
.income-list-item > div {
    display: grid;
    gap: 10px;
}

.withdraw-form label {
    display: grid;
    gap: 8px;
}

.withdraw-form input,
.withdraw-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    color: var(--text);
    background: rgba(8, 7, 17, 0.76);
    outline: 0;
    resize: vertical;
}

.withdraw-form button {
    min-height: 48px;
}

.income-cta-button {
    min-height: 54px;
    border: 0;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    font-size: 17.6px;
    font-weight: 900;
    cursor: pointer;
    animation: incomePulse 1.8s ease-in-out infinite;
}

@keyframes incomePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.45);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

.income-list-item {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.income-withdrawal-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.withdrawal-status-badge {
    justify-self: end;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.withdrawal-status-badge,
.withdrawal-status-badge *,
.withdrawal-status-badge .mini-icon,
.withdrawal-status-badge .local-icon-slot {
    color: #ffffff;
}

.withdrawal-status-badge img {
    filter: brightness(0) invert(1);
}

.withdrawal-status-badge.is-pending {
    color: #ffffff;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: rgba(251, 191, 36, 0.44);
}

.withdrawal-status-badge.is-approved {
    color: #ffffff;
    background: linear-gradient(135deg, #6ee7b7, #10b981);
    border-color: rgba(52, 211, 153, 0.42);
}

.withdrawal-status-badge.is-rejected {
    color: #ffffff;
    background: linear-gradient(135deg, #f43f5e, #be185d);
    border-color: rgba(251, 113, 133, 0.4);
}

.mini-datetime {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.mini-datetime-date {
    color: rgba(255, 255, 255, 0.58);
    font-weight: 400;
}

.mini-datetime-time {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

.income-back-link {
    width: fit-content;
    justify-self: end;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(139, 92, 246, 0.14);
    font-weight: 900;
    text-decoration: none;
}

.income-list-item > div:last-child {
    justify-items: end;
}

.income-empty {
    margin: 0;
}

.income-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.income-pagination button {
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 12px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(139, 92, 246, 0.14);
}

.income-pagination button:disabled {
    opacity: 0.45;
}

.subscription-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 540px;
    min-width: 0;
    margin: 0 auto;
    padding: 8px 0 20px 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Developer Test Box Collapsible */
.dev-telegram-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 9px 14px;
    font-size: 12.5px;
    color: var(--muted);
    transition: all 0.2s ease;
}

.dev-telegram-details[open] {
    background: rgba(255, 255, 255, 0.06);
    border-style: solid;
    border-color: rgba(56, 189, 248, 0.35);
    padding: 12px 14px;
}

.dev-telegram-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.dev-telegram-summary::-webkit-details-marker {
    display: none;
}

.dev-id-tag {
    color: #38bdf8;
    font-family: monospace;
    font-size: 13px;
    margin-left: 4px;
}

.dev-toggle-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11.5px;
}

.dev-telegram-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.dev-telegram-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 13px;
    direction: ltr;
}

.dev-telegram-row button {
    background: #0284c7;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease;
}

.dev-telegram-row button:hover {
    background: #0369a1;
}

/* More Page Top Header & Minimal Token Vault Chip */
.more-page-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 2px 4px 0 4px;
}

.more-topbar-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.token-vault-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(234, 179, 8, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.32);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    cursor: default;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.token-vault-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.2);
}

.token-vault-chip .vault-coin-icon {
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.token-vault-chip .vault-coin-icon img {
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
}

.token-vault-chip .vault-count {
    font-size: 14px;
    font-weight: 800;
    color: #fef08a;
    line-height: 1;
    letter-spacing: -0.2px;
}

.token-vault-chip .vault-unit {
    font-size: 11.5px;
    font-weight: 700;
    color: rgba(254, 240, 138, 0.82);
    line-height: 1;
}

/* VIP Hero Current Subscription Card */
.subscription-current-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 18px 20px;
    background: linear-gradient(145deg, rgba(22, 26, 46, 0.94) 0%, rgba(14, 17, 31, 0.98) 100%);
    border: 1px solid rgba(139, 92, 246, 0.28);
    box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.45), 0 0 20px rgba(139, 92, 246, 0.12);
    backdrop-filter: blur(14px);
    display: grid;
    gap: 14px;
}

.subscription-current-card.is-unlimited-active {
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.16) 0%, transparent 60%), linear-gradient(145deg, rgba(14, 28, 54, 0.92) 0%, rgba(10, 16, 32, 0.96) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.45), 0 0 24px rgba(56, 189, 248, 0.16);
}

.subscription-current-card.is-unlimited-active .vip-card-glow {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, transparent 70%);
}

.subscription-current-card.is-unlimited-active .subscription-label-badge {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(56, 189, 248, 0.25));
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #bae6fd;
}

.subscription-current-card.is-unlimited-active .stat-progress-fill {
    background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.vip-card-glow {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

/* Token Balance Banner (Clean Hero display) */
.token-balance-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.token-balance-main {
    display: flex;
    align-items: center;
    gap: 13px;
}

.token-coin-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 179, 8, 0.12));
    border: 1px solid rgba(245, 158, 11, 0.38);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.token-coin-icon-box.is-unlimited {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 179, 8, 0.12));
    border: 1px solid rgba(245, 158, 11, 0.42);
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.token-crown-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.45));
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.token-coin-emoji {
    font-size: 24px;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.token-balance-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.token-balance-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(248, 237, 245, 0.65);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.token-balance-num-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.token-balance-count {
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
    color: #fef08a;
    text-shadow: 0 0 16px rgba(254, 240, 138, 0.35);
    letter-spacing: -0.5px;
}

.token-balance-unit {
    font-size: 13px;
    font-weight: 700;
    color: rgba(254, 240, 138, 0.75);
}

.token-balance-status-wrap {
    flex-shrink: 0;
    margin-left: auto;
}

.user-plan-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.user-plan-status-badge.is-active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(56, 189, 248, 0.15));
    border-color: rgba(56, 189, 248, 0.38);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.18);
}

.user-plan-status-badge.is-free {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.plan-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 2s infinite;
    flex-shrink: 0;
}

.user-plan-status-badge.is-free .plan-badge-dot {
    background: #94a3b8;
    box-shadow: none;
    animation: none;
}

.plan-badge-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    text-align: right;
}

.plan-badge-name {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
}

.user-plan-status-badge.is-active .plan-badge-name {
    color: #bae6fd;
}

.plan-badge-time {
    font-size: 11px;
    font-weight: 600;
    color: rgba(248, 237, 245, 0.6);
}

.user-plan-status-badge.is-active .plan-badge-time {
    color: #7dd3fc;
}

/* Unlimited Plan Balance Symbol & Subtext */
.token-balance-num-row.is-unlimited {
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.token-unlimited-sign {
    font-size: 1.25em;
    margin-right: 2px;
    color: #38bdf8;
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
    font-weight: 500;
    display: inline-block;
    vertical-align: baseline;
    line-height: 1;
}

.token-unlimited-label {
    font-size: 26px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

.token-per-day-sub {
    font-size: 12.5px;
    opacity: 0.92;
    font-weight: 600;
    color: #7dd3fc;
    margin-left: 2px;
    line-height: 1;
}

/* Daily Reset Banner inside subscription-current-card */
.daily-reset-banner {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 8px;
}

.subscription-current-card.is-unlimited-active .daily-reset-banner {
    border-top-color: rgba(56, 189, 248, 0.16);
}

.daily-reset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
}

.daily-reset-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.daily-reset-item.is-right {
    text-align: right;
    align-items: flex-end;
}

.daily-reset-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(248, 237, 245, 0.6);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.daily-reset-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #bae6fd;
    font-family: inherit;
    direction: ltr;
    letter-spacing: -0.2px;
}

.daily-reset-val .usage-pct {
    color: #38bdf8;
    font-weight: 900;
}

.daily-reset-val .usage-fraction {
    font-size: 11px;
    font-weight: 600;
    color: rgba(248, 237, 245, 0.65);
    margin-left: 4px;
}

.daily-reset-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.daily-reset-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
    transition: width 0.4s ease;
}

/* Premium Features Card (Admin Configured Perks) */
.premium-features-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 16px 18px;
    background: linear-gradient(145deg, rgba(38, 20, 56, 0.85) 0%, rgba(18, 13, 28, 0.95) 100%);
    border: 1px solid rgba(251, 191, 36, 0.35);
    box-shadow: 0 8px 28px -6px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.12);
    backdrop-filter: blur(14px);
    display: grid;
    gap: 12px;
}

.premium-features-header {
    display: flex;
    align-items: center;
    gap: 13px;
}

.features-badge-wrap {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(139, 92, 246, 0.28) 50%, rgba(99, 102, 241, 0.28) 100%);
    border: 1px solid rgba(251, 191, 36, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.28), 0 0 10px rgba(139, 92, 246, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.features-crown-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.55));
    display: block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.premium-features-card:hover .features-crown-img {
    transform: scale(1.08) rotate(-3deg);
}

.features-header-titles h3 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.features-header-titles p {
    margin: 3px 0 0;
    font-size: 12px;
    color: rgba(248, 237, 245, 0.72);
    font-weight: 500;
    line-height: 1.35;
}

.premium-features-list {
    display: grid;
    gap: 9px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.premium-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(248, 237, 245, 0.88);
}

.feature-item-icon {
    color: #c084fc;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item-text {
    flex: 1;
}

.current-subscription-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.subscription-label-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(99, 102, 241, 0.22));
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #ddd6fe;
}

.parallel-subs-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8.5px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #fef08a;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3.5px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-indicator.is-active {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.status-indicator.is-active .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.status-indicator.is-inactive {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.current-subscription-heading h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.inactive-credits-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.28);
    padding: 7px 12px;
    border-radius: 12px;
    width: fit-content;
}

.inactive-credits-chip .chip-label {
    font-size: 12.5px;
    color: rgba(254, 240, 138, 0.85);
}

.inactive-credits-chip .chip-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #fef08a;
}

.subscription-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    position: relative;
    z-index: 2;
    margin-top: 14px;
}

.stat-cell {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-height: 104px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-cell-tokens {
    background: linear-gradient(160deg, rgba(245, 158, 11, 0.04) 0%, rgba(14, 9, 20, 0.55) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.stat-cell-time {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, rgba(14, 9, 20, 0.55) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.is-unlimited-active .stat-cell-tokens {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.035) 0%, rgba(4, 9, 22, 0.65) 100%);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06), 0 4px 14px rgba(0, 0, 0, 0.3);
}

.is-unlimited-active .stat-cell-time {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.035) 0%, rgba(4, 9, 22, 0.65) 100%);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06), 0 4px 14px rgba(0, 0, 0, 0.3);
}

.stat-cell-wide {
    grid-column: span 2;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    min-height: auto;
    padding: 10px 14px;
}

.stat-cell-top {
    display: flex;
    align-items: center;
    gap: 7px;
}

.stat-badge-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.stat-badge-icon svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.stat-badge-icon.icon-unlimited svg {
    width: 15px;
    height: 9px;
    flex-shrink: 0;
}

.icon-token {
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.icon-time {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.icon-model {
    background: rgba(168, 85, 247, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.icon-unlimited {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #6ee7b7;
}

.stat-title {
    font-size: 11.5px;
    font-weight: 700;
    color: rgba(248, 237, 245, 0.7);
    white-space: nowrap;
}

.stat-metric-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
}

.stat-number {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.stat-token-num {
    color: #fef08a;
    text-shadow: 0 0 16px rgba(254, 240, 138, 0.25);
}

.stat-time-num {
    color: #ffffff;
}

.stat-unit {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
}

.stat-unit svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    display: inline-block;
}

.stat-sub-row {
    display: flex;
    align-items: center;
    min-height: 20px;
}

.stat-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7.5px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.stat-pill-tag svg {
    width: 12px;
    height: 12px;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
}

.tag-token {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.24);
    color: rgba(254, 240, 138, 0.9);
}

.tag-time {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: rgba(186, 230, 253, 0.9);
}

.tag-timer {
    background: rgba(168, 85, 247, 0.14);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2.5px 8px;
    border-radius: 6px;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.stat-cell-tokens.is-exhausted {
    background: linear-gradient(145deg, rgba(244, 63, 94, 0.08) 0%, rgba(20, 14, 28, 0.75) 100%);
    border-color: rgba(244, 63, 94, 0.35);
}

.stat-cell-tokens.is-exhausted .stat-badge-icon {
    background: rgba(244, 63, 94, 0.2);
    border: 1px solid rgba(244, 63, 94, 0.35);
}

.stat-token-num.is-exhausted-num {
    color: #fb7185;
    text-shadow: 0 0 16px rgba(244, 63, 94, 0.3);
}

.stat-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
}

.stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #c084fc);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.subscription-card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 12px;
}

.subscription-card-footer .credit-cost-note,
.subscription-current-card .credit-cost-note {
    margin: 0;
    font-size: 12.5px;
    color: rgba(248, 237, 245, 0.72);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 7px;
}

.credit-cost-note svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #38bdf8;
    vertical-align: middle;
}

.credit-cost-note svg [opacity=".5"] {
    opacity: 0.45;
}

/* Other Active Subscriptions (Parallel Subscriptions) */
.other-subscriptions-wrap {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.other-subs-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 800;
    color: rgba(248, 237, 245, 0.75);
    padding: 0 4px;
}

.other-subs-count {
    font-size: 11px;
    padding: 2.5px 9px;
    border-radius: 999px;
    background: rgba(234, 179, 8, 0.14);
    border: 1px solid rgba(234, 179, 8, 0.32);
    color: #fef08a;
    font-weight: 700;
}

.other-subs-list {
    display: grid;
    gap: 10px;
}

.other-sub-item {
    background: linear-gradient(145deg, rgba(22, 26, 46, 0.94) 0%, rgba(14, 17, 31, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    display: grid;
    gap: 9px;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.other-sub-item:hover {
    border-color: rgba(139, 92, 246, 0.35);
}

.other-sub-item.is-unlimited-sub {
    border-color: rgba(245, 158, 11, 0.18);
}

.other-sub-item.is-unlimited-sub:hover {
    border-color: rgba(245, 158, 11, 0.35);
}

.other-sub-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.other-sub-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.other-sub-title strong {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.other-sub-type-badge {
    font-size: 11px;
    padding: 2px 7.5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.other-sub-type-badge.is-unlimited-badge {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.other-sub-type-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.other-sub-days-left {
    font-size: 13px;
    font-weight: 600;
    color: rgba(248, 237, 245, 0.72);
    white-space: nowrap;
    letter-spacing: -0.1px;
}

.other-sub-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

.other-sub-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.other-sub-stat small {
    color: rgba(248, 237, 245, 0.55);
    font-size: 11.5px;
}

.other-sub-stat span,
.other-sub-stat strong {
    color: #f1f5f9;
    font-weight: 700;
}

/* Plans Section & Gateway Tabs */
.plans-section {
    display: grid;
    gap: 16px;
    margin-top: 6px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-title-row h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    color: #ffffff;
}

.section-title-row span {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
}

.gateway-selector-wrap {
    margin: 2px 0 6px;
}

.gateway-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 5px;
    gap: 6px;
    overflow-x: auto;
}

.gateway-tab-btn {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(248, 237, 245, 0.65);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.gateway-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.gateway-tab-btn.is-active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.gateway-tab-btn.is-active[data-gateway="stars"] {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.35));
    border-color: rgba(234, 179, 8, 0.5);
    color: #fef08a;
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.25);
}

.gateway-tab-btn.is-active[data-gateway="card_to_card"] {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(37, 99, 235, 0.35));
    border-color: rgba(56, 189, 248, 0.5);
    color: #bae6fd;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.gateway-tab-btn.is-active[data-gateway="frenzy"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(99, 102, 241, 0.35));
    border-color: rgba(139, 92, 246, 0.5);
    color: #ddd6fe;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

/* Plan Cards */
.plans-list {
    display: grid;
    gap: 12px;
}

.plan-card {
    position: relative;
    border-radius: 18px;
    padding: 15px 14px;
    border: 1px solid #23283f;
    background: rgba(19, 22, 38, 0.72);
    backdrop-filter: blur(12px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.plan-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(24, 28, 48, 0.85);
    transform: translateY(-1px);
}

.plan-card.is-selected {
    border-color: #8b5cf6;
    background: linear-gradient(145deg, rgba(28, 32, 60, 0.94), rgba(15, 18, 34, 0.98));
    box-shadow: 0 8px 24px -4px rgba(139, 92, 246, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

/* Unlimited Plan Distinct Luxury Styling (Without adding extra text) */
.plan-card.is-unlimited-plan {
    border-color: rgba(56, 189, 248, 0.28);
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.09) 0%, transparent 65%), rgba(19, 20, 36, 0.78);
    box-shadow: 0 4px 18px -2px rgba(14, 165, 233, 0.08);
    align-items: center;
    min-height: 64px;
}

.plan-card.is-unlimited-plan .plan-radio-indicator {
    margin-top: 0;
}

.plan-card.is-unlimited-plan:hover {
    border-color: rgba(56, 189, 248, 0.45);
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.14) 0%, transparent 70%), rgba(22, 25, 45, 0.88);
}

.plan-card.is-unlimited-plan .plan-title-row h3 {
    color: #f0f9ff;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.plan-card.is-unlimited-plan.is-selected {
    border-color: #38bdf8;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.18) 0%, transparent 70%), linear-gradient(145deg, rgba(14, 34, 62, 0.94), rgba(18, 16, 36, 0.96));
    box-shadow: 0 10px 28px -4px rgba(56, 189, 248, 0.32), 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.plan-card.is-unlimited-plan.is-selected .plan-radio-indicator {
    border-color: #38bdf8;
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.plan-card.is-unlimited-plan .recommended-badge {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.45);
    color: #ffffff;
}

.plan-card.is-unlimited-plan .meta-pill.is-unlimited {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
}

.plan-card.has-recommended-badge {
    margin-top: 10px;
}

.plan-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-radio-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
    display: grid;
    place-items: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
    margin-top: 3px;
}

.plan-card.is-selected .plan-radio-indicator {
    border-color: #8b5cf6;
    background: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.plan-card.is-selected .plan-radio-indicator::after {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
}

.plan-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.plan-title-row h3 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
}

.current-plan-tag {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.plan-desc {
    margin: 0;
    color: rgba(248, 237, 245, 0.65);
    font-size: 13.5px;
    line-height: 1.45;
}

.plan-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(248, 237, 245, 0.72);
}

.meta-pill.is-unlimited {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.22);
}

.meta-pill.is-unlimited svg {
    width: 13px;
    height: 7.5px;
    display: block;
    flex-shrink: 0;
    margin: 0;
}

.meta-pill.is-credits {
    color: #fde047;
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.22);
}

.meta-pill.is-time {
    color: rgba(248, 237, 245, 0.75);
}

.meta-pill.is-lifetime {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.2);
}

.meta-pill.is-model {
    color: #d8b4fe;
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.2);
}

.plan-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: center;
    justify-content: center;
    text-align: right;
    flex-shrink: 0;
    gap: 2px;
}

.plan-price-discount-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.plan-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 800;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(244, 63, 94, 0.3);
    letter-spacing: 0;
    line-height: 1.2;
    direction: ltr;
}

.plan-old-price {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 13px;
    font-weight: 600;
    text-decoration: line-through;
    text-decoration-color: #f43f5e;
    line-height: 1;
    margin: 0;
}

.plan-old-price .old-price-star {
    font-size: 11.5px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.stars-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.stars-price.is-stars {
    color: #fef08a !important;
}

.stars-price .stars-number {
    display: inline-block;
    line-height: 1;
    font-feature-settings: "tnum" 1;
}

.stars-price .stars-label {
    font-size: 15px;
    font-weight: 700;
    color: #fef08a;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1em;
}

.secondary-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    color: rgba(183, 168, 182, 0.65);
    font-size: 12px;
    margin-top: 2px;
}

.recommended-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 3px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.subscription-floating-bar {
    position: fixed;
    right: 12px;
    bottom: calc(90px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 25;
    width: min(540px, calc(100% - 24px));
    margin: 0 auto;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.subscription-floating-bar.is-hidden {
    display: none !important;
}

.buy-subscription-button {
    pointer-events: auto;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.45);
    font-size: 16.5px;
    font-weight: 800;
    cursor: pointer;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    animation: none;
    transform: none !important;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.buy-subscription-button span,
.buy-subscription-button .mini-icon {
    position: relative;
    z-index: 2;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: auto;
}

/* Shimmer Light Halo Wave across Button */
.buy-subscription-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -140%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(216, 180, 254, 0.05) 20%,
        rgba(233, 213, 255, 0.22) 42%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(233, 213, 255, 0.22) 58%,
        rgba(216, 180, 254, 0.05) 80%,
        transparent 100%
    );
    transform: skewX(-22deg) translateZ(0);
    -webkit-transform: skewX(-22deg) translateZ(0);
    filter: blur(2px);
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    animation: btnShimmerGlow 4.5s ease-in-out infinite;
}

@keyframes btnShimmerGlow {
    0% {
        transform: translateX(0) skewX(-22deg) translateZ(0);
        -webkit-transform: translateX(0) skewX(-22deg) translateZ(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    45% {
        transform: translateX(400%) skewX(-22deg) translateZ(0);
        -webkit-transform: translateX(400%) skewX(-22deg) translateZ(0);
        opacity: 1;
    }
    50%, 100% {
        transform: translateX(400%) skewX(-22deg) translateZ(0);
        -webkit-transform: translateX(400%) skewX(-22deg) translateZ(0);
        opacity: 0;
    }
}

@keyframes btnPulseGlow {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(124, 58, 237, 0.45);
    }
    50% {
        box-shadow: 0 6px 28px rgba(139, 92, 246, 0.65), 0 0 16px rgba(168, 85, 247, 0.35);
    }
}

.buy-subscription-button .mini-icon {
    width: 20px;
    height: 20px;
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.buy-subscription-button:hover:not(:disabled) {
    box-shadow: 0 8px 26px rgba(124, 58, 237, 0.55);
}

.buy-subscription-button:active:not(:disabled) {
    transform: scale(0.98);
}

.buy-subscription-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    animation: none;
}

.buy-subscription-button:disabled::before {
    display: none;
}

.buy-subscription-button .buy-btn-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buy-subscription-button .buy-btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 24px;
}

.buy-subscription-button.is-loading .buy-btn-content {
    display: none !important;
}

.buy-subscription-button.is-loading .buy-btn-loader {
    display: inline-flex !important;
}

.buy-subscription-button.is-loading,
.buy-subscription-button.is-loading:disabled {
    opacity: 1 !important;
    filter: none !important;
    cursor: wait !important;
    pointer-events: none;
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.45) !important;
}

.buy-subscription-button.is-loading::before {
    display: block !important;
}

.buy-btn-loader .btn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
    display: inline-block;
    animation: buyBtnDotPulse 1.2s infinite ease-in-out both;
}

.buy-btn-loader .btn-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.buy-btn-loader .btn-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.buy-btn-loader .btn-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes buyBtnDotPulse {
    0%, 80%, 100% {
        transform: scale(0.65);
        opacity: 0.35;
    }
    40% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.gem-pack-buy-btn.is-loading,
.gem-pack-buy-btn.is-loading:disabled {
    opacity: 1 !important;
    filter: none !important;
    cursor: wait !important;
    pointer-events: none;
}

.purchase-guide-button {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(248, 237, 245, 0.72);
    background: rgba(255, 255, 255, 0.03);
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.purchase-guide-button:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* SPA Navigation Transitions */
.spa-transition-out {
    opacity: 0;
    transition: opacity 0.1s ease-out;
}

.spa-transition-in {
    animation: spaPageFadeIn 0.15s ease-out both;
}

@keyframes spaPageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.bottom-nav {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 20;
    width: min(540px, calc(100% - 20px));
    margin: 0 auto;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 22px;
    background: rgba(16, 20, 38, 0.94);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55), 0 0 24px rgba(139, 92, 246, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: manipulation;
}

.bottom-nav-item {
    min-width: 0;
    display: grid;
    place-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 16px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: color 0.18s ease, background 0.18s ease, transform 0.12s ease;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    outline: none !important;
    touch-action: manipulation;
}

.bottom-nav-item:focus,
.bottom-nav-item:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.bottom-nav-item:active {
    outline: none !important;
    box-shadow: none !important;
    transform: scale(0.95) translateZ(0);
    -webkit-tap-highlight-color: transparent !important;
}

@media (hover: hover) {
    .bottom-nav-item:hover:not(.is-active) {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }
}

.bottom-nav-item .icon-active {
    display: none;
}

.bottom-nav-item .icon-inactive {
    display: block;
}

.bottom-nav-item.is-active .icon-active {
    display: block;
}

.bottom-nav-item.is-active .icon-inactive {
    display: none;
}

.bottom-nav-item.is-active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
}

.income-action-row a .mini-icon,
.income-support-link .mini-icon,
.income-card-header button .mini-icon,
.withdraw-form button .mini-icon,
.income-cta-button .mini-icon,
.buy-subscription-button .mini-icon,
.purchase-guide-button .mini-icon,
.modal-actions button .mini-icon {
    color: currentColor;
}

.bottom-nav-item.is-disabled {
    opacity: 0.62;
}

.eyebrow,
.bottom-nav-item,
.gender-toggle,
.modal-actions button,
.dev-telegram-box button,
.empty-state a,
.income-action-row a,
.income-support-link,
.income-card-header button,
.withdraw-form button,
.income-cta-button,
.buy-subscription-button,
.purchase-guide-button,
.withdrawal-status-badge {
    font-weight: 700;
}

.page-header h1 {
    font-size: 28px;
}

.income-cta-button {
    font-size: 16px;
}

.dev-telegram-box > span,
.status-message,
.character-placeholder,
.chat-avatar-placeholder,
.character-description,
.chat-history-content p,
.chat-history-meta time,
.empty-state p,
.income-summary-grid span,
.wallet-balance-card span,
.withdraw-balance-card span,
.income-card p,
.income-rates-grid span,
.income-list-item span,
.withdraw-form small,
.credit-cost-note,
.subscription-current-card p,
.subscription-stats span,
.subscription-stat-box small,
.plan-body p,
.section-title-row span,
.secondary-prices {
    font-weight: 400;
}

.wallet-balance-card strong,
.withdraw-balance-card strong,
.subscription-label,
.current-subscription-heading span,
.recommended-badge {
    font-weight: 700;
}

.income-list-item .withdrawal-status-badge,
.income-list-item .withdrawal-status-badge span,
.income-list-item .withdrawal-status-badge *,
.income-list-item .withdrawal-status-badge .mini-icon,
.income-list-item .withdrawal-status-badge .local-icon-slot {
    color: #ffffff !important;
}

.income-list-item .withdrawal-status-badge img {
    filter: brightness(0) invert(1);
}

@media (min-width: 620px) {
    .webapp-shell {
        padding-top: 28px;
    }

    .characters-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .character-overlay h2 {
        font-size: 16px;
    }

    .character-description {
        font-size: 12.5px;
    }
}

@media (max-width: 360px) {
    .character-overlay {
        padding: 14px 8px 8px;
    }

    .character-overlay h2 {
        font-size: 14px;
    }

    .character-description {
        font-size: 11.5px;
    }

    .dev-telegram-row {
        grid-template-columns: 1fr;
    }

    .chat-history-item {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .chat-history-meta {
        grid-column: 2;
        align-items: flex-start;
        flex-direction: row-reverse;
        justify-content: flex-end;
    }
}

@media (min-width: 920px) {
    .characters-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* =========================================================
   Web App Multi-Gateway & Payment Modals UI
   ========================================================= */

.gateway-selector-wrap {
    margin: 4px 0 12px;
}

.gateway-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(19, 22, 38, 0.85);
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    overflow-x: auto;
    backdrop-filter: blur(10px);
}

.gateway-tab-btn {
    flex: 1;
    min-width: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gateway-tab-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.gateway-tab-btn.is-active {
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.gateway-tab-btn .tab-icon {
    font-size: 16px;
}

/* WebApp Bottom Sheet Modals (Dark Glassmorphic) */
.webapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.webapp-modal.is-hidden {
    display: none !important;
}

.webapp-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.25s ease-out;
}

.webapp-modal-sheet {
    position: relative;
    background: linear-gradient(180deg, #15182a 0%, #0c0f1c 100%);
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 24px 20px 36px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.1);
    z-index: 10;
    color: var(--text);
    animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sheet-icon {
    font-size: 24px;
}

.sheet-title-wrap h3 {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
    font-weight: 800;
}

.sheet-close-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sheet-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

/* Drag handle for mobile bottom sheets */
.sheet-drag-handle {
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.24);
    border-radius: 4px;
    margin: -10px auto 16px;
}

/* Chat Action Bottom Sheet (Mobile Optimized & Centered) */
.chat-action-sheet {
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
}

.chat-sheet-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.chat-sheet-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 22px;
    width: 100%;
}

.chat-sheet-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(139, 92, 246, 0.6);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
    margin-bottom: 12px;
}

.chat-sheet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-sheet-avatar-placeholder {
    font-size: 22px;
    font-weight: 900;
    color: var(--pink);
}

.chat-sheet-profile h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.4;
}

.chat-sheet-profile h3.danger-title {
    color: #f87171;
}

.chat-sheet-profile p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
    max-width: 320px;
    line-height: 1.6;
}

.chat-reset-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    margin-bottom: 12px;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
}

.chat-reset-badge .local-icon-slot,
.chat-reset-badge .mini-icon {
    width: 28px;
    height: 28px;
    color: #ef4444;
}

.chat-sheet-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.chat-btn-primary {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.chat-btn-primary .local-icon-slot,
.chat-btn-primary .mini-icon {
    color: #ffffff;
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.chat-btn-primary .local-icon-slot img {
    filter: brightness(0) invert(1);
}

.chat-btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

.chat-btn-reset {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    font-size: 14.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.chat-btn-reset .local-icon-slot,
.chat-btn-reset .mini-icon {
    color: #fca5a5;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.chat-btn-reset:active {
    transform: scale(0.98);
    background: rgba(239, 68, 68, 0.18);
}

.chat-btn-danger {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.chat-btn-danger .local-icon-slot,
.chat-btn-danger .mini-icon {
    color: #ffffff;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.chat-btn-danger .local-icon-slot img {
    filter: brightness(0) invert(1);
}

.chat-btn-danger:active {
    transform: scale(0.98);
}

.chat-btn-ghost {
    width: 100%;
    min-height: 44px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.chat-btn-ghost:hover {
    color: #ffffff;
}

.chat-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* Payment Summary Card */
.payment-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 16px;
    padding: 14px 16px;
    margin: 18px 0;
}

.payment-summary-card small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 2px;
}

.payment-summary-card strong {
    font-size: 17.5px;
    color: #ffffff;
}

.amount-badge .toman-price {
    font-size: 24px;
    font-weight: 900;
    color: #c084fc;
}

/* Realistic Bank Card Graphic */
.bank-card-display {
    position: relative;
    background: linear-gradient(135deg, #181c34 0%, #0e1122 100%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 20px;
    padding: 20px;
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    margin-bottom: 18px;
    overflow: hidden;
}

.bank-card-display::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, rgba(139, 92, 246, 0) 70%);
}

.card-chip-sim {
    width: 40px;
    height: 28px;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    border-radius: 6px;
    margin-bottom: 14px;
}

.card-bank-info {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 14px;
    font-weight: 700;
    color: #c084fc;
}

.card-number-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 16px;
}

.card-digits {
    font-family: monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #ffffff;
}

.copy-card-btn {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #ffffff;
    padding: 7px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-card-btn:hover {
    background: rgba(139, 92, 246, 0.35);
}

.copy-card-btn.copied {
    background: #10b981;
    border-color: #059669;
}

.card-holder-row small {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 2px;
}

.card-holder-row strong {
    font-size: 15.5px;
    color: #ffffff;
}

.card-instructions-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-right: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #fde68a;
    margin-bottom: 18px;
}

/* Receipt Upload Form */
.receipt-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.form-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text);
    background: rgba(8, 7, 17, 0.7);
    transition: border-color 0.2s;
}

.form-field input[type="text"]:focus {
    border-color: var(--pink);
    outline: none;
}

.form-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.file-dropzone {
    position: relative;
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: 14px;
    padding: 18px;
    background: rgba(139, 92, 246, 0.06);
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.file-dropzone:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--pink);
}

.file-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.dropzone-inner span {
    font-size: 14px;
    font-weight: 700;
    color: #c084fc;
}

.submit-receipt-button {
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
    margin-top: 6px;
    transition: all 0.2s;
}

.submit-receipt-button:active {
    transform: scale(0.98);
}

/* Frenzy Modal Specifics */
.frenzy-body {
    padding: 16px 0 10px;
    text-align: center;
}

.frenzy-body p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.frenzy-action-box {
    margin: 20px 0;
}

.frenzy-pay-btn {
    display: block;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff !important;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
    transition: all 0.2s ease;
}

.frenzy-pay-btn:active {
    transform: scale(0.98);
}

.frenzy-note {
    display: block;
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 14px;
}

/* =========================================================
   Responsive Fixes for Subscription Page on Mobile
   ========================================================= */
@media (max-width: 560px) {
    .plans-section {
        gap: 12px;
    }

    .section-title-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .section-title-row h2 {
        font-size: 18px;
    }

    .section-title-row span {
        font-size: 13.5px;
    }

    .gateway-selector-wrap {
        margin: 2px 0 8px;
    }

    .gateway-tabs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 6px;
        padding: 5px;
        border-radius: 16px;
    }

    .gateway-tab-btn {
        min-width: 0;
        padding: 8px 4px;
        font-size: 13.5px;
        gap: 4px;
    }

    .gateway-tab-btn .tab-icon {
        font-size: 14px;
    }

    .gateway-tab-btn span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .plans-list {
        gap: 14px;
        padding-top: 8px;
    }

    .plan-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-rows: none;
        gap: 10px;
        padding: 14px 12px;
        align-items: start;
    }

    .plan-card.has-recommended-badge {
        margin-top: 12px;
    }

    .plan-radio-indicator {
        grid-column: auto;
        grid-row: auto;
        margin-top: 3px;
    }

    .plan-body {
        grid-column: auto;
        grid-row: auto;
        min-width: 0;
        gap: 4px;
    }

    .plan-body h3 {
        font-size: 16.5px;
    }

    .plan-body p {
        font-size: 13.5px;
        line-height: 1.45;
    }

    .plan-meta {
        gap: 4px;
        margin-top: 2px;
    }

    .plan-meta span {
        padding: 2.5px 7px;
        font-size: 12.5px;
        border-radius: 7px;
    }

    .plan-price-block {
        grid-column: auto;
        grid-row: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        align-self: center;
        justify-content: center;
        width: auto;
        min-width: auto;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        text-align: right;
        flex-wrap: nowrap;
        gap: 2px;
    }

    .plan-price-block .plan-price-discount-row {
        gap: 3px;
        margin-bottom: 1px;
    }

    .plan-price-block .plan-discount-badge {
        margin-bottom: 0;
        font-size: 11px;
        padding: 1px 5px;
    }

    .plan-price-block .plan-old-price {
        margin-bottom: 0;
        margin-left: 0;
        font-size: 12.5px;
    }

    .plan-price-block .stars-price {
        font-size: 19px !important;
    }

    .plan-price-block .secondary-prices {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 1px;
        font-size: 12px;
        justify-items: end;
    }

    .form-field-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .card-digits {
        font-size: 18px;
        letter-spacing: 1.5px;
    }

    .bank-card-display {
        padding: 16px 14px;
        border-radius: 16px;
    }

    .webapp-modal-sheet {
        padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
    }
}

@media (max-width: 360px) {
    .plan-card {
        padding: 12px 10px;
        gap: 8px;
    }

    .plan-body h3 {
        font-size: 15px;
    }

    .plan-price-block .stars-price {
        font-size: 17.5px !important;
    }

    .plan-price-block .plan-discount-badge {
        font-size: 10.5px;
        padding: 1.5px 5px;
    }

    .plan-price-block .plan-old-price {
        font-size: 12px;
    }

    .gateway-tab-btn {
        font-size: 12.5px;
        padding: 7px 2px;
    }

    .section-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

html.is-telegram-webapp .dev-telegram-box,
html.is-telegram-webapp .dev-telegram-details {
    display: none !important;
}

/* Header Partner / Affiliate Button */
.header-partner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(217, 119, 6, 0.28));
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 999px;
    color: #fbbf24;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.15);
    -webkit-tap-highlight-color: transparent;
}

.header-partner-btn:active {
    transform: scale(0.96);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.4));
}

.header-partner-btn .partner-icon {
    font-size: 15px;
    line-height: 1;
}

/* Free Tokens Section (Subscription Page) */
.free-tokens-section {
    margin-bottom: 24px;
}

.free-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.free-tokens-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

@media (min-width: 600px) {
    .free-tokens-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.free-token-card {
    background: linear-gradient(135deg, rgba(19, 22, 38, 0.88) 0%, rgba(14, 16, 28, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.free-token-card .card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.free-token-card .card-icon {
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.free-token-card .card-info h3 {
    margin: 0 0 3px;
    font-size: 15.5px;
    font-weight: 800;
    color: #ffffff;
}

.free-token-card .card-info p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.free-token-card .card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.reward-pill {
    background: rgba(139, 92, 246, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #c084fc;
    font-size: 14px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.claim-daily-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    padding: 8px 18px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.claim-daily-btn:active {
    transform: scale(0.96);
}

.claim-daily-btn:disabled,
.claim-daily-btn.is-claimed {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: default;
    box-shadow: none;
    transform: none;
    opacity: 1 !important;
}

.invite-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invite-link-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 4px 6px;
}

.invite-link-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 12.5px;
    direction: ltr;
    text-align: left;
    outline: none;
    padding: 5px 6px;
    font-family: monospace, inherit;
}

.btn-copy-invite {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.btn-copy-invite:active {
    background: rgba(255, 255, 255, 0.22);
}

.btn-share-tg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-share-tg:active {
    transform: scale(0.97);
}

/* Daily Gift Popup Modal */
.daily-gift-sheet {
    text-align: center;
    max-width: 420px;
}

.daily-gift-sheet-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 12px 4px 6px;
}

.gift-box-anim {
    font-size: 60px;
    line-height: 1;
    animation: giftBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(139, 92, 246, 0.45));
    margin-bottom: 4px;
}

@keyframes giftBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(4deg); }
}

.daily-gift-hero h4 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 900;
    color: #ffffff;
}

.daily-gift-hero p {
    margin: 0;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
}

.daily-gift-reward-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(139, 92, 246, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.45);
    padding: 10px 24px;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.daily-gift-reward-box.is-diamond-reward {
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.daily-gift-reward-box .reward-amount {
    font-size: 28px;
    font-weight: 900;
    color: #c084fc;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
    line-height: 1;
}

.daily-gift-reward-box.is-diamond-reward .reward-amount {
    font-size: 28px;
    font-weight: 900;
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
    line-height: 1;
}

.daily-gift-reward-box .reward-unit {
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ddd6fe;
}

.daily-gift-reward-box.is-diamond-reward .reward-unit {
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bae6fd;
}

.reward-pill.diamond-theme {
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.daily-gift-sheet-body .claim-daily-btn {
    width: 100%;
    padding: 14px;
    font-size: 15.5px;
    border-radius: 16px;
}

/* ============================================================
   MORE / ACCOUNT HUB PAGE
   ============================================================ */
.more-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* -------------------------------------------------------------
   More / Hub Page Styles
   ------------------------------------------------------------- */
.more-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 24px;
}

/* 1. Profile & Balance Card */
.more-profile-card {
    background: linear-gradient(135deg, rgba(22, 26, 46, 0.94) 0%, rgba(14, 17, 31, 0.98) 100%);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 20px;
    padding: 16px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(99, 102, 241, 0.25));
    border: 1.5px solid rgba(139, 92, 246, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.profile-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-id-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.profile-id-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    direction: ltr;
}

.profile-badges-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-plan-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.profile-plan-pill.is-vip {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(124, 58, 237, 0.35));
    border-color: rgba(139, 92, 246, 0.5);
    color: #d8b4fe;
    font-weight: 800;
}

.profile-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(124, 58, 237, 0.35));
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #d8b4fe;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}

.profile-upgrade-btn:active {
    transform: scale(0.96);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(124, 58, 237, 0.45));
}

.profile-balance-strip {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.balance-metric {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.balance-title {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.balance-digits-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.balance-count {
    font-size: 22px;
    font-weight: 900;
    color: #c084fc;
    line-height: 1;
}

.balance-unit {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.balance-rate-tag {
    font-size: 11px;
    font-weight: 700;
    color: rgba(254, 240, 138, 0.85);
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.25);
    padding: 3px 8px;
    border-radius: 8px;
}

/* 2. Rewards Grouped Card (Ultra Minimal & Compact) */
.rewards-grouped-card {
    background: linear-gradient(135deg, rgba(19, 22, 38, 0.88) 0%, rgba(14, 16, 28, 0.95) 100%);
    border: 1px solid #23283f;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.reward-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 10px;
    min-height: 52px;
    box-sizing: border-box;
    transition: background 0.15s ease;
}

.reward-compact-row + .reward-compact-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.reward-compact-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.reward-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.gift-theme {
    background: rgba(139, 92, 246, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.invite-theme {
    background: rgba(168, 85, 247, 0.14);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.reward-compact-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.reward-compact-text h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reward-compact-sub {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
    white-space: nowrap;
}

.reward-compact-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.compact-claim-btn {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 14px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap;
    width: auto !important;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.compact-claim-btn.is-claimed,
.compact-claim-btn:disabled {
    min-width: 86px;
    padding: 0 8px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #94a3b8 !important;
    opacity: 0.9;
}

.compact-claim-btn .timer-span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
}

.compact-claim-btn .timer-span svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    vertical-align: middle;
}

.invite-compact-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.compact-action-btn {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    box-sizing: border-box;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-copy-invite {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.btn-copy-invite:active {
    background: rgba(255, 255, 255, 0.15);
}

.btn-share-tg {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #ffffff;
}

.btn-share-tg:active {
    transform: scale(0.97);
}

.btn-share-tg svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.reward-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    margin: 0;
    vertical-align: middle;
}

.reward-pill.pink-theme {
    background: rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.38);
    color: #d8b4fe;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.reward-pill.blue-theme {
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.12);
}

.reward-pill.energy-theme {
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.btn-share-tg svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.btn-share-tg:active {
    transform: scale(0.97);
}

/* 3. Grouped Menu (Telegram / Apple Settings style) */
.more-grouped-menu {
    background: linear-gradient(135deg, rgba(19, 22, 38, 0.88) 0%, rgba(14, 16, 28, 0.95) 100%);
    border: 1px solid #23283f;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.menu-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    text-decoration: none;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.menu-list-item:last-child {
    border-bottom: none;
}

.menu-list-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.item-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.item-icon-box svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.item-icon-box svg [opacity=".5"] {
    opacity: 0.35;
}

.partner-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.16) 100%);
    border: 1px solid rgba(251, 191, 36, 0.55);
    color: #fde047;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.support-box {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.28) 0%, rgba(14, 165, 233, 0.16) 100%);
    border: 1px solid rgba(56, 189, 248, 0.55);
    color: #38bdf8;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}

.channel-box {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.28) 0%, rgba(147, 51, 234, 0.16) 100%);
    border: 1px solid rgba(192, 132, 252, 0.55);
    color: #c084fc;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.2);
}

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-content strong {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
}

.item-content small {
    font-size: 11.5px;
    color: var(--muted);
}

.item-chevron {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.15s ease, color 0.15s ease;
}

.menu-list-item:active .item-chevron {
    color: #ffffff;
    transform: translateX(3px);
}

.support-tile .tile-arrow {
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
}

/* Language Preference Card & Dropdown in More page */
.language-card {
    background: linear-gradient(135deg, rgba(19, 22, 38, 0.88) 0%, rgba(14, 16, 28, 0.95) 100%);
    border: 1px solid #23283f;
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.language-card-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    gap: 12px;
}

.language-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.language-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.3);
    flex-shrink: 0;
}

.language-card-left .language-info h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
}

/* Custom Language Dropdown */
.custom-dropdown {
    position: relative;
    flex-shrink: 0;
}

.custom-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 7px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.custom-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(56, 189, 248, 0.4);
}

.custom-dropdown-trigger[aria-expanded="true"] {
    background: rgba(56, 189, 248, 0.12);
    border-color: #38bdf8;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 19px;
    padding: 0 5px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(3, 105, 161, 0.3));
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 1;
    font-family: inherit;
    text-transform: uppercase;
    flex-shrink: 0;
}

.custom-dropdown-trigger .lang-current-label {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
}

.custom-dropdown-trigger .dropdown-chevron {
    color: #38bdf8;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.custom-dropdown-trigger[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    max-height: 290px;
    overflow-y: auto;
    background: rgba(20, 14, 28, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transform-origin: top right;
    animation: dropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownPop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-dropdown-menu.is-hidden {
    display: none !important;
}

.custom-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}
.custom-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

.custom-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.custom-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
}

.custom-dropdown-item.is-active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(139, 92, 246, 0.22));
    border-color: rgba(139, 92, 246, 0.45);
    color: #ffffff;
    font-weight: 700;
}

.custom-dropdown-item.is-active .lang-badge {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.dropdown-item-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.dropdown-item-name {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
}

.dropdown-item-native {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
}

.custom-dropdown-item.is-active .dropdown-item-native {
    color: rgba(255, 255, 255, 0.7);
}

.dropdown-item-check {
    color: #38bdf8;
    flex-shrink: 0;
}

[dir="rtl"] .custom-dropdown-menu {
    right: auto;
    left: 0;
    transform-origin: top left;
}

[dir="rtl"] .custom-dropdown-item {
    text-align: right;
}

.language-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-chips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 8px;
}

.lang-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    color: #f1f5f9;
    text-align: left;
    outline: none;
    user-select: none;
    position: relative;
}

.lang-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-chip:active {
    transform: scale(0.97);
}

.lang-chip.is-active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.28) 0%, rgba(56, 189, 248, 0.2) 100%);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.lang-flag {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.lang-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    line-height: 1.25;
}

.lang-primary-name {
    font-size: 12.5px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-chip.is-active .lang-primary-name {
    color: #7dd3fc;
}

.lang-native-name {
    font-size: 10.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-check-icon {
    font-size: 11px;
    font-weight: 900;
    color: #38bdf8;
    display: none;
    margin-left: auto;
}

.lang-chip.is-active .lang-check-icon {
    display: inline-block;
}

/* RTL Support for Arabic */
html[dir="rtl"],
body.is-rtl {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .item-chevron {
    transform: scaleX(-1);
}

html[dir="rtl"] .lang-check-icon {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .sheet-close-btn {
    left: 12px;
    right: auto;
}

/* =========================================================================
   Skeleton Screen with Shimmer Animation (YouTube-like loading effect)
   ========================================================================= */
@keyframes skeletonShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.skeleton-shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.05) 75%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: skeletonShimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
}

html[dir="rtl"] .skeleton-shimmer::after {
    animation-direction: reverse;
}

/* General Skeleton Bar */
.skeleton-bar {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
}

/* Character Card Skeleton */
.character-card.is-skeleton {
    pointer-events: none;
    cursor: default;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--surface-strong);
    display: block;
    width: 100%;
}

.character-card.is-skeleton .character-media {
    background: transparent;
    display: block;
    width: 100%;
}

.character-card.is-skeleton .skeleton-bar {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
}

.character-card.is-skeleton .skeleton-title {
    width: 70%;
    height: 18px;
    margin-bottom: 8px;
}

.character-card.is-skeleton .skeleton-desc-1 {
    width: 95%;
    height: 11px;
    margin-bottom: 5px;
    opacity: 0.7;
}

.character-card.is-skeleton .skeleton-desc-2 {
    width: 60%;
    height: 11px;
    opacity: 0.5;
}

/* Chat Item Skeleton */
.chat-item-skeleton {
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    background: #131626;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.chat-avatar-skeleton {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    flex-shrink: 0;
}

.chat-info-skeleton {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-title-skeleton {
    width: 45%;
    height: 16px;
    border-radius: 6px;
}

.chat-preview-skeleton {
    width: 85%;
    height: 12px;
    border-radius: 6px;
    opacity: 0.7;
}

/* Subscription Plan Card Skeleton */
.plan-card.is-skeleton {
    pointer-events: none;
    cursor: default;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--surface-strong);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 12px;
}

.plan-card.is-skeleton .skeleton-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
}

.plan-card.is-skeleton .plan-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-card.is-skeleton .skeleton-plan-title {
    width: 48%;
    height: 16px;
    border-radius: 6px;
}

.plan-card.is-skeleton .skeleton-plan-pill {
    width: 32%;
    height: 12px;
    border-radius: 6px;
    opacity: 0.7;
}

.plan-card.is-skeleton .skeleton-plan-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.plan-card.is-skeleton .skeleton-price-num {
    width: 60px;
    height: 20px;
    border-radius: 6px;
}

/* Premium Features Card Skeleton */
.premium-features-card.is-skeleton {
    pointer-events: none;
    display: grid;
    gap: 12px;
    border-radius: 18px;
    padding: 16px 18px;
    background: var(--surface-strong);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.premium-features-card.is-skeleton .features-badge-wrap {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.premium-features-card.is-skeleton .skeleton-vip-title {
    width: 45%;
    height: 16px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.premium-features-card.is-skeleton .skeleton-vip-sub {
    width: 70%;
    height: 12px;
    border-radius: 6px;
    opacity: 0.7;
}

.premium-features-card.is-skeleton .skeleton-vip-item {
    width: 90%;
    height: 14px;
    border-radius: 6px;
    opacity: 0.7;
}

/* More Page - Current Subscription / Token Balance Card Skeleton */
.subscription-current-card.is-skeleton {
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface-strong);
    padding: 18px 20px;
    border-radius: 20px;
    box-shadow: none;
}

.subscription-current-card.is-skeleton .token-coin-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
    border: none;
}

.subscription-current-card.is-skeleton .skeleton-more-label {
    width: 38%;
    height: 13px;
    border-radius: 6px;
    margin-bottom: 8px;
    opacity: 0.6;
}

.subscription-current-card.is-skeleton .skeleton-more-val {
    width: 60%;
    height: 24px;
    border-radius: 8px;
}

.subscription-current-card.is-skeleton .skeleton-more-badge {
    width: 80px;
    height: 32px;
    border-radius: 12px;
}

.skeleton-vault-shimmer {
    display: inline-block;
    width: 28px;
    height: 14px;
    border-radius: 4px;
    vertical-align: middle;
}




/* ========================================================================== */
/* MODERN STORE THEME: ENERGY & DIAMONDS VIEWS (MATCHES SCREENSHOTS)        */
/* ========================================================================== */

.subscription-page.modern-store-theme {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 540px;
    min-width: 0;
    margin: 0 auto;
    padding: 8px 4px 20px 4px;
    box-sizing: border-box;
    overflow-x: visible;
}

/* View Switcher: Segmented Tabs (Energy vs Diamonds) */
.store-view-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #131627;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    padding: 4px;
    margin-bottom: 18px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.store-tab-btn {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    border: none;
    border-radius: 22px;
    background: transparent;
    color: #94a3b8;
    font-size: clamp(12px, 3.4vw, 14px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
}

.store-tab-btn .tab-icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.store-tab-btn .tab-icon img,
.store-tab-btn .tab-icon svg,
.store-tab-svg {
    width: 17px;
    height: 17px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.store-tab-btn span:not(.tab-icon) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-tab-btn.is-active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.4);
}

.store-tab-btn:not(.is-active):hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.04);
}

/* Store View Sections */
.store-view-section {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: visible;
    animation: storeFadeIn 0.25s ease-out;
}

.store-view-section[data-view-pane="energy"] {
    padding-bottom: calc(175px + env(safe-area-inset-bottom));
}

.store-view-section[data-view-pane="diamonds"] {
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
}

.store-view-section.is-hidden {
    display: none !important;
}

@keyframes storeFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------------------------------------------------------------- */
/* VIEW 1: HORIZONTAL PLAN CARDS (ISOLATED CAROUSEL)                         */
/* -------------------------------------------------------------------------- */
.horizontal-plans-scroller-wrap {
    margin-left: -18px;
    margin-right: -18px;
    width: calc(100% + 36px);
    max-width: calc(100% + 36px);
    overflow-x: auto;
    overflow-y: hidden;
    container-type: inline-size;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    touch-action: pan-x;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 18px;
    scrollbar-width: none;
    padding-top: 14px; /* Room for floating top pill */
    padding-bottom: 14px;
    margin-bottom: 14px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

.horizontal-plans-scroller-wrap.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto !important;
    scroll-snap-type: none;
}

.horizontal-plans-scroller-wrap::-webkit-scrollbar {
    display: none;
}

.horizontal-plans-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 0 18px;
    min-width: min-content;
    width: max-content;
    box-sizing: border-box;
}

.horiz-plan-card {
    scroll-snap-align: start;
    flex: 0 0 clamp(100px, 28vw, 114px);
    width: clamp(100px, 28vw, 114px);
    min-width: 98px;
    max-width: 114px;
    height: clamp(102px, 28vw, 110px);
    min-height: 102px;
    max-height: 110px;
    background: #171a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 10px 10px 9px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    direction: ltr;
    position: relative;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.horiz-plan-card:hover {
    transform: translateY(-2px);
    border-color: rgba(133, 107, 255, 0.5);
}

.horiz-plan-card.is-selected {
    border: 2px solid #856bff;
    box-shadow: 0 0 16px rgba(133, 107, 255, 0.45);
    background: #242038;
    transform: translateY(-2px);
}

/* Floating "Most Popular" Pill */
.plan-popular-pill {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #4a3d8b;
    border: 1px solid rgba(133, 107, 255, 0.55);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
    letter-spacing: 0.1px;
    pointer-events: none;
}

/* Corner Discount Ribbon - Bottom-Right Wrapped Ribbon */
.plan-corner-ribbon-wrap {
    position: absolute;
    bottom: 0;
    right: 0;
    left: auto;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-bottom-right-radius: 17px;
    pointer-events: none;
    z-index: 2;
}

.plan-discount-ribbon {
    position: absolute;
    bottom: 6px;
    right: -21px;
    left: auto;
    width: 62px;
    height: 16px;
    background: #eb366c;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-45deg);
    letter-spacing: 0.2px;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    direction: ltr;
}

.plan-card-body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    text-align: left;
    direction: ltr;
    box-sizing: border-box;
}

.plan-top-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 2px;
}

.plan-duration-title {
    font-size: clamp(13px, 3.6vw, 14.5px);
    font-weight: 700;
    color: #9ca3af;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: left;
    direction: ltr;
    letter-spacing: -0.15px;
    transition: color 0.18s ease;
}

.plan-diamonds-bonus {
    font-size: clamp(13px, 3.6vw, 14.5px);
    font-weight: 900;
    color: #d1d5db;
    margin: 0;
    text-align: left;
    direction: ltr;
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
    letter-spacing: -0.2px;
    transition: color 0.18s ease;
}

.horiz-plan-card.is-selected .plan-duration-title {
    font-weight: 800;
    color: #bcaef9;
}

.horiz-plan-card.is-selected .plan-diamonds-bonus {
    font-weight: 900;
    color: #c4b8ff;
}

.plan-diamonds-bonus.is-empty {
    visibility: hidden;
    height: 17px;
    margin: 0;
}

.plan-stars-price {
    font-size: clamp(17px, 4.8vw, 19.5px);
    font-weight: 900;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin-top: auto;
    text-align: left;
    direction: ltr;
    line-height: 1;
    letter-spacing: -0.3px;
}

.plan-stars-price .tg-star-icon {
    width: 17px;
    height: 17px;
    vertical-align: middle;
}

/* -------------------------------------------------------------------------- */
/* VIEW 1: VIP PERKS LIST (SCREENSHOT 1)                                     */
/* -------------------------------------------------------------------------- */
.vip-perks-list-card {
    background: #131626;
    border: 1px solid #23283f;
    border-radius: 20px;
    padding: 14px 16px;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.vip-perk-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vip-perk-row:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}

.vip-perk-row:first-child {
    padding-top: 2px;
}

.perk-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #1c2137;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.perk-icon-circle img,
.perk-lightning-svg {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

.perk-text-col {
    flex: 1;
    min-width: 0;
}

.perk-text-col h4 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.perk-text-col p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.35;
}

/* -------------------------------------------------------------------------- */
/* VIEW 1: SUMMARY BOX & BIG CTA BUTTON                                      */
/* -------------------------------------------------------------------------- */
.energy-checkout-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.your-choice-box {
    pointer-events: auto;
    background: rgba(19, 22, 38, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(139, 92, 246, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.your-choice-box:hover {
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55), 0 0 20px rgba(139, 92, 246, 0.22);
}

.choice-heading {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #a78bfa;
    margin-bottom: 3px;
}

.choice-selected-desc {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
}

.choice-selected-price {
    font-size: 19px;
    font-weight: 900;
    color: #ffffff;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.get-premium-cta-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    border: none;
    border-radius: 16px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.get-premium-cta-btn:active {
    transform: scale(0.985);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.get-premium-cta-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.secure-footer-note {
    text-align: center;
    font-size: 12.5px;
    color: #64748b;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.secure-footer-note .info-circle-icon {
    font-size: 14px;
    line-height: 1;
    color: #94a3b8;
}

/* -------------------------------------------------------------------------- */
/* VIEW 2: DIAMONDS PURCHASE GRID (SCREENSHOT 2)                             */
/* -------------------------------------------------------------------------- */
.gems-hero-banner {
    background: linear-gradient(135deg, rgba(26, 24, 46, 0.95) 0%, rgba(18, 18, 34, 0.95) 100%);
    border: 1px solid rgba(192, 132, 252, 0.55);
    border-radius: 22px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(124, 58, 237, 0.12);
    direction: ltr;
    text-align: left;
}

.hero-chest-visual {
    flex-shrink: 0;
    width: 125px;
    min-width: 125px;
    height: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Radiant Pale Yellow / Golden Halo behind Chest */
.hero-chest-visual::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 135px;
    height: 135px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(254, 240, 138, 0.35) 0%,
        rgba(250, 204, 21, 0.18) 35%,
        rgba(245, 158, 11, 0.06) 60%,
        transparent 75%
    );
    filter: blur(18px);
    pointer-events: none;
    z-index: 0;
}

.hero-chest-img {
    width: 120px;
    height: 120px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 14px rgba(245, 158, 11, 0.2));
    transition: transform 0.25s ease;
}

.gems-hero-banner:hover .hero-chest-img {
    transform: scale(1.04);
}

.hero-chest-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.hero-chest-content h3 {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.hero-chest-content p {
    font-size: 13px;
    font-weight: 500;
    color: #8f9db3;
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.hero-chest-cta {
    background: rgba(30, 27, 54, 0.65);
    border: 1px solid rgba(216, 180, 254, 0.65);
    backdrop-filter: blur(8px);
    border-radius: 13px;
    padding: 9px 18px;
    color: #e9d5ff;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: all 0.2s ease;
}

.hero-chest-cta:hover,
.hero-chest-cta:focus-visible {
    background: rgba(147, 51, 234, 0.28);
    border-color: rgba(233, 213, 255, 0.9);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.hero-chest-cta:active {
    transform: scale(0.97);
}

@media (max-width: 360px) {
    .gems-hero-banner {
        padding: 12px 14px;
        gap: 12px;
    }
    .hero-chest-visual {
        width: 105px;
        min-width: 105px;
        height: 105px;
    }
    .hero-chest-img {
        width: 100px;
        height: 100px;
    }
    .hero-chest-content h3 {
        font-size: 17px;
    }
    .hero-chest-content p {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .hero-chest-cta {
        font-size: 13.5px;
        padding: 8px 14px;
    }
}

/* 3-Column Diamonds Packages Grid */
.gems-packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 340px) {
    .gems-packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gem-pack-card {
    background: #191728;
    border: 1.5px solid #2a2640;
    border-radius: 18px;
    padding: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    position: relative;
    min-height: 175px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.gem-pack-card:hover {
    transform: translateY(-2px);
    border-color: rgba(140, 108, 245, 0.5);
}

.gem-pack-card.is-featured {
    border: 2px solid #8c6cf5;
    box-shadow: 0 0 18px rgba(140, 108, 245, 0.45);
    background: radial-gradient(circle at 50% 35%, rgba(140, 108, 245, 0.22) 0%, #1c192d 80%);
    transform: translateY(-2px);
}

/* "Best Offer" Top Pill Badge */
.gem-badge-pill {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #6c2eb9;
    border: 1px solid rgba(168, 130, 255, 0.5);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    white-space: nowrap;
    box-shadow: 0 0 12px rgba(140, 108, 245, 0.6);
    z-index: 2;
    letter-spacing: -0.1px;
}

.gem-card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 8px 12px 8px;
    flex: 1;
    justify-content: center;
}

.gem-art-wrap {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    margin-bottom: 6px;
    position: relative;
}

.gem-art-wrap::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 105, 195, 0.36) 0%, rgba(95, 75, 160, 0.2) 42%, rgba(65, 50, 120, 0.06) 65%, transparent 75%);
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
    transition: transform 0.25s ease, background 0.25s ease;
}

.gem-pack-card:hover .gem-art-wrap::before {
    transform: translate(-50%, -50%) scale(1.15);
    background: radial-gradient(circle, rgba(145, 120, 215, 0.45) 0%, rgba(110, 85, 180, 0.28) 45%, rgba(75, 55, 135, 0.08) 68%, transparent 78%);
}

.gem-art-img {
    width: 68px;
    height: 68px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
    transition: transform 0.2s ease;
}

.gem-pack-card:hover .gem-art-img {
    transform: scale(1.06);
}

.gem-count-label {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

/* Seamless Bottom Price Bar / Footer */
.gem-price-btn {
    width: 100%;
    height: 42px;
    border-radius: 0 0 16px 16px;
    border: none;
    border-top: 1px solid #28243d;
    background: #151322;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    margin: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
    letter-spacing: -0.2px;
    direction: ltr;
}

.gem-pack-card.is-featured .gem-price-btn {
    border-top: 1px solid rgba(140, 108, 245, 0.35);
    background: #181528;
}

.gem-price-btn:hover {
    background: #231f38;
}

.gem-price-btn .tg-star-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    display: inline-block;
}

/* Skeletons for Modern Store */
.horiz-plan-card.is-skeleton,
.gem-pack-card.is-skeleton {
    pointer-events: none;
    opacity: 0.7;
}

.skeleton-card-title {
    width: 70%;
    height: 16px;
    border-radius: 4px;
    margin: 4px auto 8px auto;
}

.skeleton-card-diamond {
    width: 60%;
    height: 14px;
    border-radius: 4px;
    margin: 4px auto 10px auto;
}

.skeleton-card-price {
    width: 80%;
    height: 16px;
    border-radius: 4px;
    margin: 4px auto 0 auto;
}

.skeleton-gem-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    margin: 4px auto 8px auto;
}

.skeleton-gem-title {
    width: 70%;
    height: 14px;
    border-radius: 4px;
    margin: 0 auto 10px auto;
}

.skeleton-gem-price {
    width: 100%;
    height: 42px;
    border-radius: 0 0 16px 16px;
    margin: 0;
}

/* ========================================================================== */
/* UNIVERSAL APP HEADER (PERSISTENT ON ALL TABS: TITLE + ENERGY/DIAMONDS PILL)*/
/* ========================================================================== */

.webapp-top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 2px 10px 2px;
    box-sizing: border-box;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 45;
    gap: 8px;
}

/* Edge-to-edge frosted glass backdrop for sticky top header */
.webapp-top-header::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: rgba(7, 8, 12, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    z-index: -1;
    pointer-events: none;
}

.header-left {
    flex: 1 1 auto;
    min-width: 0;
}

.header-page-title {
    font-size: clamp(20px, 5.5vw, 28px);
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-right {
    flex: 0 0 auto;
    margin-left: 0;
}

/* User Currency Pill: ⚡ Energy  💎 Diamonds  (+) */
.user-currency-pill {
    display: inline-flex;
    align-items: center;
    position: relative;
    user-select: none;
    direction: ltr !important;
    vertical-align: middle;
}

.currency-values-box {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 13px 0 13px;
    background: #151624;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    gap: 13px;
    position: relative;
    z-index: 2;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.currency-values-box:hover {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 10px rgba(139, 92, 246, 0.2);
}

.currency-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    line-height: 1;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.currency-item:active {
    transform: scale(0.93);
    opacity: 0.75;
}

.currency-item .currency-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    font-size: 14.5px;
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
}

.currency-item .currency-icon img,
.currency-item .currency-icon svg,
.currency-svg-icon {
    width: 17px;
    height: 17px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    pointer-events: none;
}

.currency-item.currency-energy .energy-icon {
    font-size: 15px;
    color: #f59e0b;
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.45));
}

.currency-item.currency-diamonds .diamond-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.45));
}

.currency-val {
    font-size: 14.5px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.2px;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
}

/* Integrated Plus Segment Button on Right End of Pill */
.currency-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    width: 44px;
    margin-left: -14px;
    padding: 0 0 0 14px;
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    border-radius: 0 999px 999px 0;
    color: #ffffff;
    cursor: pointer;
    position: relative;
    z-index: 1;
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.35);
    box-sizing: border-box;
    transition: opacity 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.currency-add-btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5);
}

.currency-add-btn:active {
    opacity: 0.82;
    filter: brightness(1.22);
}

.currency-add-btn .plus-icon-svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    stroke-width: 2.6;
    display: block;
    margin: 0 auto;
}

/* Hide redundant top bar in more.html */
.more-page-topbar {
    display: none !important;
}

/* RTL Adjustments */
html[dir="rtl"] .webapp-top-header {
    text-align: right;
}

html[dir="rtl"] .header-right {
    margin-left: 0;
    margin-right: 12px;
}

/* ==========================================================================
   UI-UX PRO DESIGN SYSTEM ENHANCEMENTS & REFINEMENTS
   Adheres to Universal UI/UX Pro Design System (Linear/Vercel/Apple HIG standards)
   Zero functionality impact - Visual hierarchy, micro-interactions, surfaces & typography
   ========================================================================== */

/* 1. Global Reset & Apple Fluid Micro-interactions */
button,
a[role="button"],
.character-card,
.chat-history-item,
.store-tab-btn,
.style-switch-btn,
.currency-item,
.bottom-nav-item,
.horiz-plan-card,
.gem-pack-card,
.compact-action-btn,
.compact-claim-btn,
.claim-daily-btn,
.buy-subscription-button,
.menu-list-item {
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation;
}

button:active,
a[role="button"]:active,
.style-switch-btn:active,
.store-tab-btn:active,
.compact-action-btn:active,
.compact-claim-btn:active,
.claim-daily-btn:active,
.gem-pack-card:active,
.horiz-plan-card:active {
    transform: scale(0.975) !important;
    transition: transform 0.15s cubic-bezier(0.32, 0.72, 0, 1) !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px #8b5cf6, 0 0 0 4px rgba(11, 13, 25, 0.85) !important;
}

/* 2. Universal Top Header Polish */
.webapp-top-header {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px 14px;
    gap: 12px;
    background: transparent;
}

.webapp-top-header::before {
    background: rgba(8, 9, 17, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-page-title {
    font-size: clamp(20px, 5.2vw, 25px);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #ffffff;
}

/* Refined Currency Pill */
.user-currency-pill {
    height: 36px;
    align-items: center;
}

.currency-values-box {
    height: 36px;
    padding: 0 14px;
    background: #14172a;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 9999px;
    gap: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.currency-values-box:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 10px rgba(139, 92, 246, 0.18);
}

.currency-item {
    gap: 6px;
}

.currency-item:active {
    transform: scale(0.97) !important;
    opacity: 0.85;
}

.currency-val {
    font-size: 14px;
    font-weight: 750;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.currency-add-btn {
    height: 36px;
    width: 40px;
    margin-left: -14px;
    padding: 0 0 0 13px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: none;
    border-radius: 0 9999px 9999px 0;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}

.currency-add-btn:active {
    transform: scale(0.97) !important;
    filter: brightness(1.15);
}

/* 3. Bottom Navigation Bar - Apple Squircle & Concentric Curve (24px outer - 6px pad = 18px inner) */
.bottom-nav {
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(540px, calc(100% - 20px));
    padding: 6px;
    gap: 4px;
    background: rgba(15, 18, 33, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.bottom-nav-item {
    padding: 7px 4px 6px;
    border-radius: 18px;
    gap: 3px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #94a3b8;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    transition: color 0.16s cubic-bezier(0.32, 0.72, 0, 1), background 0.16s cubic-bezier(0.32, 0.72, 0, 1), transform 0.12s cubic-bezier(0.32, 0.72, 0, 1);
}

.bottom-nav-item:active {
    transform: scale(0.96) translateZ(0) !important;
}

.bottom-nav-item.is-active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.4);
}

/* 4. Filter Panel & Search & Style Switcher (16px outer - 4px pad = 12px inner) */
.filter-panel {
    gap: 10px;
    padding: 4px 0 12px;
}

.search-field {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(19, 22, 38, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 0 14px;
    gap: 8px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-field:focus-within {
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15), 0 4px 16px rgba(0, 0, 0, 0.25);
}

.search-field input {
    font-size: 14.5px;
    font-weight: 500;
    color: #f8fafc;
}

.search-field input::placeholder {
    color: #64748b;
    font-size: 14px;
}

.style-switcher {
    min-height: 48px;
    padding: 4px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(19, 22, 38, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    gap: 4px;
}

.style-switch-btn {
    min-height: 40px;
    min-width: 68px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.18s cubic-bezier(0.32, 0.72, 0, 1);
}

@media (max-width: 380px) {
    .filter-panel {
        grid-template-columns: 1fr;
    }
    .style-switcher {
        width: 100%;
    }
}

.style-switch-btn.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 5. Character Cards & Grid (iOS Squircle Corner 22px) */
.characters-grid {
    gap: 12px;
}

.character-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: #131627;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.18s ease, border-color 0.18s ease;
}

.character-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 14px rgba(139, 92, 246, 0.16);
}

.character-card:active {
    transform: scale(0.98) !important;
}

.character-media {
    background: #111322;
    border-radius: inherit;
}

.character-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(
        180deg,
        rgba(10, 12, 22, 0) 0%,
        rgba(10, 12, 22, 0.01) 35%,
        rgba(10, 12, 22, 0.08) 50%,
        rgba(10, 12, 22, 0.25) 62%,
        rgba(10, 12, 22, 0.52) 74%,
        rgba(10, 12, 22, 0.82) 86%,
        rgba(10, 12, 22, 0.96) 96%,
        rgba(10, 12, 22, 0.98) 100%
    );
    padding: 16px 12px 12px;
    gap: 3px;
    box-sizing: border-box;
    pointer-events: none;
    border-radius: inherit;
}

.character-overlay h2 {
    font-size: 15px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.character-description {
    font-size: 12px;
    font-weight: 450;
    line-height: 1.4;
    color: rgba(248, 237, 245, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

/* 6. Chat History Polish (20px outer - 12px pad -> 14px inner avatar) */
.chat-history-list {
    gap: 10px;
}

.chat-history-item {
    padding: 12px 14px;
    border-radius: 20px;
    background: #131627;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    gap: 12px;
    transition: transform 0.16s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.16s ease, box-shadow 0.16s ease;
}

.chat-history-item:hover {
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 0 12px rgba(168, 85, 247, 0.15);
    transform: translateY(-1.5px);
}

.chat-history-item:active {
    transform: scale(0.98) !important;
}

.chat-avatar {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    border: 1px solid rgba(139, 92, 246, 0.22);
}

.chat-history-topline h2 {
    font-size: 16px;
    font-weight: 750;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.chat-history-content p {
    font-size: 13.5px;
    line-height: 1.4;
    color: #94a3b8;
}

.chat-history-meta time {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.active-chat-badge {
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.28);
}

/* UI-UX Pro Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #131627;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    gap: 14px;
}

.empty-state p {
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
    max-width: 300px;
}

.empty-state a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.16s cubic-bezier(0.32, 0.72, 0, 1), filter 0.16s ease;
}

.empty-state a:hover {
    filter: brightness(1.1);
}

.empty-state a:active {
    transform: scale(0.975) !important;
}

/* 7. Modern Store View & Concentric Tabs (18px outer - 4px pad = 14px inner) */
.store-view-switcher {
    border-radius: 18px;
    background: #131627;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.store-tab-btn {
    border-radius: 14px;
    min-height: 40px;
    font-size: 13.5px;
    font-weight: 700;
    color: #94a3b8;
}

.store-tab-btn.is-active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}

.horiz-plan-card {
    border-radius: 18px;
    background: #171a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.horiz-plan-card:hover {
    border-color: rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
}

.horiz-plan-card.is-selected {
    border: 2px solid #8b5cf6;
    background: #1f1c36;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
    transform: translateY(-2px);
}

.vip-perks-list-card {
    background: #131627;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.vip-perk-row {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.perk-icon-circle {
    border-radius: 12px;
}

.gem-pack-card {
    border-radius: 20px;
    background: #171a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.gem-pack-card:hover {
    border-color: rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
}

/* Floating Action Bar with Glassmorphic Choice Box */
.subscription-floating-bar {
    bottom: calc(86px + env(safe-area-inset-bottom));
}

.your-choice-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(139, 92, 246, 0.08) 45%, rgba(15, 18, 38, 0.65) 100%), rgba(11, 14, 28, 0.62) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.32) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 0 20px rgba(139, 92, 246, 0.15) !important;
    backdrop-filter: blur(24px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
    padding: 13px 18px !important;
    transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1) !important;
}

.your-choice-box:hover {
    border-color: rgba(168, 85, 247, 0.45) !important;
    border-top-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 0 24px rgba(139, 92, 246, 0.25) !important;
}

.choice-heading {
    color: #c4b5fd !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.9px !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    margin-bottom: 2px !important;
}

.choice-selected-desc {
    color: #ffffff !important;
    font-size: 14.5px !important;
    font-weight: 750 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75) !important;
}

.choice-selected-price {
    color: #ffffff !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

.buy-subscription-button {
    min-height: 50px;
    border-radius: 16px;
    font-size: 15.5px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transition: filter 0.15s ease, box-shadow 0.15s ease;
    animation: none !important;
    transform: none !important;
}

/* 8. More / Account Hub Polish (Apple Grouped Inset Style) */
.subscription-current-card {
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, #16192d 0%, #101324 100%);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.token-coin-icon-box {
    border-radius: 14px;
}

.rewards-grouped-card,
.more-grouped-menu,
.language-card {
    background: #131627;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.reward-icon-badge {
    border-radius: 12px;
}

.reward-compact-row {
    padding: 12px 14px;
    min-height: 52px;
}

.reward-compact-row + .reward-compact-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.compact-action-btn,
.compact-claim-btn {
    border-radius: 10px;
    min-height: 34px;
    font-size: 12.5px;
    font-weight: 700;
}

.menu-list-item {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.item-icon-box {
    border-radius: 12px;
}

.menu-list-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.menu-list-item:active {
    background: rgba(255, 255, 255, 0.06);
}

.language-icon-box,
.custom-dropdown-trigger {
    border-radius: 12px;
}

/* 9. Bottom Sheets & Modals (iOS Action Sheet 28px top curvature) */
.webapp-modal-sheet {
    border-radius: 28px 28px 0 0;
    background: #131626;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.55);
}

.sheet-drag-handle {
    width: 36px;
    height: 5px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.25);
    margin: 0 auto 16px auto;
}

.chat-btn-primary,
.chat-btn-reset,
.chat-btn-danger,
.chat-btn-ghost,
.daily-gift-sheet-body .claim-daily-btn {
    border-radius: 16px;
    min-height: 48px;
    font-size: 14.5px;
    font-weight: 700;
    transition: transform 0.15s cubic-bezier(0.32, 0.72, 0, 1), filter 0.15s ease;
}



/* Secondary Showcase Discovery Banner -> Opens Main Bot Mini App */
.showcase-main-app-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 15px;
    margin-bottom: 12px;
    border-radius: 18px;
    border: 1px solid rgba(236, 72, 153, 0.42);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.26) 0%, rgba(236, 72, 153, 0.2) 55%, rgba(20, 24, 46, 0.92) 100%);
    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.16s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.showcase-main-app-banner:hover {
    border-color: rgba(244, 114, 182, 0.68);
    box-shadow: 0 10px 28px rgba(236, 72, 153, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.showcase-main-app-banner:active {
    transform: scale(0.985);
}

.showcase-main-banner-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 12% 50%, rgba(244, 114, 182, 0.22), transparent 55%);
    pointer-events: none;
}

.showcase-main-banner-icon {
    position: relative;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.32), rgba(139, 92, 246, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.28);
}

.showcase-main-banner-thumb {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(15, 23, 42, 0.94));
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.32);
}

.showcase-main-banner-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.showcase-main-banner-copy {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.showcase-main-banner-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.showcase-main-banner-subtitle {
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(226, 232, 240, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-main-banner-cta {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

body.is-rtl .showcase-main-app-banner {
    text-align: right;
}

body.is-rtl .showcase-main-banner-arrow {
    display: inline-block;
    transform: scaleX(-1);
}
