:root {
    --bg-color: #FFFFFF;
    --text-color: #1E293B;
    --card-bg: rgba(255,255,255,0.92);
    --border-color: rgba(139, 92, 246, 0.25);
    --primary: #8B5CF6;
    --primary-glow: rgba(139, 92, 246, 0.25);
    --accent: #A855F7;
    --accent2: #6366F1;
    --danger: #EF4444;
}

body {
    background: #F3F4F6;
    background-attachment: fixed;
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

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

html, body {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y;
}

.background-glow {
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.container { padding: 12px 12px 40px 12px; max-width: 600px; margin: 0 auto; }

/* TABS BOTTOM NAV */
.tabs-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px 6px 8px 6px; /* Push buttons lower */
    box-shadow: 0 -10px 30px rgba(139, 92, 246, 0.15);
    z-index: 1000;
    box-sizing: border-box;
}
body.no-nav .tabs-container { display: none; }

.tabs-container::-webkit-scrollbar { display: none; } /* Hide scrollbar */

.tab-btn {
    box-sizing: border-box;
    min-width: 0;
    background: transparent;
    border: none;
    color: #000000;
    padding: 8px 2px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: normal; /* critical: buttons default to pre in WebKit -> no wrap -> overlap */
    overflow-wrap: anywhere;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
}
.tab-btn svg { display: block; }
.tab-btn.active .tab-label {
    display: block;
}
.tab-btn.active .tab-label::after {
    content: '';
    display: block;
    width: calc(100% - 8px);
    height: 2px;
    border-radius: 2px;
    background: #000000;
    margin: 3px auto 0;
}
@keyframes tabBounce {
    0% { transform: translateY(0); }
    40% { transform: translateY(-7px); }
    70% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}
.tab-btn:active svg {
    animation: tabBounce 0.35s ease;
}
.tab-btn svg { display: block; }

.tab-btn.active {
    background: transparent;
    color: #000000;
    border: none;
    box-shadow: none;
    transform: translateY(-2px);
}
.tab-btn.active::after {
    display: none;
}
.tab-label {
    display: none;
    font-size: 10px;
    font-weight: 600;
    color: #000000;
    margin-top: 3px;
    line-height: 1;
}
.tab-btn.active .tab-label {
    display: block;
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 12px rgba(139, 92, 246, 0.5); transform: translateY(-2px) scale(1); }
    50% { box-shadow: 0 0 28px rgba(168, 85, 247, 0.55); transform: translateY(-2px) scale(1.03); }
    100% { box-shadow: 0 0 12px rgba(139, 92, 246, 0.5); transform: translateY(-2px) scale(1); }
}

.tab-content { display: none; animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); padding-bottom: 160px; }
.tab-content.active { display: flex; flex-direction: column; gap: 12px; }

/* Referral tab: opaque cards so no see-through "overlap" between stacked cards
   (some WebViews skip backdrop-filter and 4%-white glass looks transparent) */
#tab-referral .glass-panel { background: rgba(255,255,255,0.95); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.12), inset 0 1px 0 rgba(255,255,255,0.7);
    padding: 18px;
}

.tab-content.flip-in {
    animation: pageFlip 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes pageFlip {
    0% { transform: translateX(55px); opacity: 0.4; }
    60% { transform: translateX(-7px); opacity: 1; }
    100% { transform: translateX(0); opacity: 1; }
}

#tab-payment.tab-content { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: 1000; }
#tab-payment.tab-content.active { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.pay-sheet-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; background: transparent; z-index: 1000; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 4px; }
.setup-app-btn {
    width: 100%;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.setup-app-btn.selected {
    border: 2px solid #000000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.setup-app-title { font-size: 18px; font-weight: 700; color: #000000; }
.setup-app-sub { font-size: 13px; font-weight: 500; color: #64748B; line-height: 1.3; }

.setup-step {
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 16px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.setup-step-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.setup-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0) 70%), #000000;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}
.setup-step-title { font-size: 17px; font-weight: 700; color: #000000; }
.setup-step-desc { font-size: 14px; font-weight: 500; color: #64748B; margin: 0 0 12px; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
.device-chip {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    text-align: center;
}
.device-chip:active { background: #F1F5F9; }
.setup-note { font-size: 13px; color: #64748B; margin: 8px 0 12px; line-height: 1.35; }

.download-row { display: flex; flex-direction: column; gap: 8px; }
.setup-add-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.setup-add-btn:active { transform: scale(0.97); }
.setup-manual-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #64748B;
    font-weight: 500;
    margin: 10px 0 0;
    cursor: pointer;
    user-select: none;
}
.setup-manual-arrow { display: inline-flex; line-height: 1; transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.setup-manual-toggle.open .setup-manual-arrow { transform: rotate(-90deg); }
.setup-manual { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 10px; }
.setup-manual-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.setup-link-field {
    flex: 1;
    background: #F1F5F9;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 12px;
    color: #1E293B;
    word-break: break-all;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.25);
}
.setup-copy-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.setup-copy-btn:active { transform: scale(0.94); }
.setup-sub-link-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 14px;
    padding: 12px;
    color: #000000;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.setup-sub-link-btn:active { transform: scale(0.97); }
.setup-qr-hint { font-size: 12px; color: #64748B; text-align: center; line-height: 1.45; margin: 10px 0 0; }
.setup-qr { display: flex; justify-content: center; margin-top: 10px; }
.setup-qr img { width: 170px; height: 170px; border-radius: 12px; background: #FFFFFF; }
.download-btn {
    flex: 1;
    background: #F8FAFC;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #000000;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.download-btn:active { background: #F1F5F9; }

.device-select { position: relative; margin-bottom: 12px; }
.device-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    border: none;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.device-select-arrow { font-size: 12px; color: #64748B; }
.device-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: none;
    z-index: 10;
    overflow: hidden;
}
.device-list.open { display: block; }
.device-option {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #000000;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}
.device-option:active { background: #F1F5F9; }
.pay-sheet {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 10px 18px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: sheetUp 0.35s cubic-bezier(0.32, 0.72, 0, 1) both;
    box-sizing: border-box;
    z-index: 1001;
}
@keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.pay-sheet-grabber { width: 40px; height: 4px; border-radius: 2px; background: #E2E8F0; margin: 0 auto 12px; }
.pay-sheet-header { display: flex; align-items: center; justify-content: space-between; }
.pay-sheet-title { font-size: 22px; font-weight: 800; color: #000000; }
.pay-sheet-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #64748B;
    border: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.pay-sheet-sub { font-size: 15px; font-weight: 500; color: #64748B; margin: 6px 0 18px; }
.pay-sheet-sub b { color: #000000; font-weight: 700; }
.pay-method {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
}
.pay-method:active { background: #F8FAFC; }
.pay-method-text { font-size: 16px; font-weight: 600; color: #000000; flex: 1; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.pay-method-title { font-size: 16px; font-weight: 700; color: #000000; }
.pay-method-sub { font-size: 13px; font-weight: 500; color: #64748B; }
.pay-method-arrow { font-size: 22px; color: #94A3B8; }

/* Header */
.header h1.title { font-size: 20px !important; }

/* Animated gradient title */
.pomelo-title {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 auto;
    color: #000000;
    position: relative;
}
.pomelo-title::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%, transparent 16%,
        rgba(139, 92, 246, 0.48) 21%, rgba(168, 85, 247, 0.95) 24%, rgba(139, 92, 246, 0.48) 27%,
        transparent 33%, transparent 67%,
        rgba(139, 92, 246, 0.48) 73%, rgba(168, 85, 247, 0.95) 76%, rgba(139, 92, 246, 0.48) 79%,
        transparent 84%, transparent 100%);
    background-size: 145% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: pomeloFlow 9s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pomeloFlow {
    0% { background-position: 130% 0; }
    100% { background-position: -130% 0; }
}

/* Subscription status button */
.sub-status-btn {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: #FFFFFF;
    border: none;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.15);
    border-radius: 14px;
    padding: 18px 56px 30px 12px;
    pointer-events: none;
    user-select: none;
    margin-bottom: 8px;
}
.sub-status-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.sub-status-left { display: flex; align-items: center; gap: 8px; }
.sub-status-shield { font-size: 27px; display: flex; }
.sub-status-shield svg { width: 24px; height: 24px; }
.sub-status-title { font-size: 15px; font-weight: 600; color: #64748B; }
.sub-status-sub { font-size: 16px; color: #000000; font-weight: 600; }
.sub-status-days { font-size: 12px; color: #EF4444; font-weight: 700; margin-top: 2px; }
.sub-status-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 6px; }
.sub-chip {
    background: #F1F5F9;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #64748B;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sub-status-pomelo {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 104px;
    height: 104px;
    filter: drop-shadow(0 4px 10px rgba(139, 92, 246, 0.4));
}

/* Store action buttons */
.btn-pay-sub {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.btn-pay-sub svg { flex-shrink: 0; }
.btn-pay-sub:active { transform: scale(0.97); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); }
.btn-pay-sub:disabled {
    background: #CBD5E1;
    color: #64748B;
    border: 1px solid rgba(100, 116, 139, 0.25);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.9;
}
.btn-pay-sub:disabled:active { transform: none; box-shadow: none; }

.btn-setup-service {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, #5DA9FA 0%, #2E7DF0 100%);
    color: #FFFFFF;
    border: 1px solid rgba(59, 130, 246, 0.5);
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 20px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-setup-service svg { flex-shrink: 0; }
.btn-setup-service:active { transform: scale(0.97); box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3); }

/* Soon placeholder tab */
#tab-soon { min-height: 62vh; align-items: center; justify-content: center; text-align: center; }
.soon-emoji { font-size: 52px; margin-bottom: 10px; }
.soon-title { font-size: 26px; font-weight: 800; color: #1E293B; letter-spacing: -0.5px; }
.soon-sub { font-size: 13px; color: #64748B; margin-top: 6px; }

/* Mini square buttons row */
.store-mini-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-square-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #FFFFFF;
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 18px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    text-align: left;
    min-height: 140px;
}
.mini-square-btn:active { transform: scale(0.95); background: rgba(139, 92, 246, 0.16); }
.mini-btn-text { display: flex; flex-direction: column; gap: 3px; align-self: flex-start; font-weight: 700; }
.mini-btn-sub { font-size: 11px; font-weight: 600; color: #64748B; }
.mini-btn-emoji { font-size: 27px; flex-shrink: 0; display: flex; }
.mini-btn-emoji svg { width: 54px; height: 54px; }
.mini-btn-gift {
    position: absolute;
    right: 8px;
    top: 62%;
    transform: translateY(-50%);
    width: 68px;
    height: 126px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18));
    pointer-events: none;
}
.mini-btn-headset {
    position: absolute;
    right: 8px;
    top: 62%;
    transform: translateY(-50%);
    width: 76px;
    height: 84px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18));
}
.mini-btn-arrow { display: flex; margin-top: 32px; }
.mini-arrow-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.12) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* User Card */
.user-card { display: flex; align-items: center; padding: 16px; margin-bottom: 16px; }
.avatar { width: 50px; height: 50px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--primary)); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-right: 14px; box-shadow: 0 8px 25px var(--primary-glow); transform: rotate(-5deg); transition: 0.3s; }
.user-card:active .avatar { transform: rotate(0deg) scale(0.95); }
.user-info h2 { margin: 0 0 4px 0; font-size: 18px; font-weight: 600; letter-spacing: -0.5px; }
.user-info p { margin: 0; color: #64748B; font-size: 12px; font-family: monospace; font-weight: 600; }

.mt-4 { margin-top: 14px; }
.mt-3 { margin-top: 10px; }
.mt-2 { margin-top: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 12px; }
.text-center { text-align: center; }

.stats-box h3 { font-size: 12px; color: #6D28D9; margin: 0 0 10px 0; text-transform: uppercase; letter-spacing: 1px; }
.balance-amount { font-size: 26px; font-weight: 600; color: #1E293B; margin: 0; text-shadow: 0 0 20px rgba(255,255,255,0.3); }

/* Action Buttons */
.action-btn { width: 100%; background: rgba(168, 85, 247, 0.1); border: 1px solid rgba(168, 85, 247, 0.4); color: #6D28D9; padding: 12px; font-size: 14px; font-weight: 600; border-radius: 12px; cursor: pointer; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); font-family: inherit; white-space: normal; }
.action-btn:active { animation: tapPop 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: linear-gradient(135deg, #7C3AED, #A855F7); color: #FFFFFF; border-color: transparent; box-shadow: 0 0 30px var(--primary-glow); }

@keyframes tapPop {
    0% { transform: scale(1); }
    40% { transform: scale(0.93); }
    100% { transform: scale(1); }
}

/* Press feedback on cards and tabs */
.plans-header { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
.plans-head-row { display: flex; align-items: center; gap: 12px; }
.plans-back-btn {
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: none;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.plans-back-btn svg { width: 18px; height: 18px; }
.plans-back-btn:active { transform: scale(0.92); }
.plans-title { font-size: 18px; font-weight: 600; color: #000000; line-height: 30px; display: flex; align-items: center; height: 30px; margin: 0; }
.plans-subtitle { font-size: 18px; font-weight: 600; color: #000000; margin-top: 4px; }
.plans-subdesc { font-size: 15px; font-weight: 500; color: #64748B; line-height: 1.35; }
.device-picker {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px 22px;
    cursor: pointer;
    font-family: inherit;
    color: #000000;
}
.dev-picker-left { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.dev-picker-title { font-size: 17px; font-weight: 600; color: #000000; text-align: left; white-space: nowrap; }
.dev-picker-sub { font-size: 13px; font-weight: 500; color: #64748B; text-align: left; }
.dev-picker-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dev-count { font-size: 18px; font-weight: 700; color: #000000; min-width: 22px; text-align: center; line-height: 1; }
.dev-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid rgba(100, 116, 139, 0.35);
    color: #475569;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
}
.dev-arrow:active { background: #E2E8F0; }
.pay-plans-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.pay-plans-btn:active { transform: scale(0.97); }
.devices-buy-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #000000;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    padding: 14px;
    margin-top: 10px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.devices-buy-btn:active { transform: scale(0.97); }
.devices-buy-btn:disabled {
    background: #CBD5E1;
    color: #FFFFFF;
    cursor: default;
}
    font-size: 15px;
    font-weight: 600;
    margin-top: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.devices-total { width: 100%; font-size: 12px; color: #64748B; text-align: center; margin: 8px 0 0 0; }
.devices-access-title { font-size: 16px; font-weight: 700; color: #000000; text-align: left; margin: 20px 0 10px; }
.devices-access-card { width: 100%; display: flex; flex-direction: column; background: #FFFFFF; border: none; border-radius: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); padding: 14px 16px; text-align: left; font-family: inherit; cursor: pointer; }
.devices-access-text { font-size: 13px; color: #64748B; font-weight: 500; line-height: 1.45; }
.devices-reset-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid #EF4444;
    border-radius: 16px;
    padding: 14px;
    color: #EF4444;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.devices-reset-btn:active { transform: scale(0.97); background: rgba(239, 68, 68, 0.06); }
.pay-plans-disc {
    background: #E2E8F0;
    color: #000000;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
    min-width: 48px;
    box-sizing: border-box;
}
.plan-card:active { transform: scale(0.95); box-shadow: 0 0 25px var(--primary-glow); }
.ref-tier:active { transform: scale(0.95); border-color: rgba(168, 85, 247, 0.5); box-shadow: 0 0 20px var(--primary-glow); }
.tab-btn:active { background: #E2E8F0; border-color: rgba(100, 116, 139, 0.4); color: #000000; transform: scale(0.92); box-shadow: none; }

/* Store Grid */
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.plan-card { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 110px; padding: 16px; text-align: left; cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; background: #FFFFFF; border: none; border-radius: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); min-width: 0; }
.plan-card.selected { background: #FFFFFF; border: 2px solid #000000; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); }
.plan-duration { font-size: 13px; font-weight: 600; color: #64748B; margin-bottom: 3px; letter-spacing: -0.3px; transition: 0.3s; }
.plan-price { font-size: 19px; font-weight: 800; color: #000000; margin-bottom: 2px; text-shadow: none; transition: 0.3s; }
.plan-devices { font-size: 10px; color: #64748B; margin-top: 2px; font-weight: 600; }
.plan-desc { font-size: 10px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.4px; transition: 0.3s; }
.plan-devices-hint { text-align: center; font-size: 11px; color: #64748B; margin: 0 0 12px 0; }
.store-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* How-it-works */
.how-card { margin-top: 14px; }
.how-card h3 { font-size: 12px; color: #6D28D9; margin: 0 0 12px 0; text-transform: uppercase; letter-spacing: 1px; }
.how-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.how-item + .how-item { border-top: 1px solid rgba(139, 92, 246, 0.15); }
.how-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: rgba(168, 85, 247, 0.12); border: 1px solid rgba(168, 85, 247, 0.35); color: #7C3AED; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.how-text { font-size: 13px; color: #1E293B; font-weight: 600; }
.how-text small { display: block; color: #64748B; font-size: 11px; font-weight: 500; margin-top: 2px; }
.how-pay { margin-top: 12px; font-size: 12px; color: #64748B; }
.how-pay b { color: #1E293B; }

.plan-card.selected .plan-duration, .plan-card.selected .plan-price, .plan-card.selected .plan-desc { color: #000000; text-shadow: none; }
.plan-card.selected .plan-duration, .plan-card.selected .plan-desc { color: #64748B; }

.popular-badge { position: absolute; top: 0; right: 0; background: linear-gradient(135deg, #7C3AED, #A855F7); color: #FFFFFF; font-size: 9px; font-weight: 600; padding: 4px 10px; border-bottom-left-radius: 12px; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.45); z-index: 2; }
.plan-card.premium { border: none; }
.plan-card.premium.selected { background: #FFFFFF; border: 2px solid #000000; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); }
.plan-card.premium .plan-price { color: #000000; text-shadow: none; }
.plan-card.premium.selected .plan-price, .plan-card.premium.selected .plan-duration, .plan-card.premium.selected .plan-desc { color: #000000; text-shadow: none; }
.plan-card.premium.selected .plan-duration, .plan-card.premium.selected .plan-desc { color: #64748B; }

@keyframes breathe {
    0% { box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5); transform: translateY(0); }
    50% { box-shadow: 0 8px 45px rgba(168, 85, 247, 0.55); transform: translateY(-1px); }
    100% { box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5); transform: translateY(0); }
}
.buy-button { width: 100%; background: linear-gradient(135deg, #7C3AED, #A855F7); color: #FFFFFF; border: 1px solid rgba(168, 85, 247, 0.5); padding: 16px; font-size: 17px; font-weight: 600; border-radius: 16px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 8px 30px var(--primary-glow); font-family: inherit; letter-spacing: 0.5px; text-transform: uppercase; animation: breathe 3s infinite ease-in-out; }
.buy-button:active { transform: translateY(4px) scale(0.97); box-shadow: 0 4px 15px var(--primary-glow); background: linear-gradient(135deg, #8B5CF6, #7C3AED); animation: none; }
.buy-button:disabled { background: rgba(139, 92, 246, 0.08); color: #94A3B8; cursor: not-allowed; box-shadow: none; transform: none; border-color: transparent; animation: none; }

/* Referrals */
.ref-rank-card { background: #FFFFFF; border-radius: 16px; padding: 18px 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-align: center; margin-bottom: 12px; }
.ref-link-box { background: #F8FAFC; border: 1px solid rgba(168,85,247,0.2); border-radius: 10px; padding: 12px; font-family: monospace; font-size: 13px; font-weight: 600; margin-bottom: 12px; word-break: break-all; color: #000000; }
.ref-tier { background: #F8FAFC; border: 1px solid rgba(168,85,247,0.15); border-radius: 12px; padding: 10px 6px; min-width: 0; }
.ref-tier-emoji { font-size: 22px; margin-bottom: 4px; }
.ref-info { font-size: 12px; color: #64748B; margin: 0; }
.ref-rank-emoji { font-size: 44px; margin-bottom: 6px; filter: drop-shadow(0 0 25px var(--primary-glow)); }
.ref-rank-title { font-size: 20px; font-weight: 600; color: #1E293B; margin: 0 0 4px 0; letter-spacing: -0.5px; }
.ref-rank-desc { font-size: 12px; color: #64748B; margin: 0 0 14px 0; }
.ref-progress-track { width: 100%; height: 8px; border-radius: 99px; background: rgba(139, 92, 246, 0.15); overflow: hidden; }
.ref-progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7C3AED, #A78BFA); box-shadow: 0 0 12px var(--primary-glow); transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.ref-progress-label { font-size: 11px; color: #64748B; margin: 8px 0 0 0; }
.ref-stats { display: flex; justify-content: space-between; margin-top: 12px; }
.ref-stat-item { text-align: center; }
.ref-stat-value { font-size: 20px; font-weight: 600; color: #1E293B; }
.ref-stat-label { font-size: 11px; color: #64748B; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.ref-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.ref-stats-grid h4 { margin: 0 0 8px 0; color: #64748B; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.ref-stats-grid .stat-value { font-size: 18px; font-weight: 600; color: var(--primary); text-shadow: 0 0 15px var(--primary-glow); }
.ref-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ref-actions .action-btn { width: 100%; min-width: 0; padding: 10px 8px; font-size: 12px; white-space: normal; }
.ref-actions .share-btn { background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(168,85,247,0.18)); border-color: rgba(168,85,247,0.45); color: #6D28D9; }
.ref-tiers { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.ref-tier-name { font-size: 12px; font-weight: 600; color: #1E293B; margin-bottom: 3px; }
.ref-tier-bonus { font-size: 15px; font-weight: 600; color: var(--primary); text-shadow: 0 0 12px var(--primary-glow); margin-bottom: 3px; }
.ref-tier-refs { font-size: 10px; color: #64748B; }

/* Topup Input */
.topup-input { width: 100%; background: rgba(139, 92, 246, 0.08); border: 1px solid rgba(168,85,247,0.25); color: #1E293B; padding: 12px; font-size: 17px; font-weight: 600; border-radius: 12px; text-align: center; font-family: inherit; box-sizing: border-box; transition: 0.3s; }
.topup-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 20px var(--primary-glow); }

/* Gift */
.gift-summary { background: rgba(139, 92, 246, 0.08); border: 1px solid rgba(168,85,247,0.15); border-radius: 12px; padding: 11px 12px; text-align: center; font-size: 13px; font-weight: 600; color: #1E293B; margin: 0 0 12px 0; }
.gift-summary .gift-summary-price { color: var(--primary); text-shadow: 0 0 12px var(--primary-glow); }
.gift-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.ref-support-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 12px;
    text-align: center;
}
.ref-support-title { font-size: 15px; font-weight: 700; color: #000000; margin-bottom: 6px; }
.ref-support-text { font-size: 13px; color: #64748B; margin-bottom: 12px; }

.support-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}
.support-header {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 16px;
}
#tab-store { padding-bottom: 40px; }

#tab-settings { padding-bottom: 40px; }
.settings-sub-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 16px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: #000000;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-sub-card:active { transform: scale(0.97); }
.settings-sub-title { font-size: 15px; font-weight: 700; }
.settings-sub-text { font-size: 12px; color: #64748B; }
.settings-sub-actions {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 4px;
}
.settings-sub-link { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.settings-sub-arrow { font-size: 15px; line-height: 1; }
.settings-label { font-size: 15px; font-weight: 700; color: #000000; margin: 14px 0 6px; }
.settings-row-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 10px 16px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: #000000;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-row-card:active { transform: scale(0.97); }
.settings-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.settings-row-title { font-size: 14px; font-weight: 600; flex: 1; }
.settings-row-value { font-size: 14px; font-weight: 700; }
.settings-legal-arrow { display: flex; flex-shrink: 0; }
.settings-legal-card {
    width: 100%;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.settings-legal-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 10px 16px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: #000000;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-legal-row:active { background: #F1F5F9; }
.settings-legal-divider { height: 1px; background: rgba(148, 163, 184, 0.25); margin: 0 16px; }
.settings-footer { text-align: center; font-size: 12px; color: #64748B; margin: 8px 0 14px 0; }

#tab-referral { padding-bottom: 40px; }
.ref-stats-row { display: flex; gap: 8px; margin-top: -6px; }
.ref-stat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 13px 8px;
    box-sizing: border-box;
}
.ref-stat-label { font-size: 13px; font-weight: 500; color: #64748B; }
.ref-stat-value { font-size: 17px; font-weight: 800; color: #000000; }
.ref-withdraw-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px 20px;
    margin-top: 4px;
    box-sizing: border-box;
}
.ref-progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}
.ref-progress-svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.ref-progress-bg {
    fill: none;
    stroke: #E2E8F0;
    stroke-width: 8;
}
.ref-progress-fill {
    fill: none;
    stroke: #000000;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 263.9;
    stroke-dashoffset: 263.9;
    transition: stroke-dashoffset 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ref-progress-text {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    line-height: 1.1;
}
.ref-progress-label { font-size: 13px; font-weight: 500; color: #64748B; }
.ref-progress-amount { font-size: 16px; font-weight: 800; color: #000000; white-space: nowrap; }
.ref-withdraw-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 5px;
    min-width: 0;
}
.ref-withdraw-title { font-size: 15px; font-weight: 700; color: #000000; }
.ref-withdraw-sub { font-size: 12px; font-weight: 500; color: #64748B; line-height: 1.3; }
.ref-withdraw-btn {
    background: #CBD5E1;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: default;
    margin-top: 8px;
    margin-right: 0;
    align-self: stretch;
    width: 100%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 480px) {
    .ref-withdraw-btn { padding: 13px 16px; }
}
.ref-withdraw-btn.enabled {
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.05) 45%, rgba(255,255,255,0) 60%), #000000;
}
.ref-withdraw-btn.enabled:active { transform: scale(0.97); }
.ref-link-title { font-size: 15px; font-weight: 700; color: #000000; margin: -2px 0 0; }
.ref-link-row { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: -2px; }
.ref-link-field {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
border-radius: 12px;
    padding: 18px 12px 12px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    min-width: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.ref-link-field:active { transform: scale(0.98); }
.ref-link-field-sub {
    position: absolute;
    top: 11px;
    left: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #64748B;
    line-height: 1.1;
}
.ref-link-field-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}
.ref-link-field-link {
    font-size: 12px;
    font-weight: 600;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}
.ref-copy-btn {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: #000000;
    border: none;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.ref-copy-btn:active { transform: scale(0.94); }
.ref-copy-icon { display: block; }
.ref-copy-check { display: none; }
.ref-copy-btn.copied .ref-copy-icon { display: none; }
.ref-copy-btn.copied .ref-copy-check { display: block; }
.ref-send-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.ref-send-btn:active { transform: scale(0.97); }
.ref-send-emoji { display: inline-block; flex-shrink: 0; }
.ref-send-text { text-align: center; }
.ref-rewards-title { font-size: 15px; font-weight: 700; color: #000000; margin: 0 0 2px; }
.ref-rewards {
    width: 100%;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-sizing: border-box;
}
.ref-reward-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    box-sizing: border-box;
}
.ref-reward-row + .ref-reward-row { border-top: 1px solid #F1F5F9; }
.ref-reward-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ref-reward-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
}
.ref-reward-title { font-size: 14px; font-weight: 700; color: #000000; }
.ref-reward-sub { font-size: 12px; font-weight: 500; color: #64748B; line-height: 1.3; }

#tab-devices { padding-bottom: 40px; }
.promo-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 16px;
    text-align: left;
    box-sizing: border-box;
}
.promo-card-title { font-size: 15px; font-weight: 700; color: #000000; }
.promo-card-sub { font-size: 13px; font-weight: 500; color: #64748B; line-height: 1.35; margin-top: -6px; }
.promo-card .promo-input { margin-top: 0; }
.promo-card .promo-btn { margin-top: 0; }
.promo-note {
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
    line-height: 1.45;
    margin: 14px 2px 0;
    text-align: left;
}
#tab-promo { padding-bottom: 40px; }
.promo-input {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid transparent;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 14px 16px;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    color: #000000;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-sizing: border-box;
    margin-top: 14px;
    outline: none;
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.promo-input::placeholder { color: #94A3B8; letter-spacing: 0; font-weight: 500; text-transform: none; }
.promo-input:focus { border-color: #000000; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.promo-btn {
    width: 100%;
    background: #CBD5E1;
    color: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: default;
    margin-top: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.promo-btn.enabled {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    cursor: pointer;
}
.promo-btn.enabled:active { transform: scale(0.97); }
.promo-status { font-size: 13px; font-weight: 600; text-align: center; margin: 12px 0 0; min-height: 18px; }
.promo-status.ok { color: #16A34A; }
.promo-status.err { color: #DC2626; }
#tab-promo { padding-bottom: 40px; }
.devices-status-card { width: 100%; background: #FFFFFF; border: none; border-radius: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); padding: 16px; margin-top: 14px; }
.devices-subtitle { font-size: 13px; color: #64748B; text-align: left; margin: 0 0 2px; font-weight: 500; }
.devices-subword { font-size: 13px; color: #64748B; text-align: left; margin: 0 0 2px; font-weight: 500; }
.devices-count { font-size: 26px; font-weight: 800; color: #000000; text-align: left; }
.devices-count-dim { color: #64748B; }
.devices-progress { width: 100%; height: 10px; border-radius: 99px; background: rgba(148, 163, 184, 0.25); margin: 10px 0 8px; overflow: hidden; }
.devices-progress-fill { height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, #7C3AED, #A78BFA); transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.devices-free { font-size: 12px; color: #64748B; text-align: left; margin-bottom: 0; }
.devices-section-title { font-size: 16px; font-weight: 700; color: #000000; text-align: left; margin: 20px 0 10px; }
.devices-empty-card { width: 100%; display: flex; align-items: center; justify-content: center; background: #FFFFFF; border: none; border-radius: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); padding: 14px 16px; cursor: pointer; }
.devices-empty-text { font-size: 13px; color: #64748B; font-weight: 500; text-align: center; }
.devices-add-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: #FFFFFF; border: none; border-radius: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); padding: 14px 16px; cursor: pointer; margin-top: 10px; }
.devices-add-plus { font-size: 22px; font-weight: 400; color: #475569; line-height: 1; }
.devices-add-text { font-size: 14px; font-weight: 600; color: #000000; }
.devices-buy-title { font-size: 16px; font-weight: 700; color: #000000; text-align: left; margin: 20px 0 10px; }
.devices-total { width: 100%; font-size: 12px; color: #64748B; text-align: center; margin: 10px 0 0 0; }
#tab-support { padding-bottom: 40px; }
.support-main-btn {
    align-self: center;
    width: auto;
    min-width: 84px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    border: none;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    margin: -8px auto 10px;
    cursor: default;
    pointer-events: none;
    opacity: 0.85;
}
.support-main-btn:active { opacity: 0.85; }
.support-item {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
}
.support-item:first-of-type { margin-top: -8px; }
.support-issue-btn {
    width: 100%;
    flex: 1;
    min-width: 0;
    background: #FFFFFF;
    border: 0.5px solid rgba(148, 163, 184, 0.3);
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.support-issue-btn:active { background: #F1F5F9; }
.support-help-text {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    text-align: left;
    padding-left: 14px;
    margin: 2px 0 6px;
}
.support-operator-card {
    position: relative;
    background: #FFFFFF;
    border: 0.5px solid rgba(148, 163, 184, 0.3);
    border-radius: 16px;
    padding: 16px 100px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.support-operator-img {
    position: absolute;
    right: 6px;
    bottom: 4px;
    top: auto;
    transform: none;
    width: 104px;
    height: 104px;
    filter: drop-shadow(0 3px 8px rgba(139, 92, 246, 0.4));
    pointer-events: none;
}
.support-operator-title {
    font-size: 15px;
    font-weight: 700;
    color: #000000;
    text-align: left;
    margin: 0;
}
.support-operator-sub {
    font-size: 12px;
    color: #64748B;
    text-align: left;
    align-self: flex-start;
    max-width: 60%;
    margin: 0 0 8px;
}
.support-chat-btn {
    width: 75%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.12) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.support-chat-btn span:first-child { flex: 1; text-align: left; }
.support-chat-btn:active { transform: scale(0.97); }
.support-plus {
    font-size: 30px;
    font-weight: 300;
    color: #64748B;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    background: transparent;
}
.support-answer {
    display: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0) 60%), #000000;
    color: #FFFFFF;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}
