@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

/* OMTV Video Chat – Modern Entertainment App UI */
:root {
    --bg: #0f0a20;
    --surface: rgba(28, 15, 50, 0.85);
    --surface-elevated: rgba(45, 25, 75, 0.9);
    --border: rgba(200, 100, 255, 0.25);
    --text: #ffffff;
    --text-secondary: #e8d4ff;
    --muted: #b080d8;
    --primary: #ff3366;
    --primary-hover: #ff1a4d;
    --primary-glow: rgba(255, 51, 102, 0.6);
    --accent-1: #ff6b9d;
    --accent-2: #a855f7;
    --accent-3: #06b6d4;
    --accent-4: #10b981;
    --danger: #ff3333;
    --danger-hover: #e60000;
    --success: #5eead4;
    --premium: #ffd700;
    --radius: 22px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --nav-height: 56px;
    --shadow-soft: 0 8px 24px rgba(255, 51, 102, 0.25);
    --shadow-card: 0 12px 40px rgba(168, 85, 247, 0.35);
    --shadow-glow: 0 0 30px rgba(255, 51, 102, 0.3);
}

body[data-theme="light"] {
    --bg: #faf8ff;
    --surface: rgba(255, 250, 255, 0.9);
    --surface-elevated: rgba(255, 245, 255, 0.95);
    --border: rgba(200, 100, 255, 0.2);
    --text: #1a0033;
    --text-secondary: #3d0066;
    --muted: #8866aa;
    --primary: #ff3366;
    --primary-hover: #ff1a4d;
    --primary-glow: rgba(255, 51, 102, 0.2);
    --danger: #ff3333;
    --danger-hover: #e60000;
    --success: #00b884;
    --premium: #ff9500;
    --shadow-soft: 0 8px 24px rgba(255, 51, 102, 0.15);
    --shadow-card: 0 12px 40px rgba(168, 85, 247, 0.2);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Sora', 'Avenir Next', 'Helvetica Neue', sans-serif;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 51, 102, 0.35) 0%, rgba(255, 51, 102, 0) 40%),
        radial-gradient(circle at 85% 15%, rgba(168, 85, 247, 0.3) 0%, rgba(168, 85, 247, 0) 50%),
        radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0) 50%),
        linear-gradient(135deg, #0f0a20 0%, #1a0d33 30%, #0a1428 70%, #0f0a20 100%);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

body[data-theme="light"] {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 107, 157, 0.15) 0%, rgba(255, 107, 157, 0) 40%),
        radial-gradient(circle at 85% 15%, rgba(168, 85, 247, 0.15) 0%, rgba(168, 85, 247, 0) 50%),
        radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0) 50%),
        linear-gradient(135deg, #faf8ff 0%, #f5ebff 30%, #f0f9ff 70%, #faf8ff 100%);
}

body {
    padding-top: var(--safe-top);
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
    overflow: hidden;
}

body.auth-page {
    padding-bottom: var(--safe-bottom);
}

.app {
    width: 100%;
    max-width: 480px;
    height: calc(100vh - var(--safe-top) - var(--nav-height) - var(--safe-bottom));
    height: calc(100dvh - var(--safe-top) - var(--nav-height) - var(--safe-bottom));
    min-height: calc(100vh - var(--safe-top) - var(--nav-height) - var(--safe-bottom));
    min-height: calc(100dvh - var(--safe-top) - var(--nav-height) - var(--safe-bottom));
    margin: 0 auto;
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header – professional app-style toolbar */
.header {
    position: sticky;
    top: 0;
    flex-shrink: 0;
    z-index: 10;
    background: linear-gradient(180deg, rgba(15, 10, 32, 0.95), rgba(15, 10, 32, 0.85));
    padding: 0;
    margin: 0 -16px 12px;
    border-bottom: 2px solid rgba(255, 51, 102, 0.12);
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.in-call .header {
    display: none;
}

body.in-call .header {
    display: none;
}

body[data-theme="light"].in-call .header {
    display: none;
}

/* Hide bottom nav when in a call */
body.in-call .bottom-nav {
    display: none;
}

/* In-call should be true fullscreen: remove reserved nav padding + max-width */
body.in-call {
    padding-bottom: var(--safe-bottom);
}

body.in-call .app {
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
}

body.in-call #roomSection {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
}

.header-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 0 12px;
    gap: 8px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.btn-header-back {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(168, 85, 247, 0.1));
    border: 1.5px solid rgba(255, 51, 102, 0.2);
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.btn-header-back:hover {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.25), rgba(168, 85, 247, 0.15));
    transform: translateX(-2px);
}

.btn-header-back.show {
    display: flex;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.header-logo {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 8px rgba(255, 51, 102, 0.3));
    animation: float-slow 3s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.header-title {
    font-size: 0.92rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ff6b9d, #a855f7, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.btn-wallet {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 107, 157, 0.15));
    border: 1.5px solid rgba(255, 215, 0, 0.35);
    color: #ffd700;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.72rem;
}

.btn-wallet:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 107, 157, 0.25));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.25);
}

.wallet-icon {
    font-size: 0.84rem;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.3));
}

.wallet-coins {
    font-weight: 900;
    min-width: 18px;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.header-user-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 7px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(168, 85, 247, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-user-profile:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(6, 182, 212, 0.1));
    border-color: rgba(168, 85, 247, 0.3);
}

.user-avatar-mini {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(135deg, #ff6b9d, #a855f7);
    border: 2px solid rgba(255, 51, 102, 0.3);
    flex-shrink: 0;
}

.user-avatar-mini[src=""],
.user-avatar-mini:not([src]) {
    display: none;
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-profile-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 64px;
}

.user-profile-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.58rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #5eead4;
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot.offline {
    background: rgba(148, 163, 184, 0.9);
    animation: none;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6); }
    50% { opacity: 0.8; }
}

.btn-header-menu {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.1), rgba(168, 85, 247, 0.08));
    border: 1.5px solid rgba(255, 51, 102, 0.15);
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-header-menu:hover {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(168, 85, 247, 0.12));
    color: var(--text);
    transform: rotate(90deg);
}

.header-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 16px 8px;
    min-height: 24px;
}

.status-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-badge.online {
    background: rgba(94, 234, 212, 0.2);
    color: #5eead4;
    border: 1px solid rgba(94, 234, 212, 0.4);
}

.status-badge.offline {
    background: rgba(255, 107, 157, 0.2);
    color: #ff6b9d;
    border: 1px solid rgba(255, 107, 157, 0.4);
}

.room-status {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.badge-premium {
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #000;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}
}

.header-actions .user-info {
    font-size: 0.75rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text);
}

.status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status.online {
    background: rgba(16, 185, 129, 0.25);
    color: #5eead4;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.status.offline {
    background: rgba(239, 68, 68, 0.25);
    color: #ff6b9d;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.room-status { font-size: 0.8rem; color: var(--muted); }

.user-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.badge-premium {
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--surface-elevated);
}

.btn-small:hover, .btn-small:active {
    background: var(--border);
}

/* Main content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 280px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.main::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Lobby – dark purple, center tap + pinging circles */
.lobby {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    min-height: 0;
    background: var(--bg);
}

.lobby-center {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 260px;
}

.lobby-ping-wrap {
    position: absolute;
    width: 180px;
    height: 180px;
    pointer-events: none;
}

.lobby-ping-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.35);
    animation: lobby-ping 2.5s ease-out infinite;
}

.lobby-ping-circle:nth-child(1) { animation-delay: 0s; }
.lobby-ping-circle:nth-child(2) { animation-delay: 0.5s; }
.lobby-ping-circle:nth-child(3) { animation-delay: 1s; }
.lobby-ping-circle:nth-child(4) { animation-delay: 1.5s; }

@keyframes lobby-ping {
    0% {
        transform: scale(0.6);
        opacity: 1;
        border-color: rgba(255, 51, 102, 0.8);
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
        border-color: rgba(168, 85, 247, 0.1);
    }
}

.lobby-tap-area {
    position: relative;
    z-index: 1;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(168, 85, 247, 0.1));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 50px rgba(255, 51, 102, 0.4), inset 0 0 50px rgba(255, 51, 102, 0.1);
}

.lobby-tap-area:not(:disabled):hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 0 80px rgba(255, 51, 102, 0.6), inset 0 0 60px rgba(168, 85, 247, 0.2);
    border-color: var(--accent-1);
}

.lobby-tap-area:not(:disabled):active {
    transform: scale(0.96) rotate(0deg);
    box-shadow: 0 0 40px rgba(255, 51, 102, 0.4), inset 0 0 40px rgba(255, 51, 102, 0.15);
}

.lobby-tap-area:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    border-color: rgba(255, 51, 102, 0.3);
}

body[data-theme="light"] .lobby-tap-area {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(250, 204, 21, 0.7);
}

body[data-theme="light"] .lobby-tap-text {
    color: var(--text);
}

.lobby-tap-text {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    padding: 0 8px;
    animation: float-text 3s ease-in-out infinite;
}

@keyframes float-text {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.lobby-tap-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: rotate-icon 2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 51, 102, 0.4));
}

.lobby-tap-icon-svg {
    width: 32px;
    height: 32px;
    color: currentColor;
}

@keyframes rotate-icon {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.05); }
}

.lobby-chat-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.lobby-filters {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 12px 0;
    flex-shrink: 0;
}

.lobby-filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(6, 182, 212, 0.05));
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lobby-filter-btn:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(168, 85, 247, 0.15));
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.lobby-filter-btn:active {
    transform: translateY(0);
}

.lobby-filter-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(255, 51, 102, 0.3));
}

.lobby-filter-icon-svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    padding: 16px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 48px;
    letter-spacing: 0.02em;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:not(:disabled):active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent-1));
    color: white;
    box-shadow: 0 6px 24px var(--primary-glow);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 10px 40px var(--primary-glow);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--accent-1), #ff1a4d);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #ff5d7d);
    color: white;
    box-shadow: 0 6px 24px rgba(255, 51, 51, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--danger-hover), #ff3333);
    box-shadow: 0 10px 40px rgba(255, 51, 51, 0.4);
    transform: translateY(-2px);
}

.waiting-msg {
    margin-top: 20px;
    color: var(--accent-3);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.waiting-msg::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid transparent;
    border-top-color: var(--accent-3);
    border-right-color: var(--accent-3);
    border-radius: 50%;
    animation: spin-modern 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin-modern {
    to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

/* Room – full screen: 50% remote, 50% local, no scroll */
.room {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    padding-top: var(--safe-top);
}

.room-fullscreen.videos {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    min-height: 0;
}

@media (max-width: 480px) {
    .room-fullscreen.videos {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
}

.room-fullscreen .video-wrapper {
    position: relative;
    min-height: 0;
    background: #000;
}

.room-fullscreen .video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Legacy non-fullscreen (if used elsewhere) */
.room:not(.hidden) .videos:not(.room-fullscreen) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.videos {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 0;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 0;
}

/* Ensure both local and remote video are NOT mirrored (natural camera view) */
.video-wrapper.local video,
.video-wrapper.remote video {
    transform: none;
}

.video-wrapper .label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 0.75rem;
    background: rgba(0,0,0,0.65);
    padding: 4px 10px;
    border-radius: 8px;
}

.video-wrapper .label.gender-male {
    background: rgba(59, 130, 246, 0.8);
}

.video-wrapper .label.gender-female {
    background: rgba(236, 72, 153, 0.8);
}

/* Remote peer: avatar + name when call connected */
.remote-peer {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: calc(100% - 20px);
}

.remote-peer.gender-male {
    background: rgba(59, 130, 246, 0.75);
}

.remote-peer.gender-female {
    background: rgba(236, 72, 153, 0.75);
}

.remote-peer-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.remote-peer-avatar[src=""],
.remote-peer-avatar:not([src]) {
    display: none !important;
}

.remote-peer-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Single top bar: duration (left) + coins/min (right) – glass style like reference icons */
.call-top-bar {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 12;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(168, 85, 247, 0.1));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 51, 102, 0.3);
    color: rgba(255, 255, 255, 0.98);
    font-size: 0.78rem;
    min-height: 36px;
    box-sizing: border-box;
    flex-wrap: nowrap;
    box-shadow: 0 4px 20px rgba(255, 51, 102, 0.15);
}
.call-top-bar.hidden { display: none !important; }
.call-top-bar-duration {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    color: #ffd700;
}
.call-top-bar-coins {
    font-weight: 700;
    opacity: 0.98;
    white-space: nowrap;
}
.call-top-bar-coins.hidden { display: none !important; }
.call-top-bar-coins-num { font-weight: 700; opacity: 0.98; white-space: nowrap; color: #5eead4; }
.call-top-bar-coins-num.hidden { display: none !important; }
.call-top-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
}
.paid-call-low {
    margin: 0;
    font-size: 0.7rem;
    color: #ff6b9d;
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 600;
}
.paid-call-countdown {
    font-size: 0.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #10b981;
}
.paid-call-countdown.hidden { display: none !important; }

.paid-call-overlay {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.85rem;
}
.paid-call-overlay.hidden { display: none !important; }
.paid-call-minutes { font-weight: 600; }
.paid-call-low {
    color: #fcd34d;
    font-weight: 600;
    margin: 0;
    font-size: 0.8rem;
}
.paid-call-countdown { font-size: 0.95rem; font-weight: 700; }

/* Call duration timer (visible after connect) */
.call-duration-wrap {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 12;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}
.call-duration-wrap.hidden { display: none !important; }

/* Chat header: partner rate (coins per minute) */
.chat-partner-rate {
    display: block;
    font-size: 0.75rem;
    color: var(--muted, #94a3b8);
    margin-top: 2px;
}
.chat-partner-rate.hidden { display: none !important; }

/* Room actions – modern grid layout with glowing buttons */
.room-overlay.room-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--nav-height) + var(--safe-bottom));
    padding: 8px 12px calc(16px + var(--safe-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    background: linear-gradient(to top, rgba(15, 10, 32, 0.95) 0%, rgba(15, 10, 32, 0.85) 50%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
    transition: bottom 0.2s ease;
    align-items: center;
    justify-items: center;
}

body.in-call .room-overlay.room-actions {
    bottom: 0;
}

@media (max-height: 600px), (orientation: landscape) {
    .room-overlay.room-actions {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
        padding: 6px 8px calc(12px + var(--safe-bottom));
    }
}

/* Call screen buttons – small, rich, colorful grid */
.btn-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    font-weight: 600;
}

.btn-call:active {
    transform: scale(0.88);
}

.btn-call-icon {
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.95;
}

/* Glassmorphism utility buttons – colorful, glowing */
.btn-call-glass {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(168, 85, 247, 0.15));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 107, 157, 0.3);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.2);
}

.btn-call-glass .btn-call-svg {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 6px rgba(255, 51, 102, 0.4));
}

.btn-call-glass .btn-call-svg svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: rgba(255, 255, 255, 0.98);
    fill: none;
}

.btn-call-glass:hover {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.35), rgba(168, 85, 247, 0.25));
    border-color: rgba(255, 51, 102, 0.6);
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.4), inset 0 0 20px rgba(255, 51, 102, 0.1);
    transform: translateY(-2px) scale(1.05);
}

/* Color variations for different buttons */
.btn-call-glass:nth-child(1) { border-color: rgba(255, 107, 157, 0.4); background: linear-gradient(135deg, rgba(255, 107, 157, 0.25), rgba(255, 51, 102, 0.15)); }
.btn-call-glass:nth-child(2) { border-color: rgba(168, 85, 247, 0.4); background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(139, 92, 246, 0.15)); }
.btn-call-glass:nth-child(3) { border-color: rgba(6, 182, 212, 0.4); background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(34, 211, 238, 0.15)); }
.btn-call-glass:nth-child(4) { border-color: rgba(16, 185, 129, 0.4); background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(52, 211, 153, 0.15)); }
.btn-call-glass:nth-child(5) { border-color: rgba(244, 63, 94, 0.4); background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(239, 68, 68, 0.15)); }

/* End call – large gradient circle, primary action */
.btn-call-end {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff3333 0%, #cc0000 100%);
    border: 3px solid rgba(255, 51, 51, 0.5);
    color: #fff;
    box-shadow: 0 8px 32px rgba(255, 51, 51, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    position: relative;
    grid-column: 3;
    grid-row: 1;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 32px rgba(255, 51, 51, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 12px 48px rgba(255, 51, 51, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.3); }
}

.btn-call-end:hover {
    background: linear-gradient(135deg, #ff1a1a 0%, #b30000 100%);
    box-shadow: 0 12px 48px rgba(255, 51, 51, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    transform: translateY(-4px) scale(1.08);
}

.btn-call-end:active {
    transform: scale(0.92) translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 51, 51, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-call-end-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.btn-call-end-icon svg {
    display: block;
}

/* Call controls container wrappers – hidden (buttons pulled into grid) */
.call-bottom-controls,
.call-side-controls {
    display: contents;
}

.call-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid rgba(15, 10, 32, 0.9);
    box-shadow: 0 2px 8px rgba(255, 51, 102, 0.4);
    animation: badge-pulse 1.5s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.call-chat-badge.hidden {
    display: none !important;
}

/* Next – gradient pill with icon + label */
.btn-call-next {
    width: auto;
    min-width: 72px;
    height: 52px;
    padding: 0 16px 0 12px;
    border-radius: 26px;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent-3), var(--accent-4));
    border: 2px solid rgba(6, 182, 212, 0.4);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    grid-column: 4;
    grid-row: 1;
}

.btn-call-next .btn-call-svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.btn-call-next .btn-call-svg svg {
    width: 100%;
    height: 100%;
    stroke: #fff;
}

.btn-call-next:hover {
    background: linear-gradient(135deg, #06d4d4, #00d084);
    border-color: rgba(6, 182, 212, 0.7);
    box-shadow: 0 6px 30px rgba(6, 182, 212, 0.5);
    transform: translateY(-2px) scale(1.05);
}

.btn-call-next .btn-call-icon {
    font-size: 1rem;
}

.btn-call-next-label {
    letter-spacing: 0.02em;
}

/* Report – gradient with red accent */
.btn-call-report {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(239, 68, 68, 0.2));
    border: 2px solid rgba(244, 63, 94, 0.4);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}

.btn-call-report .btn-call-svg svg {
    stroke: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.4));
}

.btn-call-report:hover {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.4), rgba(239, 68, 68, 0.35));
    border-color: rgba(244, 63, 94, 0.6);
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.4);
    transform: translateY(-2px) scale(1.05);
}

/* In-call chat: bubbles only, video stays visible */
.call-chat-bubbles {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: calc(14px + var(--safe-bottom) + 56px);
    max-height: 38vh;
    z-index: 12;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to top, rgba(15, 10, 32, 0.85) 0%, rgba(15, 10, 32, 0.6) 50%, transparent);
    border-radius: 20px;
    overflow: hidden;
    border: 1.5px solid rgba(255, 51, 102, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.call-chat-bubbles.hidden {
    display: none !important;
}

.call-chat-bubbles-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 8px;
    color: rgba(255,255,255,0.95);
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-call-chat-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 8px;
    opacity: 0.95;
}

/* Messages from bottom – chat order, newest at bottom */
.call-chat-bubbles-list {
    flex: 1;
    min-height: 80px;
    max-height: 22vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 8px 10px 10px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: flex-end;
}

.call-chat-bubbles-list .msg {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 16px 16px 4px 16px;
    font-size: 0.87rem;
    word-break: break-word;
    line-height: 1.35;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(100, 150, 255, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.call-chat-bubbles-list .msg.mine {
    align-self: flex-end;
    border-radius: 16px 16px 16px 4px;
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: #fff;
    align-items: flex-end;
    border: none;
}

.call-chat-bubbles-list .msg.theirs {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    border: none;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
}

.call-chat-gift-wrap {
    display: inline-flex;
    align-items: center;
}

.call-chat-msg-body {
    display: block;
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.call-chat-msg-time {
    font-size: 0.68rem;
    line-height: 1;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.call-chat-bubbles-list .msg.mine .call-chat-msg-time {
    color: rgba(255, 244, 252, 0.98);
    background: rgba(255, 255, 255, 0.2);
}

.call-chat-bubbles-list .msg.theirs .call-chat-msg-time {
    color: #5b2b6d;
    background: rgba(168, 84, 160, 0.16);
}

.call-chat-input-wrap {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    background: rgba(15, 10, 32, 0.6);
}

.call-chat-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 22px;
    border: 1.5px solid rgba(255, 51, 102, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.87rem;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.call-chat-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.2);
}

.call-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-call-chat-send {
    padding: 10px 16px;
    border-radius: 22px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent-1));
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.btn-call-chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.4);
}

.btn-call-chat-send:active {
    transform: translateY(0);
}

.room-actions .btn { min-width: 80px; }

.btn-glass {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
}

.btn-glass:hover:not(:disabled) {
    background: rgba(255,255,255,0.25);
}

.btn-icon {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-icon.btn-glass { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.25); color: #fff; }

.btn-icon:hover:not(:disabled) {
    background: var(--border);
}

.btn-next {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
}

.btn-next.btn-glass {
    background: linear-gradient(135deg, rgba(99,102,241,0.9), rgba(79,70,229,0.9));
    border-color: rgba(255,255,255,0.3);
}

.btn-next:hover:not(:disabled) {
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-danger.btn-glass {
    background: rgba(239,68,68,0.85);
    border-color: rgba(255,255,255,0.3);
}

/* Lobby filter bar */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 10px 16px;
    font-size: 0.9rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-filter:hover {
    color: var(--text);
    border-color: var(--primary);
}

.filter-icon { font-size: 1.1rem; }

/* Header coins button – opens recharge modal */
.btn-coins {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 107, 157, 0.15));
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.btn-coins:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 107, 157, 0.25));
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.35);
    transform: translateY(-2px);
}

.btn-coins .coins-display {
    font-size: 0.95rem;
    font-weight: 900;
}

.btn-coins .coins-label {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.85;
}

.coins-display {
    font-size: 0.85rem;
    color: var(--premium);
    font-weight: 600;
}

/* Filter modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: overlay-appear 0.2s ease;
}

@keyframes overlay-appear {
    from { background-color: rgba(0, 0, 0, 0); }
    to { background-color: rgba(0, 0, 0, 0.5); }
}

.modal-overlay.hidden { display: none !important; }

.filter-modal {
    background: linear-gradient(135deg, var(--surface-elevated), rgba(45, 25, 75, 0.85));
    border: 2px solid rgba(255, 51, 102, 0.2);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 360px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(255, 51, 102, 0.25);
    animation: modal-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-pop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.filter-modal h3 {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-hint {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.filter-modal .form-group {
    margin-bottom: 16px;
}

.filter-modal .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
}

.filter-modal select,
.filter-modal input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1.5px solid rgba(255, 51, 102, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-modal select:focus,
.filter-modal input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.15);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn { 
    flex: 1;
    font-size: 0.95rem;
}

/* Recharge modal */
.recharge-modal {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 340px;
    width: 100%;
}

.recharge-modal h3 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
}

.recharge-balance {
    font-size: 1rem;
    margin-bottom: 8px;
}

.recharge-balance strong {
    color: var(--premium);
}

.recharge-options {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.btn-recharge {
    flex: 1;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--premium), #d97706);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-recharge:hover {
    opacity: 0.95;
}

/* Recharge screen – full overlay, packages grid + history */
.recharge-screen-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg);
    overflow-y: auto;
    padding: 0 16px 24px;
}

.recharge-screen-overlay.hidden {
    display: none !important;
}

.recharge-screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    padding: 0;
}

.recharge-back {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 8px 0 0;
}

.recharge-screen-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.recharge-balance-line {
    margin: 0 0 20px 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.recharge-balance-line strong {
    color: var(--premium);
}

.recharge-packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.recharge-pack-card {
    background: linear-gradient(145deg, var(--surface-elevated), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recharge-pack-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Once Only – purple gradient */
.recharge-pack-card.pack-once {
    background: linear-gradient(145deg, #a855f7, #7c3aed);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
    box-shadow: 0 6px 20px rgba(124,58,237,0.35);
}

.recharge-pack-card.pack-once:hover {
    box-shadow: 0 10px 28px rgba(124,58,237,0.45);
}

/* Basic – cool blue/slate */
.recharge-pack-card.pack-basic {
    background: linear-gradient(145deg, #334155, #1e293b);
    border-color: rgba(71,85,105,0.6);
    color: #e2e8f0;
    box-shadow: 0 6px 20px rgba(30,41,59,0.4);
}

.recharge-pack-card.pack-basic:hover {
    box-shadow: 0 10px 28px rgba(51,65,85,0.5);
}

.recharge-pack-card.pack-basic .recharge-pack-label { background: rgba(148,163,184,0.25); color: #cbd5e1; }
.recharge-pack-card.pack-basic .recharge-pack-coins { color: #fbbf24; }
.recharge-pack-card.pack-basic .recharge-pack-price { background: linear-gradient(135deg, #64748b, #475569); color: #fff; }

/* HOT – orange/amber */
.recharge-pack-card.pack-hot {
    background: linear-gradient(145deg, #ea580c, #c2410c);
    border-color: rgba(251,191,36,0.4);
    color: #fff;
    box-shadow: 0 6px 20px rgba(234,88,12,0.4);
}

.recharge-pack-card.pack-hot:hover {
    box-shadow: 0 10px 28px rgba(234,88,12,0.5);
}

.recharge-pack-card.pack-hot .recharge-pack-label { background: rgba(255,255,255,0.2); color: #fff; }
.recharge-pack-card.pack-hot .recharge-pack-off { color: #fef3c7; }
.recharge-pack-card.pack-hot .recharge-pack-coins { color: #fff; }
.recharge-pack-card.pack-hot .recharge-pack-price { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }

/* Popular – green/emerald */
.recharge-pack-card.pack-popular {
    background: linear-gradient(145deg, #059669, #047857);
    border-color: rgba(52,211,153,0.4);
    color: #fff;
    box-shadow: 0 6px 20px rgba(5,150,105,0.35);
}

.recharge-pack-card.pack-popular:hover {
    box-shadow: 0 10px 28px rgba(5,150,105,0.45);
}

.recharge-pack-card.pack-popular .recharge-pack-label { background: rgba(255,255,255,0.2); color: #fff; }
.recharge-pack-card.pack-popular .recharge-pack-off { color: #d1fae5; }
.recharge-pack-card.pack-popular .recharge-pack-coins { color: #fef08a; }
.recharge-pack-card.pack-popular .recharge-pack-price { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }

/* Best Value – indigo/purple */
.recharge-pack-card.pack-best-value {
    background: linear-gradient(145deg, #4f46e5, #3730a3);
    border-color: rgba(129,140,248,0.4);
    color: #fff;
    box-shadow: 0 6px 20px rgba(79,70,229,0.4);
}

.recharge-pack-card.pack-best-value:hover {
    box-shadow: 0 10px 28px rgba(79,70,229,0.5);
}

.recharge-pack-card.pack-best-value .recharge-pack-label { background: rgba(255,255,255,0.2); color: #fff; }
.recharge-pack-card.pack-best-value .recharge-pack-off { color: #c7d2fe; }
.recharge-pack-card.pack-best-value .recharge-pack-coins { color: #fde047; }
.recharge-pack-card.pack-best-value .recharge-pack-price { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; }

/* Max – gold/premium */
.recharge-pack-card.pack-max {
    background: linear-gradient(145deg, #b45309, #92400e);
    border-color: rgba(251,191,36,0.5);
    color: #fff;
    box-shadow: 0 6px 20px rgba(180,83,9,0.4);
}

.recharge-pack-card.pack-max:hover {
    box-shadow: 0 10px 28px rgba(180,83,9,0.5);
}

.recharge-pack-card.pack-max .recharge-pack-label { background: rgba(253,224,71,0.25); color: #fef08a; }
.recharge-pack-card.pack-max .recharge-pack-off { color: #fef3c7; }
.recharge-pack-card.pack-max .recharge-pack-coins { color: #fde047; }
.recharge-pack-card.pack-max .recharge-pack-price { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1c1917; }

.recharge-pack-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.15);
}

.recharge-pack-card.pack-once .recharge-pack-label {
    background: rgba(255,255,255,0.25);
}

.recharge-pack-off {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 4px;
}

.recharge-pack-coins {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--premium);
    margin: 8px 0;
}

.recharge-pack-card.pack-once .recharge-pack-coins {
    color: #fff;
}

.recharge-pack-price {
    display: block;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    border: none;
    width: 100%;
    cursor: pointer;
}

.recharge-pack-card.pack-once .recharge-pack-price {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Payment method selection screen */
.payment-screen-overlay {
    position: fixed;
    inset: 0;
    z-index: 210;
    background: var(--bg);
    overflow-y: auto;
    padding: 0 16px 28px;
}

.payment-screen-overlay.hidden {
    display: none !important;
}

.payment-screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    padding: 0;
}

.payment-screen-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.payment-order-summary {
    background: linear-gradient(145deg, var(--surface-elevated), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.payment-summary-coins {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--premium);
    margin-bottom: 4px;
}

.payment-summary-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.payment-summary-name {
    font-size: 0.85rem;
    color: var(--muted);
}

.payment-methods-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.payment-method-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    background: var(--surface-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-method-card:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.08);
}

.payment-method-card.selected {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(99,102,241,0.2), rgba(79,70,229,0.15));
    box-shadow: 0 0 0 2px rgba(99,102,241,0.25);
}

.payment-method-card[data-method="upi"].selected { border-color: #0d9488; background: linear-gradient(145deg, rgba(13,148,136,0.2), rgba(20,184,166,0.15)); box-shadow: 0 0 0 2px rgba(13,148,136,0.3); }
.payment-method-card[data-method="card"].selected { border-color: #64748b; background: linear-gradient(145deg, rgba(100,116,139,0.2), rgba(71,85,105,0.15)); box-shadow: 0 0 0 2px rgba(100,116,139,0.3); }
.payment-method-card[data-method="razorpay"].selected { border-color: #f97316; background: linear-gradient(145deg, rgba(249,115,22,0.2), rgba(234,88,12,0.15)); box-shadow: 0 0 0 2px rgba(249,115,22,0.3); }
.payment-method-card[data-method="stripe"].selected { border-color: #6366f1; background: linear-gradient(145deg, rgba(99,102,241,0.25), rgba(79,70,229,0.2)); box-shadow: 0 0 0 2px rgba(99,102,241,0.35); }

.payment-method-icon {
    font-size: 1.75rem;
}

.payment-method-name {
    font-size: 0.95rem;
}

.payment-upi-options {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.payment-upi-options.hidden {
    display: none !important;
}

.payment-upi-options-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.payment-upi-apps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.payment-upi-app {
    padding: 12px 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-upi-app:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.06);
}

.payment-upi-app.selected {
    border-color: var(--primary);
    background: rgba(99,102,241,0.12);
    color: var(--primary);
}

.payment-pay-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius);
}

.payment-pay-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chat screen – red header, bubbles, input bar (reference UI) */
.chat-screen-overlay {
    position: fixed;
    inset: 0;
    z-index: 205;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-screen-overlay.hidden {
    display: none !important;
}

.chat-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 8px 0 12px;
    background: #c62828;
    color: #fff;
    flex-shrink: 0;
}

.chat-header-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
}

.chat-header-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.chat-header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.3);
}

.chat-header-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.chat-header-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-status {
    font-size: 0.65rem;
    opacity: 0.9;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-header-video-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 6px 8px;
}

.chat-header-video-btn .chat-icon-svg {
    width: 16px;
    height: 16px;
}

/* Chat media preview (WhatsApp-style) */
.chat-media-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.chat-media-preview.hidden {
    display: none !important;
}

.chat-media-preview-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.chat-media-preview-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.chat-media-preview-audio audio {
    width: 160px;
    height: 34px;
}

.chat-media-preview-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-media-preview-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-media-preview-sub {
    font-size: 0.7rem;
    color: var(--muted);
}

.chat-media-preview-progress {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0,0,0,0.12);
}

.chat-media-preview-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 120ms linear;
}

.chat-media-preview-cancel {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    color: var(--text);
    cursor: pointer;
}

.chat-bar-icon.recording {
    background: var(--danger);
    color: #fff;
}

.chat-audio {
    width: 220px;
    max-width: 100%;
    height: 34px;
}

body[data-theme="dark"] .chat-media-preview {
    background: var(--surface);
    border-color: var(--border);
}

body[data-theme="dark"] .chat-media-preview-progress {
    background: rgba(255,255,255,0.12);
}

body[data-theme="dark"] .chat-media-preview-cancel {
    background: rgba(255,255,255,0.12);
}

.chat-header-video-btn.hidden {
    display: none !important;
}

.chat-header-menu-wrap {
    position: relative;
}

.chat-header-menu {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.chat-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 10;
    padding: 6px 0;
}

.chat-menu-dropdown.hidden {
    display: none !important;
}

.chat-menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: #ffffff;
    text-align: left;
    font-size: 0.9rem;
    color: #1a1a1a;
    cursor: pointer;
}

.chat-menu-item:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

.chat-menu-item.hidden {
    display: none !important;
}

.chat-typing-indicator {
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
    padding: 4px 12px;
}

.chat-typing-indicator.hidden {
    display: none !important;
}

/* ----- Call offer: Outgoing (Ringing) ----- */
.chat-call-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #0f0f12 0%, #1a1a20 50%, #0d0d10 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.chat-call-overlay.hidden {
    display: none !important;
}

.chat-call-overlay-content {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    width: 100%;
    max-width: 360px;
}

.chat-call-avatar-wrap {
    position: relative;
    margin-bottom: 20px;
}

.chat-call-overlay-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.12);
    border: 3px solid rgba(255,255,255,0.2);
    display: block;
}

.chat-call-avatar-initial {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    background: var(--primary, #6366f1);
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
}

.chat-call-overlay-avatar[src=""],
.chat-call-overlay-avatar:not([src]) {
    visibility: hidden;
    position: absolute;
}

.chat-call-overlay-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
    letter-spacing: 0.02em;
}

.chat-call-overlay-status.ringing-text {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0 0 32px 0;
    animation: chat-ring-pulse 1.2s ease-in-out infinite;
}

.chat-call-overlay-charge {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f87171;
    margin: -18px 0 24px 0;
}

.chat-call-overlay-charge.hidden {
    display: none !important;
}

@keyframes chat-ring-pulse {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 0.6; }
}

.chat-call-btn-end {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #dc2626;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.45);
    transition: transform 0.15s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.chat-call-btn-end:active {
    transform: scale(0.94);
}

.chat-call-btn-end:hover {
    background: #b91c1c;
}

.chat-call-btn-icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* ----- Call offer: Incoming ----- */
.chat-incoming-call-popup {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 20px;
    box-sizing: border-box;
}

.chat-incoming-call-popup.hidden {
    display: none !important;
}

.chat-incoming-call-content {
    background: linear-gradient(180deg, #1e1e24 0%, #16161a 100%);
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
}

.chat-incoming-avatar-wrap {
    position: relative;
    margin: 0 auto 16px;
    width: 100px;
    height: 100px;
}

.chat-incoming-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.1);
    border: 3px solid rgba(255,255,255,0.15);
    display: block;
}

.chat-incoming-avatar-initial {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    background: var(--primary, #6366f1);
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.15);
}

.chat-incoming-avatar[src=""],
.chat-incoming-avatar:not([src]) {
    visibility: hidden;
    position: absolute;
}

.chat-incoming-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #fff;
}

.chat-incoming-sub {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    margin: 0 0 8px 0;
}

.chat-incoming-charge {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f87171;
    margin: 0 0 16px 0;
}

.chat-incoming-charge.hidden {
    display: none !important;
}

.chat-incoming-decline-details {
    margin-bottom: 20px;
    text-align: left;
}

.chat-incoming-decline-summary {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    list-style: none;
}

.chat-incoming-decline-summary::-webkit-details-marker { display: none; }

.chat-incoming-call-content .chat-decline-input {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.chat-incoming-call-content .chat-decline-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.chat-incoming-actions {
    display: flex;
    justify-content: center;
    gap: 32px;
    align-items: center;
}

.chat-incoming-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.chat-incoming-btn:active {
    transform: scale(0.94);
}

.chat-incoming-btn-icon {
    font-size: 1.4rem;
    line-height: 1;
    color: #fff;
}

.chat-incoming-btn.decline {
    background: #dc2626;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
}

.chat-incoming-btn.decline:hover {
    background: #b91c1c;
}

.chat-incoming-btn.accept {
    background: #22c55e;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

.chat-incoming-btn.accept:hover {
    background: #16a34a;
}


.chat-banner {
    padding: 10px 12px;
    border-radius: var(--radius);
    margin: 8px 12px;
    flex-shrink: 0;
}

.chat-friend-request-banner {
    background: linear-gradient(145deg, rgba(99,102,241,0.15), rgba(79,70,229,0.1));
    border: 1px solid rgba(99,102,241,0.3);
}

.chat-friend-request-banner p {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: var(--text);
}

.chat-banner-actions {
    display: flex;
    gap: 8px;
}

.chat-not-friends-banner {
    background: rgba(251,191,36,0.15);
    border: 1px solid rgba(251,191,36,0.35);
}

.chat-not-friends-banner p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text);
}

.chat-messages-wrap {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chat-message-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    flex-shrink: 0;
}

.chat-message {
    max-width: 78%;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-message.mine {
    align-self: flex-end;
    background: #dcf8c6;
    color: #1a1a1a;
    border-bottom-right-radius: 4px;
}

.chat-message.theirs {
    align-self: flex-start;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #e8e8e8;
    border-bottom-left-radius: 4px;
    align-items: flex-start;
}

.chat-message-text {
    width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    word-spacing: normal;
}

.chat-message-media {
    width: 100%;
    display: flex;
}

.chat-audio-bubble {
    width: 100%;
    max-width: none;
    min-height: 74px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    position: relative;
    flex-wrap: wrap;
}

.chat-message-audio.theirs .chat-audio-bubble::after {
    content: "";
    position: absolute;
    left: -7px;
    bottom: 10px;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    transform: rotate(45deg);
    background: rgba(255, 255, 255, 0.9);
    border-left: 1px solid rgba(220, 206, 236, 0.9);
    border-bottom: 1px solid rgba(220, 206, 236, 0.9);
}

.chat-message-audio.mine .chat-audio-bubble::after {
    content: "";
    position: absolute;
    right: -7px;
    bottom: 10px;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    transform: rotate(45deg);
    background: rgba(255, 255, 255, 0.88);
    border-right: 1px solid rgba(210, 182, 236, 0.82);
    border-top: 1px solid rgba(210, 182, 236, 0.82);
}

.chat-audio-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.chat-audio-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(164, 122, 219, 0.22);
    color: #6f4a9f;
    font-size: 1rem;
}

.chat-audio-native {
    display: none;
}

.chat-audio-play {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding-left: 2px;
    background: transparent;
}

.chat-audio-wave {
    flex: 1;
    min-width: 150px;
    height: 30px;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.chat-audio-wave::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(142, 112, 178, 0.16) 0 3px,
        rgba(142, 112, 178, 0.5) 3px 5px,
        transparent 5px 7px
    );
}

.chat-audio-wave-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: inherit;
    background: repeating-linear-gradient(
        90deg,
        rgba(173, 132, 236, 0.18) 0 3px,
        rgba(173, 132, 236, 0.9) 3px 5px,
        rgba(173, 132, 236, 0.18) 5px 7px
    );
    transition: width 100ms linear;
}

.chat-audio-len {
    font-size: 1rem;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
    border-radius: 14px;
    padding: 6px 10px;
}

.chat-message.mine .chat-audio-bubble {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(203, 173, 232, 0.74);
}

.chat-message.theirs .chat-audio-bubble {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(220, 206, 236, 0.9);
}

.chat-message.mine .chat-audio-play {
    color: #9a63df;
}

.chat-message.theirs .chat-audio-play {
    color: #8d5fd0;
}

.chat-message.mine .chat-audio-len {
    color: #6e4f93;
    background: rgba(255, 255, 255, 0.58);
}

.chat-message.theirs .chat-audio-len {
    color: #6e4f93;
    background: rgba(188, 157, 224, 0.18);
}

.chat-audio-bubble.is-playing .chat-audio-play {
    transform: scale(1.03);
}

.chat-message-audio {
    max-width: 94%;
    padding: 0;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.chat-audio-meta-inline {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    padding: 0 2px 0 64px;
}

.chat-audio-meta-inline .chat-message-time {
    font-size: 0.95rem;
    color: #6f578d;
    font-weight: 500;
}

.chat-audio-meta-inline .chat-ticks {
    margin-left: auto;
    font-size: 1rem;
}

.chat-message-audio .chat-message-meta {
    display: none !important;
}

.chat-message-audio.mine {
    align-items: flex-end;
}

.chat-message-audio.theirs {
    align-items: flex-start;
}

.chat-message-audio .chat-message-meta {
    margin-top: 8px;
    padding: 0 8px;
    border-radius: 0;
    background: transparent !important;
    gap: 8px;
    min-height: 20px;
}

.chat-message-audio .chat-message-time {
    font-size: 0.92rem;
}

.chat-message-audio .chat-ticks {
    font-size: 1rem;
}

.chat-message-audio.mine .chat-ticks {
    margin-left: auto;
}

.chat-image {
    width: 100%;
    max-width: 240px;
    height: auto;
    border-radius: 12px;
    display: block;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.chat-message-text.gift {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chat-gift-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 6px;
    flex: 0 0 auto;
}

.chat-gift-title {
    display: inline-block;
    min-width: 0;
}

.chat-gift-qty {
    font-size: 0.75rem;
    opacity: 0.85;
}

.chat-message-meta {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-message-time {
    font-size: 0.65rem;
    color: #888;
}

.chat-ticks {
    font-size: 0.85rem;
    color: #888;
}

.chat-message.mine .chat-ticks.seen {
    color: #34b7f1;
}

.chat-call-wrap {
    flex-shrink: 0;
    padding: 6px 12px;
    border-top: 1px solid #e0e0e0;
}

.chat-call-btn {
    width: 100%;
}

.chat-input-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px 12px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.chat-super-hi-pill {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(99,102,241,0.15);
    color: var(--primary);
    border: 1px solid rgba(99,102,241,0.4);
    cursor: pointer;
}

.chat-super-hi-pill.hidden {
    display: none !important;
}

.chat-input-field {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 22px;
    background: #f5f5f5;
    color: var(--text);
    font-size: 0.95rem;
}

.chat-bar-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-icon {
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
}

body[data-theme="dark"] .chat-screen-overlay {
    background: var(--bg);
}

body[data-theme="dark"] .chat-message.mine {
    background: rgba(99,102,241,0.35);
    color: #fff;
}

body[data-theme="dark"] .chat-message.theirs {
    background: var(--surface-elevated);
    border-color: var(--border);
    color: var(--text);
}

body[data-theme="dark"] .chat-input-bar {
    background: var(--surface);
    border-color: var(--border);
}

body[data-theme="dark"] .chat-input-field {
    background: var(--surface-elevated);
    border-color: var(--border);
}

.recharge-history-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.recharge-history-toggle .chevron {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.recharge-history-list-wrap.hidden {
    display: none !important;
}

.recharge-history-list-wrap.open .recharge-history-toggle .chevron {
    transform: rotate(180deg);
}

.recharge-history-list {
    list-style: none;
    margin: 0;
    padding: 12px 0 0;
}

.recharge-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.recharge-history-item .coins {
    font-weight: 700;
    color: var(--premium);
}

.recharge-history-item .date {
    color: var(--muted);
    font-size: 0.8rem;
}

.recharge-history-empty {
    text-align: center;
    color: var(--muted);
    padding: 16px 0;
    margin: 0;
    font-size: 0.9rem;
}

/* Daily check-in modal */
.checkin-modal {
    max-width: 380px;
    width: 100%;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.checkin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.checkin-close-x {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -4px -4px 0 0;
}

.checkin-close-x:hover {
    background: rgba(255, 255, 255, 0.15);
}

.checkin-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ec4899, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkin-desc {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0 0 20px 0;
}

.checkin-day-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.checkin-day-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.checkin-day-card.claimed {
    background: linear-gradient(145deg, rgba(99,102,241,0.35), rgba(79,70,229,0.28));
    border-color: rgba(99,102,241,0.5);
}

.checkin-day-card.is-today {
    background: linear-gradient(145deg, rgba(236,72,153,0.4), rgba(99,102,241,0.35));
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.35);
}

.checkin-day-card.locked {
    opacity: 0.6;
    background: var(--surface);
    border-color: var(--border);
}

.checkin-day-card .day-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 4px;
}

.checkin-day-card .day-coins {
    font-size: 1rem;
    font-weight: 800;
    color: var(--premium);
}

.btn-checkin {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.btn-checkin:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkin-already-msg {
    text-align: center;
    color: var(--success);
    font-weight: 600;
    margin: 0 0 12px 0;
    font-size: 0.9rem;
}

.checkin-already-msg.hidden {
    display: none !important;
}

/* Super message toast */
.super-message-toast {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1200;
}

.super-message-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Bottom nav – advanced mobile app style with fluid animations */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: linear-gradient(180deg, rgba(15, 10, 32, 0.3), rgba(15, 10, 32, 0.98));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 2px solid rgba(255, 51, 102, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 
        0 -12px 40px rgba(255, 51, 102, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .bottom-nav {
    background: linear-gradient(180deg, rgba(255, 248, 255, 0.3), rgba(255, 248, 255, 0.99));
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    padding: 0 8px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex: 1;
    min-height: 56px;
    outline: none;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.8);
}

.nav-item.active {
    color: #fff;
}

.nav-item-icon {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-icon-bg {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(168, 85, 247, 0.1));
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 0;
}

.nav-item.active .nav-icon-bg {
    opacity: 1;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.25), rgba(168, 85, 247, 0.2));
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.2);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 4px rgba(255, 51, 102, 0.2));
}

.nav-item:hover .nav-icon {
    transform: scale(1.1) translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(255, 51, 102, 0.3));
}

.nav-item.active .nav-icon {
    animation: nav-icon-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 12px rgba(255, 51, 102, 0.4));
}

@keyframes nav-icon-bounce {
    0% {
        transform: scale(0.6) translateY(8px);
        opacity: 0;
    }
    50% {
        transform: scale(1.15) translateY(-3px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.nav-item-label {
    transition: all 0.3s ease;
    opacity: 0.8;
}

.nav-item.active .nav-item-label {
    opacity: 1;
    font-weight: 800;
    letter-spacing: 0.08em;
    animation: label-slide-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes label-slide-up {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item-indicator {
    position: absolute;
    bottom: 2px;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent-1));
    border-radius: 999px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.4);
    opacity: 0;
}

.nav-item.active .nav-item-indicator {
    width: 24px;
    opacity: 1;
    animation: indicator-expand 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes indicator-expand {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 24px;
        opacity: 1;
    }
}

/* History screen */
.screen {
    display: none;
    flex: 1;
    flex-direction: column;
    width: 100%;
    animation: fadeIn 0.25s ease;
    min-height: 0;
}

.screen.active {
    display: flex;
    overflow: visible;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.screen-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ---------- History screen: rich, production-style ---------- */
.screen-history .history-header {
    margin-bottom: 20px;
}

.screen-history .history-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 4px 0;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .screen-history .history-title {
    background: linear-gradient(135deg, #111827 0%, #4b5563 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.history-subtitle {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

.history-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card-history {
    background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 18px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

body[data-theme="light"] .stat-card-history {
    background: linear-gradient(145deg, #fff 0%, rgba(248,250,252,0.95) 100%);
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.stat-card-history .stat-icon {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1rem;
    opacity: 0.5;
}

.stat-card-history .value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
    line-height: 1.2;
}

.stat-card-history .label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stats-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
}

.wallet-card .value {
    color: var(--premium);
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.history-item:hover {
    border-color: rgba(99,102,241,0.25);
    box-shadow: 0 4px 24px rgba(0,0,0,0.18), 0 0 0 1px rgba(99,102,241,0.08);
}

body[data-theme="light"] .history-item {
    background: linear-gradient(145deg, #fff 0%, rgba(248,250,252,0.98) 100%);
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

body[data-theme="light"] .history-item:hover {
    border-color: rgba(99,102,241,0.35);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 0 0 1px rgba(99,102,241,0.12);
}

.history-item-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.history-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}

.history-duration {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
}

.history-duration.duration-short {
    color: #f87171;
}

.history-duration.duration-mid {
    color: #fbbf24;
}

.history-duration.duration-long {
    color: #4ade80;
}

body[data-theme="light"] .history-duration.duration-short {
    color: #dc2626;
}

body[data-theme="light"] .history-duration.duration-mid {
    color: #d97706;
}

body[data-theme="light"] .history-duration.duration-long {
    color: #16a34a;
}

.history-ago {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}

.history-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.15), 0 4px 12px rgba(99,102,241,0.3);
}

.history-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-avatar .avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

/* ---------- Chats list screen (WhatsApp-style, rich theme) ---------- */
.screen-chat-list {
    flex-direction: column;
    min-height: 0;
}

.chat-list-header {
    margin-bottom: 16px;
    flex-shrink: 0;
}

.chat-list-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 4px 0;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .chat-list-title {
    background: linear-gradient(135deg, #111827 0%, #4b5563 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.chat-list-subtitle {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

.chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.chat-list-item {
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-list-item:hover {
    border-color: rgba(99,102,241,0.25);
    box-shadow: 0 4px 24px rgba(0,0,0,0.18), 0 0 0 1px rgba(99,102,241,0.08);
}

body[data-theme="light"] .chat-list-item {
    background: linear-gradient(145deg, #fff 0%, rgba(248,250,252,0.98) 100%);
    border-color: rgba(0,0,0,0.06);
}

body[data-theme="light"] .chat-list-item:hover {
    border-color: rgba(99,102,241,0.35);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 0 0 1px rgba(99,102,241,0.12);
}

.chat-list-item-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    min-width: 0;
}

.chat-list-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.15), 0 4px 12px rgba(99,102,241,0.3);
}

.chat-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-list-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

/* Avatar color variants (for initials – used by history & chat list) */
.avatar-color-0 {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}
.avatar-color-1 {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}
.avatar-color-2 {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
.avatar-color-3 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.avatar-color-4 {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}
.avatar-color-5 {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}
.avatar-color-6 {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
}
.avatar-color-7 {
    background: linear-gradient(135deg, #f97373 0%, #ef4444 100%);
}

.chat-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.chat-list-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-list-name-wrap {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 1;
}

.chat-list-name-wrap .chat-list-name {
    min-width: 0;
}

.chat-list-online-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88), 0 0 10px rgba(34, 197, 94, 0.58);
    flex-shrink: 0;
}

body:not([data-theme="light"]) .chat-list-online-dot {
    box-shadow: 0 0 0 2px rgba(36, 14, 60, 0.95), 0 0 12px rgba(34, 197, 94, 0.68);
}

.chat-list-time {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
    flex-shrink: 0;
}

.chat-list-preview {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.chat-list-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.chat-list-empty {
    text-align: center;
    padding: 48px 24px;
}

.chat-list-empty.hidden {
    display: none !important;
}

.chat-list-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.6;
}

.chat-list-empty-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.chat-list-empty-hint {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.history-avatar img ~ .avatar-initial {
    display: none;
}

.history-avatar img[style*="display: none"] ~ .avatar-initial,
.history-avatar img:not([src]) ~ .avatar-initial {
    display: flex !important;
}

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

.history-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.history-meta {
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 500;
}

.history-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.btn-history-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 999px; /* capsule look */
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.02em;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-history-action:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.28);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(15,23,42,0.4);
}

.btn-history-action[data-action="super"] {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(99,102,241,0.4);
}

.btn-history-action[data-action="super"]:hover {
    box-shadow: 0 4px 16px rgba(99,102,241,0.5);
}

body[data-theme="light"] .btn-history-action {
    border-color: rgba(0,0,0,0.08);
    background: rgba(0,0,0,0.03);
    color: var(--text);
}

body[data-theme="light"] .btn-history-action:hover {
    background: rgba(0,0,0,0.07);
}

.history-item .date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-item .duration {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.history-super-row {
    margin-bottom: 12px;
}

.btn-super-history {
    font-size: 0.85rem;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-super-history:hover {
    opacity: 0.95;
}

.history-empty {
    text-align: center;
    padding: 48px 24px;
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px dashed rgba(255,255,255,0.12);
}

.history-empty-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.history-empty-text {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px 0;
}

.history-empty-hint {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

body[data-theme="light"] .history-empty {
    background: linear-gradient(145deg, rgba(248,250,252,0.8) 0%, #fff 100%);
    border-color: rgba(0,0,0,0.08);
}

/* Settings screen */
.settings-group {
    margin-top: 20px;
    padding: 16px;
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.settings-group h3 {
    margin: 0 0 6px 0;
    font-size: 1rem;
}

.settings-hint {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.settings-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Auth pages – mobile app style */
.auth-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 20px;
    padding-top: max(24px, var(--safe-top));
    padding-bottom: max(24px, var(--safe-bottom));
}

.auth-box {
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
    padding: 28px 24px;
    background: var(--surface-elevated);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.auth-box h1 {
    margin: 0 0 24px 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.auth-box .form-group { margin-bottom: 18px; }

.auth-box label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-box input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    -webkit-appearance: none;
    appearance: none;
}

.auth-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.auth-box .btn { width: 100%; margin-top: 8px; }

.auth-box .error {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 8px;
}

.auth-box .link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.auth-box .link a { color: var(--primary); font-weight: 500; }

.auth-logo {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer {
    text-align: center;
    padding: 16px;
    color: var(--muted);
    font-size: 0.8rem;
}

/* Host dashboard & Career – same theme as app (no separate colors) */
.screen-host {
    width: 100%;
    max-width: 480px;
    align-self: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    padding: 0;
    margin: 0 auto;
    background: var(--bg);
    color: var(--text);
}
.screen-host .host-header,
.screen-career .host-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    margin-bottom: 8px;
    flex-shrink: 0;
    padding: 0 16px;
}
.screen-host .screen-header { color: var(--text); margin: 0; font-size: 1rem; }
.btn-back-inline {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text);
    padding: 4px 8px;
}
/* Profile block */
.host-profile-block {
    padding: 12px 16px;
    text-align: left;
}
.host-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.host-avatar-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.host-avatar,
.host-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-elevated);
}
.host-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--muted);
}
.host-avatar-placeholder.hidden { display: none !important; }
.host-avatar-edit {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-size: 0.9rem;
}

.host-profile-text { min-width: 0; }
.host-name { margin: 0; font-size: 1.05rem; font-weight: 750; color: var(--text); }
.host-username { margin: 2px 0 0 0; font-size: 0.78rem; color: var(--muted); }
/* Balance card – app theme */
.host-balance-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 16px 12px;
    padding: 12px 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.host-balance-card:hover { border-color: var(--primary); }
.host-balance-icon { font-size: 2.1rem; }
.host-balance-text { flex: 1; }
.host-balance-label { display: block; font-size: 0.75rem; color: var(--muted); }
.host-balance-value { font-size: 1.4rem; font-weight: 850; color: var(--text); }
.host-balance-chevron { font-size: 1.5rem; color: var(--muted); }
/* Menu list – app theme */
.host-menu-list {
    margin: 0 16px 12px;
    background: var(--surface-elevated);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.host-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.host-menu-item:last-child { border-bottom: none; }
.host-menu-item:hover { background: var(--surface); }
.host-menu-item.active { background: var(--surface); border-left: 3px solid var(--primary); }
.host-menu-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    background: var(--surface);
}
.host-menu-icon-orange { border: 1px solid var(--border); }
.host-menu-icon-blue { border: 1px solid var(--border); }
.host-menu-icon-teal { border: 1px solid var(--border); }
.host-menu-icon-gray { border: 1px solid var(--border); }
.host-menu-icon-purple { border: 1px solid var(--border); }
.host-menu-item span:nth-child(2) { flex: 1; font-weight: 600; font-size: 0.88rem; }
.host-menu-chevron { font-size: 1.1rem; color: var(--muted); }
.host-tabs-minimal { display: none; }
.host-tabs {
    display: none;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding: 0 16px 8px;
}
.host-tabs:not(.host-tabs-minimal) { display: flex; }
.host-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}
.host-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Host targets – progress card */
.host-target-card {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.host-target-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.host-target-title {
    font-size: 0.9rem;
    font-weight: 750;
    color: var(--text);
    line-height: 1.2;
}
.host-target-badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 750;
    color: var(--text);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    white-space: nowrap;
}
.host-target-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.76rem;
    color: var(--muted);
    margin-bottom: 6px;
}
.host-target-progress {
    height: 8px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}
.host-target-progress > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary);
}
.host-target-card.is-rewarded .host-target-progress > span {
    background: var(--success);
}
.host-target-reward {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.host-target-notes {
    font-size: 0.76rem;
    color: var(--muted);
}

/* Host lists – compact rich rows (transactions + calls) */
.host-list.host-list-rich {
    margin-bottom: 10px;
}
.host-list.host-list-rich li {
    border-bottom: none;
    padding: 0;
    margin: 0 0 10px 0;
}
.host-list.host-list-rich li:last-child {
    margin-bottom: 0;
}
.host-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.host-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.host-item-main {
    flex: 1;
    min-width: 0;
}
.host-item-title {
    font-size: 0.88rem;
    font-weight: 750;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.host-item-sub {
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.host-item-right {
    flex-shrink: 0;
    text-align: right;
}
.host-item-amt {
    font-size: 0.9rem;
    font-weight: 850;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.host-item-subright {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.host-achiever-period.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.host-tab-panel {
    margin: 0 16px 24px;
    padding: 20px;
    background: var(--surface-elevated);
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text);
}
.host-tab-panel.hidden { display: none !important; }
.host-form { padding: 0; }
.host-form .form-group { margin-bottom: 16px; }
.host-form label { display: block; font-size: 0.85rem; margin-bottom: 4px; color: var(--muted); }
.host-form input,
.host-form textarea,
.host-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
}
.host-form input::placeholder,
.host-form textarea::placeholder { color: var(--muted); }
.host-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.btn-edit-call-rate {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: var(--danger);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-edit-call-rate:hover { background: var(--danger-hover, #ef4444); }
.btn-save-changes {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: var(--success);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-save-changes:hover { background: #15803d; }
.host-bio-group textarea {
    min-height: 120px;
    max-height: 220px;
    resize: vertical;
    overflow-y: auto;
}
.host-form .form-hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
}
.host-rate-group .host-rate-current { margin: 0 0 10px 0; font-size: 0.9rem; color: var(--muted); }
.host-rate-request .sub { display: block; font-size: 0.8rem; margin-bottom: 6px; color: var(--muted); }
.host-rate-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.host-rate-inline input { width: 100px; }
.host-rate-msg { font-size: 0.9rem; margin-top: 8px; }
.host-rate-msg.error { color: var(--danger); }
.host-rate-msg.success { color: var(--success); }
.host-rate-pending {
    padding: 12px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid var(--premium);
    border-radius: var(--radius-sm);
    margin-top: 8px;
}
.host-rate-pending p { margin: 0; font-size: 0.9rem; }
.host-wallet-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.host-wallet-row { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--text); }
.host-wallet-row .label { color: var(--muted); }
.host-wallet-row .value { font-weight: 700; }
.host-list { list-style: none; padding: 0; margin: 0 0 12px 0; }
.host-list li {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text);
}
.host-hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }

/* Withdraw section – same theme, proper form layout */
.host-withdraw-form {
    margin-bottom: 24px;
}
.host-withdraw-form .host-hint {
    margin-bottom: 20px;
    line-height: 1.5;
}
.host-withdraw-form .form-group {
    margin-bottom: 18px;
}
.host-withdraw-form .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}
.host-withdraw-form .form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s;
}
.host-withdraw-form .form-group input::placeholder {
    color: var(--muted);
}
.host-withdraw-form .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}
.host-withdraw-submit {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 0;
    padding: 14px 20px;
    font-size: 1rem;
}
.host-list-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px 0;
}

/* Hide recent chats / chat list when on Profile or Host dashboard (same app, no duplicate chat section) */
body.on-profile-section .main .screen-chat-list,
body.on-host-section .main .screen-chat-list {
    display: none !important;
}

/* Call screen: friend request / accept / Friends badge */
.call-friends-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(34,197,94,0.9);
    color: #fff;
    border-radius: 10px;
}
.call-friends-badge.hidden { display: none !important; }
.call-friend-actions {
    position: absolute;
    top: calc(var(--safe-top, 0px) + 56px);
    left: 12px;
    bottom: auto;
    transform: none;
    z-index: 13;
    display: flex;
    gap: 8px;
}

body.in-call .call-friend-actions {
    top: calc(var(--safe-top, 0px) + 56px);
    left: 12px;
    bottom: auto;
}
.call-friend-actions.hidden { display: none !important; }
.btn-call-friend {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid rgba(241, 226, 255, 0.75);
    background: linear-gradient(135deg, rgba(183, 126, 241, 0.88), rgba(220, 140, 216, 0.85));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(101, 71, 149, 0.26);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body[data-theme="light"] .btn-call-friend {
    border-color: rgba(212, 180, 238, 0.78);
    background: linear-gradient(135deg, rgba(197, 141, 245, 0.92), rgba(234, 162, 223, 0.9));
    color: #ffffff;
}

.btn-call-friend.btn-accept {
    background: linear-gradient(135deg, rgba(41, 188, 124, 0.92), rgba(34, 197, 94, 0.9));
    border-color: rgba(179, 255, 216, 0.72);
}

/* ---------------------------------------------------------------------------
   Pro UI refresh: rich purple + light pink gradient system
--------------------------------------------------------------------------- */
.app {
    backdrop-filter: saturate(135%);
}

.header {
    background: linear-gradient(160deg, rgba(120, 48, 188, 0.46) 0%, rgba(242, 123, 210, 0.28) 100%);
    border: 1px solid rgba(236, 184, 255, 0.2);
    border-top: none;
    border-radius: 0 0 22px 22px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body[data-theme="light"] .header {
    background: linear-gradient(160deg, rgba(214, 148, 240, 0.28) 0%, rgba(255, 187, 229, 0.35) 100%);
    border-color: rgba(170, 108, 197, 0.26);
}

.header-title {
    background: linear-gradient(90deg, #ffe9ff 0%, #ffccf0 45%, #efd0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

body[data-theme="light"] .header-title {
    background: linear-gradient(90deg, #51186c 0%, #a5347f 48%, #7f33b4 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.status.online {
    background: rgba(65, 216, 161, 0.2);
    border: 1px solid rgba(65, 216, 161, 0.35);
}

.status.offline {
    background: rgba(255, 93, 145, 0.2);
    border: 1px solid rgba(255, 93, 145, 0.35);
}

.btn,
.btn-small,
.btn-filter,
.lobby-filter-btn,
.host-tab,
.payment-method-card,
.recharge-pack-card,
.btn-history-action {
    border-radius: 14px;
}

.btn-primary,
.btn-next {
    background: linear-gradient(130deg, #ff90cc 0%, #d56dff 48%, #a240ea 100%);
    color: #fff;
    box-shadow: 0 12px 26px rgba(171, 69, 226, 0.42);
}

.btn-primary:hover:not(:disabled),
.btn-next:hover:not(:disabled) {
    box-shadow: 0 16px 34px rgba(171, 69, 226, 0.5);
}

.btn-danger {
    background: linear-gradient(130deg, #ff6fa8 0%, #ff498c 100%);
}

.btn-outline,
.btn-small,
.btn-filter {
    background: var(--surface-elevated);
    border-color: var(--border);
    box-shadow: inset 0 0 0 1px rgba(255, 191, 237, 0.05);
}

.btn-coins {
    background: linear-gradient(130deg, rgba(255, 188, 126, 0.26) 0%, rgba(255, 140, 209, 0.22) 100%);
    border-color: rgba(255, 181, 198, 0.48);
    box-shadow: 0 8px 20px rgba(166, 80, 155, 0.22);
}

.lobby {
    background: transparent;
}

.lobby-ping-circle {
    border-color: rgba(251, 173, 240, 0.45);
    animation: lobby-ping-rich 2.5s ease-out infinite;
}

@keyframes lobby-ping-rich {
    0% {
        transform: scale(0.45);
        opacity: 0.85;
        border-color: rgba(250, 175, 243, 0.62);
    }
    100% {
        transform: scale(1.45);
        opacity: 0;
        border-color: rgba(250, 175, 243, 0.05);
    }
}

.lobby-tap-area {
    border: 1px solid rgba(254, 198, 239, 0.52);
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 175, 231, 0.62) 0%, rgba(255, 175, 231, 0) 52%),
        linear-gradient(150deg, rgba(181, 93, 255, 0.88) 0%, rgba(143, 66, 222, 0.92) 48%, rgba(255, 124, 194, 0.86) 100%);
    box-shadow: 0 22px 42px rgba(100, 33, 158, 0.52);
}

.lobby-tap-area:not(:disabled):hover {
    box-shadow: 0 26px 50px rgba(100, 33, 158, 0.58);
}

.lobby-tap-text,
.lobby-chat-count {
    color: #fff8ff;
}

.lobby-filter-btn {
    background: var(--surface-elevated);
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

.lobby-filter-btn:hover {
    background: rgba(92, 36, 144, 0.48);
    border-color: rgba(248, 186, 241, 0.55);
}

body[data-theme="light"] .lobby-filter-btn:hover {
    background: rgba(236, 194, 248, 0.55);
}

.video-wrapper,
.stat-card,
.settings-group,
.history-item,
.chat-list-item,
.host-menu-list,
.host-tab-panel,
.host-balance-card,
.payment-order-summary,
.payment-upi-options,
.checkin-modal,
.filter-modal,
.recharge-modal,
.chat-menu-dropdown,
.auth-box {
    border-color: var(--border);
    box-shadow: var(--shadow-card);
}

body[data-theme="light"] .video-wrapper,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .settings-group,
body[data-theme="light"] .history-item,
body[data-theme="light"] .chat-list-item,
body[data-theme="light"] .host-menu-list,
body[data-theme="light"] .host-tab-panel,
body[data-theme="light"] .host-balance-card,
body[data-theme="light"] .payment-order-summary,
body[data-theme="light"] .payment-upi-options,
body[data-theme="light"] .checkin-modal,
body[data-theme="light"] .filter-modal,
body[data-theme="light"] .recharge-modal,
body[data-theme="light"] .chat-menu-dropdown,
body[data-theme="light"] .auth-box {
    box-shadow: var(--shadow-card);
}

.remote-peer {
    background: linear-gradient(145deg, rgba(33, 11, 56, 0.64) 0%, rgba(98, 45, 146, 0.6) 100%);
    border: 1px solid rgba(255, 194, 240, 0.4);
}

.call-top-bar {
    background: linear-gradient(145deg, rgba(30, 8, 50, 0.58) 0%, rgba(103, 43, 162, 0.52) 100%);
    border-color: rgba(255, 196, 236, 0.4);
    box-shadow: 0 8px 24px rgba(32, 9, 60, 0.35);
}

.room-overlay.room-actions {
    background: linear-gradient(to top, rgba(29, 7, 46, 0.84) 0%, rgba(72, 32, 112, 0.42) 52%, transparent 100%);
}

.btn-call-glass,
.btn-call-next {
    background: linear-gradient(145deg, rgba(83, 36, 130, 0.56) 0%, rgba(236, 126, 215, 0.34) 100%);
    border-color: rgba(255, 203, 238, 0.5);
    color: #fff6ff;
}

.btn-call-glass:hover,
.btn-call-next:hover {
    background: linear-gradient(145deg, rgba(103, 46, 161, 0.72) 0%, rgba(244, 135, 220, 0.5) 100%);
    border-color: rgba(255, 226, 245, 0.72);
}

.btn-call-end,
.chat-call-btn-end,
.chat-incoming-btn.decline {
    background: linear-gradient(145deg, #ff6cab 0%, #ff4f8d 100%);
    box-shadow: 0 12px 28px rgba(206, 51, 126, 0.48);
}

.btn-call-end:hover,
.chat-call-btn-end:hover,
.chat-incoming-btn.decline:hover {
    background: linear-gradient(145deg, #ff4f8d 0%, #f03677 100%);
}

.btn-call-report {
    background: linear-gradient(145deg, rgba(255, 102, 154, 0.44) 0%, rgba(197, 71, 132, 0.44) 100%);
    border-color: rgba(255, 165, 201, 0.62);
}

.chat-screen-overlay,
.recharge-screen-overlay,
.payment-screen-overlay {
    background:
        radial-gradient(100% 72% at 90% 6%, rgba(217, 138, 255, 0.25) 0%, rgba(217, 138, 255, 0) 65%),
        radial-gradient(110% 68% at 8% 1%, rgba(255, 177, 232, 0.32) 0%, rgba(255, 177, 232, 0) 62%),
        linear-gradient(175deg, #1d0a33 0%, #1a0830 38%, #140524 100%);
}

body[data-theme="light"] .chat-screen-overlay,
body[data-theme="light"] .recharge-screen-overlay,
body[data-theme="light"] .payment-screen-overlay {
    background:
        radial-gradient(100% 72% at 90% 6%, rgba(209, 166, 255, 0.42) 0%, rgba(209, 166, 255, 0) 65%),
        radial-gradient(100% 66% at 8% 1%, rgba(255, 194, 235, 0.54) 0%, rgba(255, 194, 235, 0) 62%),
        linear-gradient(175deg, #fff4fc 0%, #fdf0ff 38%, #fff7ff 100%);
}

.chat-header {
    background: linear-gradient(140deg, rgba(204, 82, 181, 0.95) 0%, rgba(159, 63, 223, 0.96) 100%);
    border-bottom: 1px solid rgba(255, 218, 247, 0.35);
    box-shadow: 0 10px 24px rgba(98, 35, 153, 0.35);
}

.chat-menu-dropdown {
    background: var(--surface-elevated);
}

.chat-menu-item {
    background: transparent;
    color: var(--text);
}

.chat-menu-item:hover {
    background: rgba(214, 144, 245, 0.16);
    color: var(--text);
}

.chat-message.mine {
    background: linear-gradient(140deg, #e88dff 0%, #bb5eec 50%, #ff7ebf 100%);
    color: #fff;
}

.chat-message.theirs {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text);
}

.chat-input-bar {
    background: var(--surface-elevated);
    border-top: 1px solid var(--border);
}

.chat-input-field {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.chat-super-hi-pill {
    background: linear-gradient(140deg, rgba(227, 150, 255, 0.3) 0%, rgba(252, 161, 221, 0.28) 100%);
    border-color: rgba(233, 161, 248, 0.55);
    color: var(--text);
}

.chat-call-overlay {
    background: linear-gradient(180deg, #250a3d 0%, #18062b 56%, #130422 100%);
}

.chat-incoming-call-popup {
    background: rgba(23, 6, 38, 0.82);
}

.chat-incoming-call-content {
    background: linear-gradient(170deg, rgba(61, 22, 98, 0.95) 0%, rgba(40, 13, 67, 0.94) 100%);
    border: 1px solid rgba(255, 202, 240, 0.28);
}

.chat-incoming-charge {
    color: #ffc4dd;
}

.chat-incoming-btn.accept {
    background: linear-gradient(145deg, #57d9a6 0%, #29b887 100%);
    box-shadow: 0 4px 16px rgba(37, 174, 126, 0.45);
}

.chat-call-overlay-avatar,
.chat-incoming-avatar {
    border-color: rgba(255, 202, 238, 0.32);
}

.chat-call-avatar-initial,
.chat-incoming-avatar-initial {
    background: linear-gradient(145deg, #d472ff 0%, #ff88cc 100%);
}

.recharge-pack-card {
    background: linear-gradient(145deg, rgba(70, 27, 112, 0.9) 0%, rgba(153, 68, 193, 0.88) 100%);
    border-color: rgba(255, 214, 244, 0.34);
    color: #fff;
}

.recharge-pack-card.pack-once {
    background: linear-gradient(145deg, #d45dff 0%, #8b3fe2 54%, #ff86cd 100%);
}

.recharge-pack-card.pack-basic {
    background: linear-gradient(145deg, #6e39c1 0%, #4e268f 100%);
    border-color: rgba(227, 180, 255, 0.42);
    color: #f4e6ff;
}

.recharge-pack-card.pack-hot {
    background: linear-gradient(145deg, #ff8bc7 0%, #cc50a0 100%);
    border-color: rgba(255, 205, 229, 0.52);
}

.recharge-pack-card.pack-popular {
    background: linear-gradient(145deg, #ca7eff 0%, #8e4adb 100%);
    border-color: rgba(222, 191, 255, 0.5);
}

.recharge-pack-card.pack-best-value {
    background: linear-gradient(145deg, #f58cd0 0%, #b657de 100%);
    border-color: rgba(255, 206, 236, 0.52);
}

.recharge-pack-card.pack-max {
    background: linear-gradient(145deg, #ffb1ca 0%, #d96bf5 100%);
    border-color: rgba(255, 221, 235, 0.62);
    color: #fff;
}

.recharge-pack-card.pack-max .recharge-pack-price {
    color: #fff;
}

.payment-method-card {
    background: var(--surface-elevated);
    border-color: var(--border);
}

.payment-method-card.selected {
    border-color: rgba(234, 173, 255, 0.85);
    background: linear-gradient(145deg, rgba(222, 146, 255, 0.3) 0%, rgba(255, 174, 225, 0.28) 100%);
    box-shadow: 0 0 0 2px rgba(225, 157, 247, 0.36);
}

.payment-method-card[data-method="upi"].selected {
    border-color: #da8dff;
    background: linear-gradient(145deg, rgba(183, 114, 241, 0.32) 0%, rgba(248, 167, 222, 0.22) 100%);
    box-shadow: 0 0 0 2px rgba(216, 133, 247, 0.3);
}

.payment-method-card[data-method="card"].selected {
    border-color: #b882ee;
    background: linear-gradient(145deg, rgba(182, 127, 232, 0.26) 0%, rgba(226, 182, 247, 0.24) 100%);
    box-shadow: 0 0 0 2px rgba(184, 134, 234, 0.28);
}

.payment-method-card[data-method="razorpay"].selected {
    border-color: #f291cb;
    background: linear-gradient(145deg, rgba(242, 145, 203, 0.3) 0%, rgba(216, 109, 186, 0.2) 100%);
    box-shadow: 0 0 0 2px rgba(241, 143, 201, 0.3);
}

.payment-method-card[data-method="stripe"].selected {
    border-color: #d179ff;
    background: linear-gradient(145deg, rgba(209, 121, 255, 0.3) 0%, rgba(244, 154, 217, 0.24) 100%);
    box-shadow: 0 0 0 2px rgba(209, 121, 255, 0.34);
}

.checkin-title {
    background: linear-gradient(135deg, #ffa7d7 0%, #cf71ff 54%, #9e54eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.bottom-nav {
    background:
        radial-gradient(120% 90% at 50% -12%, rgba(235, 144, 255, 0.34) 0%, rgba(235, 144, 255, 0) 52%),
        linear-gradient(180deg, rgba(47, 14, 74, 0.9) 0%, rgba(26, 8, 45, 0.96) 100%);
    border-top: 1px solid rgba(236, 181, 255, 0.25);
    box-shadow: 0 -8px 24px rgba(33, 9, 58, 0.32);
}

body[data-theme="light"] .bottom-nav {
    background:
        radial-gradient(120% 90% at 50% -12%, rgba(228, 168, 255, 0.35) 0%, rgba(228, 168, 255, 0) 52%),
        linear-gradient(180deg, rgba(255, 240, 252, 0.94) 0%, rgba(255, 250, 255, 0.96) 100%);
    border-top-color: rgba(192, 137, 215, 0.33);
    box-shadow: 0 -8px 22px rgba(210, 166, 230, 0.32);
}

.nav-item.active {
    color: #ffb1da;
}

body[data-theme="light"] .nav-item.active {
    color: #a93fda;
}

.nav-item.active::before {
    background: linear-gradient(90deg, #ff90cc 0%, #c56bff 100%);
}

.auth-screen {
    background:
        radial-gradient(95% 70% at 10% 4%, rgba(255, 188, 233, 0.42) 0%, rgba(255, 188, 233, 0) 56%),
        radial-gradient(100% 70% at 90% 8%, rgba(203, 149, 255, 0.34) 0%, rgba(203, 149, 255, 0) 62%),
        linear-gradient(168deg, #210b3c 0%, #160628 100%);
}

body[data-theme="light"] .auth-screen {
    background:
        radial-gradient(95% 70% at 10% 4%, rgba(255, 202, 237, 0.58) 0%, rgba(255, 202, 237, 0) 56%),
        radial-gradient(100% 70% at 90% 8%, rgba(212, 182, 255, 0.48) 0%, rgba(212, 182, 255, 0) 62%),
        linear-gradient(168deg, #fff4fd 0%, #fef3ff 100%);
}

.auth-box {
    background: var(--surface-elevated);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-logo {
    background: linear-gradient(135deg, #ff9cd2 0%, #d27bff 54%, #ad4ce8 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.auth-box input {
    background: var(--surface);
    border-color: var(--border);
}

.screen-host,
.screen-career {
    background: transparent;
}

.host-menu-item.active {
    background: rgba(212, 137, 250, 0.18);
    border-left: 3px solid #d675ff;
}

.btn-edit-call-rate {
    background: linear-gradient(140deg, #ff7ab8 0%, #ff4f94 100%);
}

.btn-save-changes {
    background: linear-gradient(140deg, #57d9a6 0%, #2fb886 100%);
}

.avatar-color-0 { background: linear-gradient(135deg, #d06fff 0%, #a843ec 100%); }
.avatar-color-1 { background: linear-gradient(135deg, #ff8ec7 0%, #d55bab 100%); }
.avatar-color-2 { background: linear-gradient(135deg, #9c6bff 0%, #6f47de 100%); }
.avatar-color-3 { background: linear-gradient(135deg, #ff9db8 0%, #ff6e95 100%); }
.avatar-color-4 { background: linear-gradient(135deg, #f4a5ff 0%, #c967ff 100%); }
.avatar-color-5 { background: linear-gradient(135deg, #d285ff 0%, #9961e4 100%); }
.avatar-color-6 { background: linear-gradient(135deg, #ffb4d6 0%, #f07fc9 100%); }
.avatar-color-7 { background: linear-gradient(135deg, #ff8dbb 0%, #d85df0 100%); }

.modal-overlay {
    background: rgba(25, 6, 40, 0.78);
}

@media (min-width: 768px) {
    .app {
        max-width: 520px;
        margin-top: 14px;
        min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 72px);
    }

    .bottom-nav {
        max-width: 520px;
        border-radius: 18px 18px 0 0;
    }
}

/* ---------------------------------------------------------------------------
   Refinement: deeper dark theme + app-style auth screens
--------------------------------------------------------------------------- */
body:not([data-theme="light"]) {
    color-scheme: dark;
}

body:not([data-theme="light"]) {
    background:
        radial-gradient(125% 100% at 10% 4%, rgba(248, 137, 216, 0.3) 0%, rgba(248, 137, 216, 0) 54%),
        radial-gradient(120% 100% at 92% 0%, rgba(190, 120, 255, 0.3) 0%, rgba(190, 120, 255, 0) 58%),
        linear-gradient(170deg, #1a072d 0%, #10031d 46%, #0c0216 100%);
}

body:not([data-theme="light"]) .header {
    background:
        linear-gradient(158deg, rgba(106, 41, 165, 0.55) 0%, rgba(211, 96, 184, 0.36) 100%);
    border: 1px solid rgba(243, 187, 255, 0.24);
    border-top: none;
    box-shadow: 0 16px 34px rgba(22, 5, 38, 0.56);
}

body:not([data-theme="light"]) .header-title {
    background: linear-gradient(90deg, #ffeefe 0%, #ffd5ee 44%, #f0d0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body:not([data-theme="light"]) .btn-primary,
body:not([data-theme="light"]) .btn-next {
    background: linear-gradient(132deg, #ff96d0 0%, #d36af8 48%, #9b45df 100%);
    box-shadow: 0 14px 30px rgba(146, 55, 204, 0.48);
}

body:not([data-theme="light"]) .btn-primary:hover:not(:disabled),
body:not([data-theme="light"]) .btn-next:hover:not(:disabled) {
    box-shadow: 0 16px 36px rgba(146, 55, 204, 0.56);
}

body:not([data-theme="light"]) .lobby-tap-area {
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 184, 235, 0.72) 0%, rgba(255, 184, 235, 0) 54%),
        linear-gradient(150deg, rgba(176, 91, 255, 0.95) 0%, rgba(130, 62, 214, 0.96) 48%, rgba(255, 128, 198, 0.92) 100%);
    border: 1px solid rgba(255, 213, 244, 0.56);
    box-shadow: 0 28px 52px rgba(61, 20, 100, 0.58);
}

body:not([data-theme="light"]) .lobby-filter-btn {
    background: linear-gradient(145deg, rgba(76, 32, 122, 0.7) 0%, rgba(53, 21, 86, 0.76) 100%);
    border-color: rgba(239, 190, 255, 0.28);
}

body:not([data-theme="light"]) .settings-group,
body:not([data-theme="light"]) .stat-card,
body:not([data-theme="light"]) .history-item,
body:not([data-theme="light"]) .chat-list-item,
body:not([data-theme="light"]) .host-menu-list,
body:not([data-theme="light"]) .host-tab-panel,
body:not([data-theme="light"]) .host-balance-card,
body:not([data-theme="light"]) .checkin-modal,
body:not([data-theme="light"]) .filter-modal,
body:not([data-theme="light"]) .recharge-modal,
body:not([data-theme="light"]) .payment-order-summary,
body:not([data-theme="light"]) .payment-upi-options,
body:not([data-theme="light"]) .auth-box {
    background: linear-gradient(152deg, rgba(59, 24, 94, 0.78) 0%, rgba(38, 15, 62, 0.84) 100%);
    border-color: rgba(239, 190, 255, 0.24);
    box-shadow: 0 18px 38px rgba(20, 4, 35, 0.52);
}

body:not([data-theme="light"]) .history-item:hover,
body:not([data-theme="light"]) .chat-list-item:hover {
    border-color: rgba(245, 180, 255, 0.44);
    box-shadow: 0 20px 42px rgba(22, 5, 39, 0.56), 0 0 0 1px rgba(225, 148, 255, 0.18);
}

body:not([data-theme="light"]) .chat-screen-overlay,
body:not([data-theme="light"]) .recharge-screen-overlay,
body:not([data-theme="light"]) .payment-screen-overlay {
    background:
        radial-gradient(105% 74% at 89% 4%, rgba(206, 132, 255, 0.3) 0%, rgba(206, 132, 255, 0) 64%),
        radial-gradient(110% 70% at 10% 0%, rgba(255, 176, 229, 0.32) 0%, rgba(255, 176, 229, 0) 62%),
        linear-gradient(172deg, #17052a 0%, #0f031c 100%);
}

body:not([data-theme="light"]) .chat-header {
    background: linear-gradient(138deg, rgba(208, 83, 177, 0.94) 0%, rgba(151, 63, 216, 0.96) 100%);
    border-bottom: 1px solid rgba(255, 220, 247, 0.36);
}

body:not([data-theme="light"]) .chat-message.mine {
    background: linear-gradient(140deg, #ee94ff 0%, #c260f1 50%, #ff82bf 100%);
}

body:not([data-theme="light"]) .chat-message.theirs {
    background: linear-gradient(145deg, rgba(70, 30, 109, 0.82) 0%, rgba(51, 22, 82, 0.9) 100%);
}

body:not([data-theme="light"]) .chat-input-bar {
    background: rgba(35, 13, 58, 0.88);
    border-top-color: rgba(239, 190, 255, 0.26);
}

body:not([data-theme="light"]) .chat-input-field {
    background: rgba(84, 38, 130, 0.42);
    border-color: rgba(239, 190, 255, 0.26);
}

body:not([data-theme="light"]) .bottom-nav {
    background:
        radial-gradient(120% 90% at 50% -12%, rgba(241, 142, 255, 0.38) 0%, rgba(241, 142, 255, 0) 53%),
        linear-gradient(180deg, rgba(42, 12, 67, 0.96) 0%, rgba(20, 6, 34, 0.98) 100%);
    border-top-color: rgba(239, 190, 255, 0.24);
    box-shadow: 0 -10px 28px rgba(17, 4, 29, 0.5);
}

body:not([data-theme="light"]) .nav-item.active {
    color: #ffc1e2;
}

/* App-style login/register screens */
body.auth-page {
    padding: 0;
    min-height: 100dvh;
}

body.auth-page .auth-screen {
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: max(22px, var(--safe-top)) 16px max(24px, var(--safe-bottom));
    background:
        radial-gradient(92% 62% at 8% 2%, rgba(255, 179, 228, 0.44) 0%, rgba(255, 179, 228, 0) 58%),
        radial-gradient(90% 62% at 92% 4%, rgba(201, 146, 255, 0.38) 0%, rgba(201, 146, 255, 0) 62%),
        linear-gradient(170deg, #1b062f 0%, #110420 100%);
}

body.auth-page .auth-screen::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    top: -130px;
    right: -120px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 168, 222, 0.5) 0%, rgba(255, 168, 222, 0) 72%);
    pointer-events: none;
}

body.auth-page .auth-screen::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    left: -140px;
    bottom: -150px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(181, 126, 255, 0.46) 0%, rgba(181, 126, 255, 0) 72%);
    pointer-events: none;
}

body.auth-page .auth-box {
    position: relative;
    z-index: 1;
    width: min(100%, 390px);
    margin: 0 auto;
    padding: 8px 2px 0;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.auth-page .auth-box::before {
    display: none;
}

body.auth-page .auth-logo {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0 auto 12px;
    padding: 0;
    border-radius: 0;
    border: none;
    background: none;
    color: #ffe9f8;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    -webkit-text-fill-color: initial;
}

body.auth-page .auth-box h1 {
    margin: 0 0 18px 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff2ff;
    text-align: center;
}

body.auth-page .auth-box label {
    color: #e9c6f5;
    font-size: 0.83rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

body.auth-page .auth-box input {
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(250, 206, 255, 0.28);
    background: rgba(84, 36, 130, 0.42);
    color: #fff2ff;
}

body.auth-page .auth-box input::placeholder {
    color: rgba(241, 212, 255, 0.58);
}

body.auth-page .auth-box input:focus {
    border-color: rgba(255, 205, 240, 0.74);
    box-shadow: 0 0 0 3px rgba(216, 125, 255, 0.24);
}

body.auth-page .auth-box .btn {
    min-height: 52px;
    margin-top: 10px;
    border-radius: 14px;
}

body.auth-page .auth-box .error {
    color: #ff9fc4;
}

body.auth-page .auth-box .link {
    margin-top: 16px;
    color: #e2b8f2;
}

body.auth-page .auth-box .link a {
    color: #ffc7e6;
    font-weight: 700;
    text-decoration: none;
}

body.auth-page .auth-box .link a:hover {
    text-decoration: underline;
}

@media (max-width: 420px) {
    body.auth-page .auth-box {
        border-radius: 0;
        padding: 8px 0 0;
    }

    body.auth-page .auth-box h1 {
        font-size: 1.4rem;
    }
}

/* ---------------------------------------------------------------------------
   Pro call UX: full-screen call + full-screen call offers
--------------------------------------------------------------------------- */
.room {
    z-index: 1300;
    background:
        radial-gradient(110% 84% at 90% 2%, rgba(180, 116, 255, 0.2) 0%, rgba(180, 116, 255, 0) 58%),
        radial-gradient(110% 84% at 6% 1%, rgba(255, 166, 223, 0.22) 0%, rgba(255, 166, 223, 0) 58%),
        #05020a;
}

.chat-call-overlay,
.chat-incoming-call-popup {
    position: fixed;
    inset: 0;
    z-index: 1800;
    padding: max(20px, var(--safe-top)) 20px max(24px, var(--safe-bottom));
    box-sizing: border-box;
    background:
        radial-gradient(95% 64% at 8% 2%, rgba(255, 167, 222, 0.28) 0%, rgba(255, 167, 222, 0) 56%),
        radial-gradient(95% 68% at 90% 4%, rgba(189, 128, 255, 0.28) 0%, rgba(189, 128, 255, 0) 58%),
        linear-gradient(170deg, #160426 0%, #0e0318 100%);
}

.chat-call-overlay-content,
.chat-incoming-call-content {
    width: min(100%, 460px);
    margin: 0 auto;
    min-height: calc(100vh - max(20px, var(--safe-top)) - max(24px, var(--safe-bottom)));
    min-height: calc(100dvh - max(20px, var(--safe-top)) - max(24px, var(--safe-bottom)));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 8px;
}

.chat-call-avatar-wrap,
.chat-incoming-avatar-wrap {
    margin-bottom: 10px;
}

.chat-call-overlay-avatar,
.chat-incoming-avatar {
    width: 132px;
    height: 132px;
    border: 2px solid rgba(255, 226, 248, 0.36);
    box-shadow: 0 16px 32px rgba(9, 2, 18, 0.58);
}

.chat-call-avatar-initial,
.chat-incoming-avatar-initial {
    font-size: 2.8rem;
    border: 2px solid rgba(255, 226, 248, 0.36);
}

.chat-call-overlay-name,
.chat-incoming-name {
    font-size: 1.55rem;
    letter-spacing: -0.02em;
    margin: 0;
}

.chat-call-overlay-status.ringing-text,
.chat-incoming-sub {
    font-size: 1rem;
    margin: 0 0 6px 0;
    color: rgba(255, 234, 251, 0.82);
}

.chat-incoming-charge {
    margin: 0 0 10px 0;
    color: #ffd2e6;
}

.chat-incoming-decline-details {
    width: min(100%, 350px);
    margin: 6px 0 10px 0;
}

.chat-incoming-call-content .chat-decline-input {
    border: 1px solid rgba(255, 218, 247, 0.32);
    background: rgba(88, 37, 136, 0.34);
}

.chat-incoming-actions {
    gap: 40px;
    margin-top: 2px;
}

.chat-call-btn-end,
.chat-incoming-btn {
    width: 72px;
    height: 72px;
}

.chat-incoming-btn.accept {
    background: linear-gradient(145deg, #57d9a6 0%, #2ab887 100%);
}

/* ---------------------------------------------------------------------------
   Chat readability refinement: bubble contrast + multiline input
--------------------------------------------------------------------------- */
.chat-message {
    border: 1px solid transparent;
    border-radius: 16px;
}

.chat-message.mine {
    background: linear-gradient(145deg, #b84de7 0%, #9738d4 55%, #7f2bb8 100%);
    border-color: rgba(245, 196, 255, 0.25);
    color: #fff6ff;
}

.chat-message.theirs {
    background: linear-gradient(145deg, #ffe9f6 0%, #ffdff2 100%);
    border-color: rgba(190, 119, 190, 0.28);
    color: #3f0f49;
}

.chat-message-meta {
    margin-top: 4px;
    gap: 6px;
    padding: 1px 6px;
    border-radius: 999px;
}

.chat-message.mine .chat-message-meta {
    background: rgba(255, 255, 255, 0.16);
}

.chat-message.theirs .chat-message-meta {
    background: rgba(168, 84, 160, 0.14);
}

.chat-message-time {
    font-size: 0.7rem;
    font-weight: 600;
}

.chat-message.mine .chat-message-time {
    color: rgba(255, 242, 250, 0.95);
}

.chat-message.theirs .chat-message-time {
    color: #7b3f7d;
}

.chat-ticks {
    font-size: 0.8rem;
    font-weight: 700;
}

.chat-message.mine .chat-ticks {
    color: rgba(255, 242, 250, 0.95);
}

.chat-message.mine .chat-ticks.seen {
    color: #b8f0ff;
}

body:not([data-theme="light"]) .chat-message.theirs {
    background: linear-gradient(145deg, #fff0fa 0%, #ffe7f7 100%);
    color: #3f0f49;
}

.chat-input-bar {
    align-items: flex-end;
}

.chat-input-field {
    display: block;
    min-height: 44px;
    max-height: 140px;
    line-height: 1.35;
    resize: none;
    overflow-y: hidden;
    white-space: pre-wrap;
    word-break: break-word;
    padding-top: 10px;
    padding-bottom: 10px;
}

.chat-input-field:focus {
    outline: none;
    border-color: rgba(223, 135, 246, 0.72);
    box-shadow: 0 0 0 3px rgba(215, 126, 246, 0.2);
}

.chat-send-icon {
    flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Reference-driven UI blocks: profile, VIP, language, ranking, referral, gifts
--------------------------------------------------------------------------- */
.screen-profile-rich {
    gap: 14px;
    padding-bottom: 8px;
}

.profile-rich-hero {
    background: linear-gradient(165deg, rgba(99, 55, 145, 0.78) 0%, rgba(62, 27, 98, 0.86) 100%);
    border: 1px solid rgba(246, 206, 255, 0.2);
    border-radius: 22px;
    padding: 16px;
}

body[data-theme="light"] .profile-rich-hero {
    background: linear-gradient(165deg, rgba(176, 126, 222, 0.32) 0%, rgba(226, 176, 242, 0.36) 100%);
    border-color: rgba(167, 123, 214, 0.3);
}

.profile-rich-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-rich-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 2px solid rgba(245, 194, 255, 0.36);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.14);
}

.profile-rich-user-text {
    flex: 1;
    min-width: 0;
}

.profile-rich-title {
    margin: 0 0 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-rich-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.profile-rich-username {
    margin: 3px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.profile-rich-edit {
    white-space: nowrap;
}

.profile-rich-stats {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.profile-rich-stats div {
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px 6px;
}

.profile-rich-stats strong {
    display: block;
    font-size: 0.96rem;
    margin-bottom: 4px;
}

.profile-rich-stats span {
    display: block;
    font-size: 0.68rem;
    color: var(--muted);
}

.profile-rich-card,
.profile-rich-grid-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
}

.profile-rich-coins-main {
    width: 100%;
    border: none;
    background: linear-gradient(130deg, #ff9a16 0%, #ff7a00 100%);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    cursor: pointer;
}

.coin-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.coin-icon-svg {
    width: 19px;
    height: 19px;
    color: #ffffff;
}

.coin-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.coin-label {
    font-size: 0.76rem;
    font-weight: 600;
    opacity: 0.92;
}

.coin-value {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.05;
}

.coin-go {
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-rich-coins-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.profile-rich-link-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-rich-link-btn {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 12px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
}

.profile-rich-link-btn span {
    color: var(--muted);
    font-weight: 700;
}

.profile-rich-grid-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body[data-theme="light"] .profile-rich-card,
body[data-theme="light"] .profile-rich-grid-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(167, 123, 214, 0.26);
}

body[data-theme="light"] .profile-rich-stats div {
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(167, 123, 214, 0.28);
}

body[data-theme="light"] .profile-rich-title,
body[data-theme="light"] .profile-rich-username,
body[data-theme="light"] .settings-hint {
    color: #6c4f8a;
}

body[data-theme="light"] .profile-rich-name {
    color: #2b113f;
}

body[data-theme="light"] .profile-rich-stats span {
    color: #7a5a99;
}

body[data-theme="light"] .profile-rich-link-btn {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(167, 123, 214, 0.24);
}

body[data-theme="light"] .profile-rich-coins-main {
    box-shadow: 0 8px 20px rgba(255, 122, 0, 0.22);
}

body[data-theme="light"] .profile-rich-coins-actions .btn-outline {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(167, 123, 214, 0.28);
    color: #341255;
}

body[data-theme="light"] .profile-rich-coins-actions .btn-primary {
    background: linear-gradient(130deg, #ff78b8 0%, #d566ff 55%, #a340ea 100%);
    color: #ffffff;
    border-color: rgba(163, 91, 217, 0.38);
}

.profile-grid-btn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 13px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.profile-grid-btn span {
    font-size: 1.2rem;
}

.profile-grid-btn small {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.profile-grid-btn-danger {
    border-color: rgba(255, 102, 159, 0.44);
    background: rgba(255, 95, 150, 0.14);
}

.screen-vip,
.screen-language,
.screen-ranking,
.screen-referral {
    gap: 12px;
}

.profile-vip-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    font-weight: 700;
}

.profile-vip-cta-icon {
    font-size: 0.9rem;
}

.profile-vip-cta-text {
    font-size: 0.76rem;
    letter-spacing: 0.01em;
}

.vip-top-card,
.vip-benefit-card,
.referral-code-card,
.referral-rules,
.language-list,
.ranking-list {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
}

.vip-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.vip-sub {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.vip-hero-details {
    margin-top: 12px;
    border: 1px solid rgba(221, 152, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px;
}

.vip-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 214, 138, 0.18);
    border: 1px solid rgba(255, 214, 138, 0.36);
    color: #ffd892;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.vip-hero-meta {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.4;
}

.vip-hero-price-row {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.vip-hero-price-row strong {
    color: #ffe19d;
    font-size: 1.12rem;
}

.vip-hero-price-row span {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
}

.vip-benefit-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.vip-benefit-main {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
}

.vip-benefit-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    background: rgba(188, 83, 235, 0.2);
}

.vip-benefit-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.vip-benefit-desc {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.vip-pack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.vip-pack {
    border: 1px solid rgba(219, 147, 255, 0.35);
    background: linear-gradient(180deg, rgba(184, 92, 245, 0.28) 0%, rgba(125, 56, 191, 0.2) 100%);
    color: var(--text);
    border-radius: 14px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.vip-pack.active {
    border-color: #f7d5ff;
    box-shadow: 0 0 0 2px rgba(255, 206, 255, 0.2) inset;
}

.vip-pack strong {
    font-size: 1rem;
}

.vip-pack span {
    font-size: 0.75rem;
    color: var(--muted);
}

.vip-pack em {
    margin-top: 2px;
    font-style: normal;
    color: #ffd78e;
    font-weight: 700;
    font-size: 0.9rem;
}

/* VIP Slider Styles */
.vip-slider-wrapper {
    position: relative;
    margin: 8px 0;
}

.vip-slider-container {
    overflow: hidden;
    border-radius: 14px;
}

.vip-slider {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 12px;
}

.vip-plan-card {
    flex: 0 0 100%;
    min-width: 100%;
    background: linear-gradient(145deg, rgba(255, 83, 146, 0.11) 0%, rgba(144, 79, 222, 0.11) 100%);
    border: 1px solid rgba(221, 152, 255, 0.36);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.vip-plan-card.popular {
    border-color: rgba(255, 211, 122, 0.8);
    box-shadow: 0 0 0 1px rgba(255, 211, 122, 0.25) inset;
}

.vip-plan-badge {
    display: inline-block;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.vip-plan-name {
    font-size: 1.05rem;
    font-weight: 900;
    margin: 0;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vip-plan-coins {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.vip-plan-coins-amount {
    font-size: 1.45rem;
    font-weight: 900;
    color: #5eead4;
    text-shadow: none;
}

.vip-plan-coins-label {
    font-size: 0.72rem;
    color: var(--muted);
}

.vip-plan-details {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
    margin: 4px 0;
}

.vip-plan-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.vip-plan-detail-icon {
    font-size: 1rem;
}

.vip-plan-detail-label {
    font-size: 0.64rem;
    color: var(--muted);
    text-transform: uppercase;
}

.vip-plan-detail-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.vip-plan-price {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(221, 152, 255, 0.4);
    border-radius: 10px;
    padding: 9px 12px;
    width: 100%;
    text-align: center;
    margin: 4px 0;
}

.vip-plan-price-value {
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffd78e;
}

.vip-plan-price-label {
    font-size: 0.62rem;
    color: var(--muted);
    text-transform: uppercase;
}

.vip-buy-btn {
    margin-top: 2px;
    min-height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(235, 190, 255, 0.42);
    background: linear-gradient(120deg, rgba(255, 140, 191, 0.32), rgba(170, 110, 245, 0.3));
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 8px 12px;
}

/* Slider Navigation */
.vip-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.vip-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 51, 102, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.4, 0.4, 1);
    border: 2px solid transparent;
}

.vip-slider-dot.active {
    background: #ff3366;
    width: 18px;
    border-radius: 20px;
    box-shadow: none;
}

.vip-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2) 0%, rgba(106, 17, 203, 0.2) 100%);
    border: 2px solid rgba(255, 51, 102, 0.4);
    color: #ff3366;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.2, 0.4, 0.4, 1);
    z-index: 10;
}

.vip-slider-nav:hover {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.4) 0%, rgba(106, 17, 203, 0.4) 100%);
    border-color: rgba(255, 51, 102, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.vip-slider-prev {
    left: -38px;
}

.vip-slider-next {
    right: -38px;
}

/* Benefits Preview */
.vip-benefits-preview {
    background: linear-gradient(160deg, rgba(84, 35, 137, 0.68) 0%, rgba(54, 21, 92, 0.72) 100%);
    border: 1px solid rgba(219, 147, 255, 0.26);
    border-radius: 14px;
    padding: 12px;
    margin: 8px 0;
}

.vip-benefits-title {
    margin: 0 0 12px;
    font-size: 0.92rem;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text);
}

.vip-benefits-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.vip-buy-options {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(219, 147, 255, 0.24);
    border-radius: 14px;
    padding: 12px;
}

.vip-buy-options-title {
    margin: 0 0 10px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.vip-buy-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.vip-buy-option {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(223, 158, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.vip-buy-option.active {
    border-color: rgba(255, 213, 122, 0.88);
    background: linear-gradient(120deg, rgba(255, 168, 129, 0.26), rgba(255, 213, 122, 0.24));
    box-shadow: 0 0 0 1px rgba(255, 213, 122, 0.18) inset;
}

.vip-buy-option .icon {
    font-size: 0.92rem;
}

.vip-benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 0.82rem;
    animation: fadeIn 0.4s ease-in;
}

.vip-benefit-item-icon {
    font-size: 1rem;
    min-width: 24px;
}

.vip-benefit-item-text {
    color: var(--text);
    line-height: 1.3;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vip-pay-btn {
    width: 100%;
    border-radius: 999px;
    min-height: 42px;
    font-size: 0.92rem;
    background: linear-gradient(90deg, #ff3366 0%, #ff6b9d 100%);
    box-shadow: 0 4px 20px rgba(255, 51, 102, 0.4);
    position: relative;
    overflow: hidden;
    animation: pulse-subtle 2s ease-in-out infinite;
}

.vip-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 51, 102, 0.6);
}

@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 51, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 28px rgba(255, 51, 102, 0.6);
    }
}

.vip-foot-note {
    text-align: center;
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.4;
}

body[data-theme="light"] .profile-vip-cta {
    background: linear-gradient(130deg, rgba(255, 203, 236, 0.92), rgba(230, 196, 255, 0.95));
    border-color: rgba(182, 126, 224, 0.36);
    color: #43145f;
}

body[data-theme="light"] .screen-vip {
    color: #2e1444;
}

body[data-theme="light"] .vip-top-card,
body[data-theme="light"] .vip-slider-container,
body[data-theme="light"] .vip-benefits-preview {
    background: linear-gradient(160deg, rgba(255, 244, 252, 0.9) 0%, rgba(245, 236, 255, 0.95) 100%);
    border-color: rgba(172, 124, 216, 0.3);
}

body[data-theme="light"] .vip-name {
    color: #2e1444;
}

body[data-theme="light"] .vip-sub {
    color: #6c4f8a;
}

body[data-theme="light"] .vip-hero-details,
body[data-theme="light"] .vip-buy-options {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(172, 124, 216, 0.28);
}

body[data-theme="light"] .vip-hero-pill {
    color: #8d4a0f;
    background: rgba(255, 219, 158, 0.5);
    border-color: rgba(232, 178, 95, 0.55);
}

body[data-theme="light"] .vip-hero-meta {
    color: #634685;
}

body[data-theme="light"] .vip-hero-price-row strong {
    color: #a55a09;
}

body[data-theme="light"] .vip-buy-option {
    background: rgba(255, 255, 255, 0.82);
    color: #4b1a64;
    border-color: rgba(193, 136, 236, 0.44);
}

body[data-theme="light"] .vip-buy-option.active {
    border-color: rgba(232, 178, 95, 0.68);
    background: linear-gradient(120deg, rgba(255, 213, 153, 0.45), rgba(255, 231, 177, 0.55));
}

body[data-theme="light"] .vip-plan-card {
    background: linear-gradient(145deg, rgba(255, 233, 245, 0.94) 0%, rgba(246, 235, 255, 0.92) 100%);
    border-color: rgba(214, 148, 238, 0.44);
}

body[data-theme="light"] .vip-plan-name {
    color: #7c2a7f;
}

body[data-theme="light"] .vip-plan-detail-value {
    color: #5f3a8b;
}

body[data-theme="light"] .vip-plan-price {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(214, 148, 238, 0.45);
}

body[data-theme="light"] .vip-buy-btn {
    background: linear-gradient(120deg, rgba(255, 171, 212, 0.6), rgba(191, 145, 249, 0.52));
    border-color: rgba(193, 136, 236, 0.48);
    color: #4b1a64;
}

body[data-theme="light"] .vip-benefits-title {
    color: #6b2a84;
}

body[data-theme="light"] .vip-benefit-item {
    background: rgba(255, 255, 255, 0.8);
    color: #3f1b5e;
}

.language-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.language-item {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.96rem;
    cursor: pointer;
}

.language-item .radio {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    position: relative;
}

.language-item.active .radio {
    border-color: #ca61f3;
}

.language-item.active .radio::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #ca61f3;
}

.ranking-mode-tabs,
.ranking-period-tabs {
    display: flex;
    gap: 10px;
}

.ranking-mode-btn,
.ranking-period-btn {
    flex: 1;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-radius: 999px;
    min-height: 38px;
    cursor: pointer;
    font-weight: 600;
}

.ranking-mode-btn.active,
.ranking-period-btn.active {
    background: linear-gradient(135deg, rgba(255, 172, 49, 0.95), rgba(255, 133, 20, 0.96));
    border-color: transparent;
    color: #fff;
}

.ranking-list {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-list li {
    margin: 0;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 8px;
}

.ranking-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 178, 69, 0.22);
    color: #ffc56e;
    font-weight: 800;
    font-size: 0.82rem;
}

.ranking-user {
    min-width: 0;
}

.ranking-user strong {
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.ranking-user span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.76rem;
}

.ranking-score {
    font-weight: 800;
    color: #ffcc73;
    font-size: 0.9rem;
}

.ranking-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
}

.ranking-footer strong {
    color: #ffbf54;
}

.referral-hero {
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(145deg, #4a99ff 0%, #ba5df4 100%);
    color: #fff;
}

.referral-hero h3 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.05;
}

.referral-hero p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.93);
}

.referral-code-card p {
    margin: 0 0 8px;
    color: var(--muted);
}

.referral-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.referral-code-row strong {
    flex: 1;
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
}

.referral-offer {
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    color: #fff;
}

.referral-offer-1 {
    background: linear-gradient(135deg, #ff8f24, #ff6d00);
}

.referral-offer-2 {
    background: linear-gradient(135deg, #d856ff, #7f4cff);
}

.referral-offer strong {
    background: rgba(255, 255, 255, 0.92);
    color: #ff8a00;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.84rem;
}

.referral-rules h4 {
    margin: 0 0 8px;
}

.referral-rules p {
    margin: 0;
    color: var(--muted);
}

.chat-screen {
    background:
        radial-gradient(120% 70% at 10% 0%, rgba(136, 62, 216, 0.24) 0%, rgba(136, 62, 216, 0) 50%),
        radial-gradient(130% 70% at 96% 5%, rgba(241, 76, 190, 0.16) 0%, rgba(241, 76, 190, 0) 53%),
        linear-gradient(180deg, #2e0e52 0%, #22063d 100%);
}

.chat-header {
    border-radius: 0 0 16px 16px;
    border-bottom-color: rgba(236, 184, 255, 0.18);
}

.chat-quick-replies {
    display: flex;
    gap: 8px;
    padding: 8px 10px 6px;
    overflow-x: auto;
}

.chat-header-status {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.12);
    color: #d9bee9;
}

.chat-header-status.online {
    background: rgba(34, 197, 94, 0.22);
    color: #7df8b8;
}

.chat-quick-chip {
    border: 1px solid rgba(209, 124, 236, 0.42);
    background: rgba(149, 85, 203, 0.24);
    color: #f8edff;
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.8rem;
}

.chat-quick-chip:active {
    transform: translateY(1px);
}

.gift-picker-modal {
    border-radius: 18px;
    max-height: min(82vh, 720px);
    display: flex;
    flex-direction: column;
}

.gift-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gift-picker-head h3 {
    margin: 0;
}

.gift-picker-cats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.gift-cat {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 10px;
    min-height: 34px;
    font-size: 0.82rem;
}

.gift-cat.active {
    border-color: #d76eff;
    color: #ffd4ff;
}

.gift-grid-rich {
    margin-top: 10px;
    max-height: 42vh;
    overflow: auto;
    padding-right: 2px;
}

.gift-grid-rich .recharge-pack-card {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(129, 70, 188, 0.26);
}

.gift-grid-rich .recharge-pack-card.selected {
    border-color: #ffd4ff;
    box-shadow: 0 0 0 2px rgba(255, 208, 255, 0.22) inset;
}

.gift-picker-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gift-wallet-left {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.82rem;
}

.gift-qty-pills {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.gift-qty-pill {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 999px;
    min-width: 40px;
    min-height: 30px;
}

.gift-qty-pill.active {
    background: rgba(208, 111, 255, 0.35);
    border-color: rgba(255, 210, 255, 0.52);
}

#btnGiftSendSelected {
    margin-left: auto;
}

.checkin-modal {
    background: linear-gradient(160deg, rgba(95, 43, 150, 0.94) 0%, rgba(66, 23, 109, 0.96) 100%);
    border: 1px solid rgba(233, 177, 255, 0.26);
}

.checkin-title {
    font-size: 1.6rem;
    line-height: 1;
    margin: 0;
}

.checkin-desc {
    color: rgba(249, 228, 255, 0.9);
}

.checkin-day-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.checkin-day-card.is-today {
    background: linear-gradient(145deg, rgba(79, 164, 255, 0.36), rgba(189, 96, 255, 0.34));
    border-color: rgba(210, 232, 255, 0.45);
}

.checkin-day-card.claimed {
    background: linear-gradient(145deg, rgba(220, 82, 255, 0.34), rgba(255, 165, 34, 0.26));
    border-color: rgba(255, 228, 178, 0.4);
}

.btn-checkin {
    border-radius: 999px;
    min-height: 48px;
    font-size: 1rem;
    background: linear-gradient(130deg, #df26ff, #4aa6ff);
    border: none;
}

/* ---------------------------------------------------------------------------
   Pixel pass refinements (reference matching)
--------------------------------------------------------------------------- */

/* Login/register: direct app surface, no floating admin-style card */
body.auth-page .auth-screen {
    justify-content: flex-start;
    gap: 0;
    padding-top: calc(max(30px, var(--safe-top)) + 34px);
}

body.auth-page .auth-box {
    width: min(100%, 420px);
}

body.auth-page .auth-box form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.auth-page .auth-box .form-group {
    margin-bottom: 0;
}

body.auth-page .auth-box input {
    min-height: 52px;
    border-radius: 16px;
}

body.auth-page .auth-box .btn {
    min-height: 54px;
    border-radius: 16px;
    margin-top: 6px;
}

/* Chat screen: richer purple app style with readable bubbles/time */
.chat-screen {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 70% at 50% -6%, rgba(195, 114, 255, 0.3) 0%, rgba(195, 114, 255, 0) 50%),
        linear-gradient(180deg, #3f0b68 0%, #2a0748 56%, #22063c 100%);
}

.chat-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px),
        radial-gradient(circle at 80% 38%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.5px);
    background-size: 30px 30px, 34px 34px;
}

.chat-header {
    position: relative;
    z-index: 1;
    height: 50px;
    min-height: 50px;
    padding: 0 14px;
    background: linear-gradient(145deg, rgba(99, 38, 150, 0.94) 0%, rgba(82, 30, 132, 0.96) 100%);
    border-bottom: 1px solid rgba(240, 193, 255, 0.24);
}

.chat-header-back,
.chat-header-video-btn,
.chat-header-menu {
    color: #fdf4ff;
}

.chat-header-avatar {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(255, 224, 247, 0.5);
}

.chat-header-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.chat-header-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    padding: 2px 8px 2px 7px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 999px;
    color: #ecd8ff;
    background: rgba(255, 255, 255, 0.13);
}

.chat-header-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b9b4c6;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.chat-header-status.online {
    color: #cbffd8;
    background: rgba(39, 188, 105, 0.18);
}

.chat-header-status.online::before {
    background: #25d366;
    box-shadow: 0 0 0 2px rgba(20, 98, 60, 0.5), 0 0 10px rgba(37, 211, 102, 0.55);
}

.chat-header-status.away::before {
    background: #ffbd59;
}

.chat-partner-rate {
    color: rgba(250, 232, 255, 0.86);
}

.chat-messages-wrap {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: block;
    position: relative;
    z-index: 1;
    padding: 10px 12px 10px;
}

/* Ensure the message list participates in normal scroll height */
.chat-messages-wrap .chat-message-list {
    margin-top: 0;
}

.chat-message-list {
    gap: 8px;
}

.chat-message {
    max-width: 79%;
    border-radius: 16px;
    border: 1px solid transparent;
    box-shadow: 0 6px 18px rgba(18, 3, 31, 0.2);
}

.chat-message.mine {
    background: linear-gradient(145deg, #7d5dff 0%, #6550ff 100%);
    border-color: rgba(204, 203, 255, 0.36);
    color: #f7f5ff;
    border-bottom-right-radius: 6px;
}

.chat-message.theirs {
    background: linear-gradient(145deg, #ff1f8f 0%, #f01284 100%);
    border-color: rgba(255, 189, 220, 0.5);
    color: #fff5fb;
    border-bottom-left-radius: 6px;
}

.chat-message .chat-message-meta {
    margin-top: 5px;
    padding: 2px 8px;
    border-radius: 999px;
}

.chat-message.mine .chat-message-meta {
    background: rgba(250, 248, 255, 0.2);
}

.chat-message.theirs .chat-message-meta {
    background: rgba(255, 241, 248, 0.2);
}

.chat-message-time {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 250, 255, 0.95);
}

.chat-ticks {
    color: rgba(255, 250, 255, 0.94);
}

.chat-gift-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid rgba(255, 236, 250, 0.5);
}

.chat-quick-replies {
    position: relative;
    z-index: 1;
    padding: 8px 10px 8px;
    gap: 10px;
}

.chat-quick-chip {
    border-radius: 999px;
    padding: 7px 12px;
    border: 1px solid rgba(200, 140, 248, 0.45);
    background: rgba(112, 66, 165, 0.45);
    color: #f8edff;
    font-size: 0.8rem;
    font-weight: 600;
}

.chat-input-bar {
    position: relative;
    z-index: 1;
    margin: 0 10px 10px;
    padding: 8px;
    border-radius: 22px;
    border: 1px solid rgba(255, 219, 245, 0.35);
    background: rgba(251, 242, 255, 0.96);
    gap: 6px;
    align-items: flex-end;
}

.chat-super-hi-pill {
    min-height: 34px;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(146, 102, 223, 0.12) 0%, rgba(233, 76, 190, 0.12) 100%);
    border-color: rgba(163, 123, 231, 0.35);
    color: #6b31a8;
}

.chat-input-field {
    min-height: 50px;
    max-height: 140px;
    padding: 8px 12px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #4f2a75;
    line-height: 1.35;
}

.chat-input-field::placeholder {
    color: #9075aa;
}

.chat-input-field:focus {
    box-shadow: inset 0 0 0 2px rgba(195, 104, 243, 0.28);
}

.chat-send-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d857ff 0%, #6877ff 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(108, 53, 171, 0.28);
}

/* Recent chats: richer cards and visible online dot */
.chat-list-item {
    border-radius: 18px;
}

.chat-list-online-dot {
    width: 10px;
    height: 10px;
    animation: online-dot-pulse 1.8s ease-in-out infinite;
}

@keyframes online-dot-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.17); }
}

/* Full-screen call offers */
.chat-call-overlay-content,
.chat-incoming-call-content {
    gap: 14px;
}

.chat-call-overlay-name,
.chat-incoming-name {
    font-size: 1.65rem;
    font-weight: 800;
}

.chat-call-overlay-status.ringing-text,
.chat-incoming-sub {
    font-size: 1.02rem;
}

.chat-incoming-actions {
    gap: 56px;
}

/* Gift picker: app-style bottom sheet with categorized grid */
#giftPickerModal {
    align-items: flex-end;
    padding: 0;
}

.gift-picker-modal {
    width: min(100%, 480px);
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    border: 1px solid rgba(248, 203, 255, 0.24);
    background: linear-gradient(180deg, rgba(76, 31, 122, 0.78) 0%, rgba(48, 19, 78, 0.86) 100%);
    padding: 12px 12px 10px;
    box-shadow: 0 -14px 40px rgba(13, 3, 23, 0.62);
    position: relative;
    overflow: hidden;
}

/* iOS-style drag handle (no markup change) */
.gift-picker-modal::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.gift-picker-head {
    padding-top: 8px;
}

.gift-picker-head h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff0ff;
}

.gift-picker-cats {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 0 6px 2px;
    border-bottom: 1px solid rgba(240, 193, 255, 0.14);
}

.gift-cat {
    flex: 1;
    border: 0;
    background: transparent;
    border-radius: 10px;
    min-height: 40px;
    font-weight: 800;
    font-size: 0.9rem;
    color: rgba(255, 240, 255, 0.72);
    position: relative;
}

.gift-cat.active {
    color: #ff59ff;
}

.gift-cat.active::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 89, 255, 0.95);
    box-shadow: 0 6px 14px rgba(255, 89, 255, 0.22);
}

.gift-grid-rich {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 2px 6px;
    max-height: none;
    overflow: auto;
    flex: 1 1 auto;
    overscroll-behavior: contain;
}

.gift-pack-card {
    min-height: 110px;
    padding: 10px 6px 10px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.gift-pack-card.selected {
    border-color: rgba(255, 89, 255, 0.70);
    box-shadow: 0 0 0 2px rgba(255, 89, 255, 0.18) inset;
}

.gift-pack-card.gift-hidden {
    display: none;
}

.gift-pack-thumb {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    margin: 0 auto 6px;
}

.gift-pack-fallback {
    font-size: 25px;
    line-height: 1;
    margin-bottom: 8px;
}

.gift-pack-card .recharge-pack-label {
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    min-height: 12px;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.gift-pack-card .recharge-pack-price {
    margin-top: auto;
    font-size: 10px;
    font-weight: 900;
    color: #ffd468;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 212, 104, 0.12);
    border: 1px solid rgba(255, 212, 104, 0.22);
}

/* Smaller coin icon inside the price pill */
#giftPickerModal .gift-pack-coin-icon {
    width: 12px !important;
    height: 12px !important;
    font-size: 9px !important;
}

.gift-picker-footer {
    position: sticky;
    bottom: 0;
    margin-top: 6px;
    padding: 10px 4px calc(var(--safe-bottom) + 8px);
    border-top: 1px solid rgba(240, 193, 255, 0.12);
    background: linear-gradient(180deg, rgba(48, 19, 78, 0) 0%, rgba(48, 19, 78, 0.55) 30%, rgba(48, 19, 78, 0.78) 100%);
}

.gift-wallet-left {
    color: #fff0ff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 8px;
    font-size: 12px;
}

.gift-qty-pills {
    margin-left: 0;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.gift-qty-pill {
    min-width: 30px;
    min-height: 30px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 0;
    background: transparent;
    color: rgba(255, 240, 255, 0.82);
}

.gift-qty-pill.active {
    background: rgba(255, 89, 255, 0.22);
    color: #ffdbff;
}

#btnGiftSendSelected {
    min-height: 36px;
    border-radius: 999px;
    padding: 7px 18px;
    font-weight: 900;
    box-shadow: none;
}

/* Profile screen polish */
.screen-profile-rich,
.screen-vip,
.screen-language,
.screen-ranking,
.screen-referral {
    overflow-y: auto;
    padding-bottom: 12px;
}

.profile-rich-hero {
    padding: 18px 16px;
}

.profile-rich-avatar {
    width: 72px;
    height: 72px;
}

.profile-rich-name {
    font-size: 1.16rem;
}

.profile-rich-grid-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* VIP screen */
.vip-top-card {
    background: linear-gradient(160deg, rgba(73, 30, 120, 0.9) 0%, rgba(44, 18, 76, 0.94) 100%);
    border-radius: 20px;
    padding: 14px;
}

.vip-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vip-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(247, 218, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.vip-user-text {
    min-width: 0;
}

.vip-benefit-card {
    background: linear-gradient(160deg, rgba(84, 35, 137, 0.9) 0%, rgba(54, 21, 92, 0.95) 100%);
}

.vip-benefit-card h3 {
    text-align: center;
    letter-spacing: 0.04em;
    font-size: 0.92rem;
}

.vip-benefit-dots {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.vip-benefit-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.vip-benefit-dots span.active {
    background: #db87ff;
}

.vip-pack {
    min-height: 112px;
}

.vip-foot-note {
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}

/* Language screen */
.screen-language .host-header,
.screen-ranking .host-header,
.screen-referral .host-header,
.screen-vip .host-header {
    margin-bottom: 6px;
}

.language-list {
    padding: 8px;
    border-radius: 18px;
}

.language-item {
    min-height: 54px;
    border-radius: 13px;
    font-size: 1rem;
}

/* Ranking screen */
.ranking-mode-tabs {
    margin-top: 2px;
}

.ranking-mode-btn,
.ranking-period-btn {
    min-height: 36px;
    font-size: 0.84rem;
}

.ranking-list {
    padding: 10px;
    border-radius: 18px;
    background: rgba(244, 242, 250, 0.95);
    border: 1px solid rgba(235, 227, 247, 0.96);
}

.ranking-list li {
    grid-template-columns: auto 44px minmax(0, 1fr) auto;
    gap: 8px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e7e7ef;
    box-shadow: 0 1px 0 rgba(22, 10, 39, 0.03);
}

.ranking-rank-badge {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 0.63rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, #f56aab 0%, #dd3987 100%);
}

.ranking-avatar-wrap {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranking-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-avatar-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
}

.ranking-user strong {
    color: #19172a;
    font-size: 0.98rem;
}

.ranking-user span {
    color: #686778;
}

.ranking-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff6dd;
    color: #f59c00;
    font-size: 0.78rem;
}

.ranking-score small {
    font-size: 0.74rem;
}

.ranking-footer {
    background: rgba(255, 255, 255, 0.95);
}

/* Referral screen */
.referral-hero {
    border-radius: 22px 22px 34px 34px;
    padding: 20px 16px 36px;
}

.referral-hero h3 {
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.referral-code-card,
.referral-rules {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(235, 228, 246, 0.96);
}

.referral-code-card {
    margin-top: -24px;
}

.referral-code-card p,
.referral-rules h4,
.referral-rules p {
    color: #44415f;
}

.referral-code-row strong {
    background: #f5f5fc;
    color: #7f40c9;
}

.referral-rules-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.referral-qr-code {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    color: #111;
    border: 2px solid #111;
    background:
        linear-gradient(90deg, #111 16%, transparent 16% 84%, #111 84%),
        linear-gradient(#111 16%, transparent 16% 84%, #111 84%),
        #fff;
}

/* Daily check-in */
.checkin-modal {
    border-radius: 20px;
    padding: 20px;
}

.checkin-day-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.checkin-day-card {
    min-height: 88px;
    padding: 10px 6px;
}

.checkin-day-card .day-num {
    margin-bottom: 6px;
}

.checkin-day-card .day-coins {
    font-size: 0.92rem;
}

@media (max-width: 420px) {
    .gift-grid-rich {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .chat-input-bar {
        margin-left: 8px;
        margin-right: 8px;
    }

    .ranking-list li {
        grid-template-columns: auto 40px minmax(0, 1fr) auto;
        padding: 8px;
    }
}

/* ---------------------------------------------------------------------------
   Final input contrast fix: typed text must stay visible in all themes
--------------------------------------------------------------------------- */
.chat-input-field {
    color: #2c1544 !important;
    caret-color: #7b2fbe;
    font-weight: 600;
    text-shadow: none;
}

.chat-input-field::placeholder {
    color: #7f6a95 !important;
    opacity: 1;
}

body:not([data-theme="light"]) .chat-input-bar {
    background: rgba(252, 245, 255, 0.98) !important;
    border-color: rgba(224, 184, 246, 0.42) !important;
}

body:not([data-theme="light"]) .chat-input-field {
    color: #2c1544 !important;
    background: rgba(255, 255, 255, 0.78) !important;
}

body[data-theme="light"] .chat-input-field {
    color: #3a1f5a !important;
    background: rgba(255, 255, 255, 0.82) !important;
}

.call-chat-input {
    color: #ffffff !important;
    caret-color: #ffffff;
    background: rgba(24, 8, 40, 0.66) !important;
    border-color: rgba(250, 216, 255, 0.36) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}

.call-chat-input::placeholder {
    color: rgba(246, 224, 255, 0.76) !important;
}

/* ---------------------------------------------------------------------------
   Call UI v4 (reference lock): clear video + slim right rail + clean bottom
--------------------------------------------------------------------------- */
.room-fullscreen.videos {
    overflow: hidden !important;
    position: relative !important;
    display: block !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    width: 100% !important;
    height: 100% !important;
}

/* Share PiP sizing with sibling overlays (like #callTopBar) */
#roomSection {
    --call-pip-size: 106px;
    --call-pip-gap: 10px;
}

.room-fullscreen .video-wrapper.remote {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 0 !important;
    border: 0 !important;
    z-index: 1 !important;
    background: #000 !important;
}

.room-fullscreen .video-wrapper.remote video {
    object-fit: cover !important;
    filter: none !important;
}

.room-fullscreen .video-wrapper.local {
    position: absolute !important;
    top: calc(var(--safe-top) + 10px) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    width: var(--call-pip-size) !important;
    height: var(--call-pip-size) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.52) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42) !important;
    z-index: 20 !important;
}

/* Vertical controls under the local PiP (Next, switch cam, beautify, flag) */
.room-fullscreen .call-pip-controls {
    position: absolute !important;
    top: calc(var(--safe-top) + 10px + var(--call-pip-size) + var(--call-pip-gap)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    z-index: 21 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    pointer-events: auto !important;
}

.room-fullscreen .call-pip-controls .btn-call {
    width: 41px !important;
    height: 41px !important;
    min-width: 41px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    background: rgba(12, 10, 18, 0.22) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
}

.room-fullscreen .call-pip-controls .btn-call:hover {
    transform: none !important;
}

.room-fullscreen .call-pip-controls .btn-call:active {
    transform: scale(0.92) !important;
}

.room-fullscreen .call-pip-controls .btn-call-svg {
    width: 18px !important;
    height: 18px !important;
    filter: none !important;
}

/* Mute active state (mic off) */
.room-fullscreen .call-pip-controls #btnMute.active {
    border-color: rgba(255, 255, 255, 0.40) !important;
    background: rgba(255, 255, 255, 0.10) !important;
}

/* End call replaces Next in the PiP rail */
.room-fullscreen .call-pip-controls #btnBackCall {
    width: 41px !important;
    height: 41px !important;
    min-width: 41px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 59, 48, 0.46) !important;
    background: rgba(12, 10, 18, 0.22) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26) !important;
    animation: none !important;
}

.room-fullscreen .call-pip-controls #btnBackCall .btn-call-end-icon {
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.room-fullscreen .call-pip-controls #btnBackCall .btn-call-end-icon svg {
    width: 100% !important;
    height: 100% !important;
    stroke: rgba(255, 255, 255, 0.98) !important;
}

.room-fullscreen .call-pip-controls #btnReportCall {
    border-color: rgba(255, 59, 48, 0.35) !important;
}

.room-fullscreen .video-wrapper.local .label {
    display: none !important;
}

/* Top timer bar: keep it small and never under the PiP */
body.in-call #callTopBar.call-top-bar {
    position: absolute !important;
    top: calc(var(--safe-top) + 8px) !important;
    left: 12px !important;
    right: auto !important;
    max-width: calc(100% - 12px - (var(--call-pip-size) + (var(--call-pip-gap) * 2) + env(safe-area-inset-right))) !important;
    width: fit-content !important;
    display: flex !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 0.75rem !important;
    gap: 8px !important;
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    justify-content: flex-start !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

/* Split pills (timer + coins) in-call */
body.in-call #callTopBar .call-top-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(104, 72, 193, 0.74), rgba(223, 138, 206, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.98);
    max-width: 100%;
    box-sizing: border-box;
}

body.in-call #callTopBar .call-top-pill-timer {
    flex: 0 0 auto;
}

body.in-call #callTopBar .call-top-pill-coins {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
}

body.in-call #callTopBar .call-top-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
}

body.in-call #callTopBar .call-top-bar-coins,
body.in-call #callTopBar .call-top-bar-coins-num,
body.in-call #callTopBar .paid-call-countdown {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.in-call #callTopBar .call-top-bar-right > * {
    flex-shrink: 0;
}

/* This line makes the bar very long; hide it in call UI */
/* Coins/minutes are not shown in call UI (only timer + low-balance warning) */
body.in-call #callTopBar .call-top-pill-coins {
    display: none !important;
}

body.in-call #callTopBar #callTopBarCoins,
body.in-call #callTopBar #paidCallMinutesLeft,
body.in-call #callTopBar #paidCallCountdown {
    display: none !important;
}

@keyframes callHeartbeat {
    0% { transform: scale(1); opacity: 0.85; }
    20% { transform: scale(1.03); opacity: 1; }
    40% { transform: scale(1); opacity: 0.9; }
    60% { transform: scale(1.035); opacity: 1; }
    100% { transform: scale(1); opacity: 0.85; }
}

body.in-call #paidCallLowCoins.paid-call-low {
    margin: 6px 0 0 0;
    padding: 6px 10px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 107, 157, 0.42);
    color: rgba(255, 255, 255, 0.98);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.42);
    transform-origin: left center;
}

body.in-call #paidCallLowCoins.paid-call-low:not(.hidden) {
    animation: callHeartbeat 1.2s ease-in-out infinite;
}

.room-fullscreen .call-top-bar {
    top: calc(var(--safe-top) + 8px) !important;
    left: 10px !important;
    right: 112px !important;
    min-height: 26px !important;
    padding: 4px 10px !important;
    border-radius: 14px !important;
    background: linear-gradient(90deg, rgba(104, 72, 193, 0.74), rgba(223, 138, 206, 0.6)) !important;
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 22 !important;
    display: flex !important;
}

.room-fullscreen .remote-peer {
    top: calc(var(--safe-top) + 44px) !important;
    left: 10px !important;
    bottom: auto !important;
    max-width: calc(100% - 126px) !important;
    background: rgba(18, 10, 30, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 21 !important;
    display: none !important;
}

.room-fullscreen .room-overlay.room-actions {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
    z-index: 25 !important;
}

/* IMPORTANT: .room-actions is a sibling of .videos in the DOM, so call UI must
   override the legacy grid/gradient overlay using in-call selectors. */
body.in-call .room-overlay.room-actions {
    position: absolute !important;
    inset: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
    z-index: 25 !important;
}

body.in-call .call-bottom-controls,
.room-fullscreen .call-bottom-controls,
body.in-call .call-side-controls,
.room-fullscreen .call-side-controls {
    pointer-events: auto !important;
    display: flex !important;
}

body.in-call .call-bottom-controls {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(var(--safe-bottom) + 14px) !important;
    transform: translateX(-50%) !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    padding: 12px 16px !important;
    border: 0 !important;
    width: min(360px, calc(100vw - 18px - 18px)) !important;
    border-radius: 999px !important;
    background: rgba(12, 10, 18, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26) !important;
    z-index: 27 !important;
}

/* Hosts do not send gifts: hide gift send actions (call + chat). */
body.is-host #btnCallGift,
body.is-host #btnCallGiftInline,
body.is-host #btnChatGift {
    display: none !important;
}

/* Host: replace gift with camera switch in bottom bar */
body.in-call #btnHostSwitchCamera {
    display: none;
}

body.is-host.in-call #btnHostSwitchCamera {
    display: inline-flex !important;
}

body.is-host.in-call #btnSwitchCamera {
    display: none !important;
}

/* When host has only Chat + Next, center them nicely. */
body.is-host.in-call .call-bottom-controls {
    justify-content: center !important;
    gap: 18px !important;
}

body.in-call .call-bottom-controls #btnChatCall,
body.in-call .call-bottom-controls #btnNext,
body.in-call .call-bottom-controls #btnCallGift {
    position: relative;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    background: rgba(20, 14, 34, 0.12) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Next cooldown progress ring (light green stroke for 5s wait) */
body.in-call .call-bottom-controls #btnNext .next-cooldown-ring {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    pointer-events: none;
    opacity: 0;
    transform: rotate(-90deg);
    transition: opacity 0.16s ease;
}

body.in-call .call-bottom-controls #btnNext.cooldown .next-cooldown-ring {
    opacity: 1;
}

body.in-call .call-bottom-controls #btnNext .next-cooldown-ring-track {
    fill: none;
    stroke: rgba(16, 185, 129, 0.20);
    stroke-width: 2.4;
}

body.in-call .call-bottom-controls #btnNext .next-cooldown-ring-bar {
    fill: none;
    stroke: rgba(16, 185, 129, 0.95);
    stroke-width: 2.4;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.28));
}

/* Prevent base “colorful glass” hover from changing call UI buttons */
body.in-call .call-bottom-controls #btnChatCall:hover,
body.in-call .call-bottom-controls #btnNext:hover,
body.in-call .call-bottom-controls #btnCallGift:hover {
    transform: none !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22) !important;
}

body.in-call .call-bottom-controls #btnChatCall:active,
body.in-call .call-bottom-controls #btnNext:active,
body.in-call .call-bottom-controls #btnCallGift:active,
body.in-call .call-bottom-controls #btnBackCall:active {
    transform: scale(0.92) !important;
}

body.in-call .call-bottom-controls .btn-call-svg {
    width: 20px !important;
    height: 20px !important;
}

/* Next cooldown: show countdown badge + spinner when user taps early */
body.in-call .call-bottom-controls #btnNext.cooldown {
    opacity: 0.92 !important;
}

body.in-call .call-bottom-controls #btnNext.cooldown::after {
    content: attr(data-cooldown);
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.98);
    font-size: 0.66rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}

@keyframes btnSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.in-call .call-bottom-controls #btnNext.is-loading .btn-call-svg {
    opacity: 0 !important;
}

body.in-call .call-bottom-controls #btnNext.is-loading::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: rgba(255, 255, 255, 0.92);
    animation: btnSpin 0.9s linear infinite;
}

.room-fullscreen .call-bottom-controls #btnBackCall {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 59, 48, 0.62) !important;
    background: rgba(255, 59, 48, 0.26) !important;
    box-shadow: 0 6px 16px rgba(255, 59, 48, 0.20) !important;
    animation: none !important;
}

.room-fullscreen .call-bottom-controls #btnBackCall:hover {
    transform: none !important;
}

.room-fullscreen .call-bottom-controls #btnBackCall .btn-call-end-icon {
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.room-fullscreen .call-bottom-controls #btnBackCall .btn-call-end-icon svg {
    width: 100% !important;
    height: 100% !important;
    stroke: rgba(255, 255, 255, 0.98) !important;
}

.room-fullscreen .call-side-controls {
    display: none !important;
}

.room-fullscreen .call-side-controls .btn-call-glass,
.room-fullscreen .call-side-controls .btn-call-next,
.room-fullscreen .call-side-controls .btn-call-report {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.34) !important;
    background: rgba(15, 10, 23, 0.18) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24) !important;
    padding: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.room-fullscreen .call-side-controls .btn-call-svg {
    width: 20px !important;
    height: 20px !important;
}

.room-fullscreen .call-side-controls #btnNext .btn-call-next-label {
    display: none !important;
}

.room-fullscreen .call-side-controls #btnBeautify {
    font-size: 0.92rem !important;
}

.room-fullscreen .call-side-controls #btnReportCall {
    color: #ffdbe8 !important;
}

.room-fullscreen #callChatPanel {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(var(--safe-bottom) + 96px) !important;
    max-height: 40vh !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(10, 8, 20, 0) 0%, rgba(10, 8, 20, 0.42) 40%, rgba(10, 8, 20, 0.62) 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.room-fullscreen #beautifyPanel {
    bottom: calc(var(--safe-bottom) + 104px) !important;
}

.room-fullscreen #callChatPanel .call-chat-input {
    color: #ffffff !important;
    background: rgba(18, 12, 32, 0.62) !important;
    border: 1px solid rgba(255, 255, 255, 0.36) !important;
}

/* Gift sheet: blur stage slightly, keep live video visible behind the sheet */
#giftPickerModal {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 10px calc(var(--safe-bottom) + 6px) !important;
    background: rgba(8, 6, 15, 0.12) !important;
    backdrop-filter: blur(10px) saturate(1.08) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.08) !important;
}

#giftPickerModal .gift-picker-modal {
    width: min(100%, 460px) !important;
    max-height: min(68vh, 560px) !important;
    border-radius: 22px 22px 14px 14px !important;
    background: linear-gradient(180deg, rgba(58, 27, 98, 0.72) 0%, rgba(42, 17, 72, 0.82) 100%) !important;
    border: 1px solid rgba(249, 217, 255, 0.32) !important;
    box-shadow: 0 -10px 24px rgba(8, 2, 16, 0.34) !important;
}

/* Reference-style: no title or hint, just tabs + grid + bottom bar */
#giftPickerModal .gift-picker-head,
#giftPickerModal #giftPickerHint {
    display: none !important;
}

/* Tabs: text + underline (reference) */
#giftPickerModal .gift-picker-cats {
    margin-top: 0 !important;
    padding-top: 6px !important;
    padding-bottom: 4px !important;
    border-bottom: 0 !important;
}

/* Gift cards (reference): darker tiles */
#giftPickerModal .gift-pack-card {
    background: rgba(0, 0, 0, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

#giftPickerModal .gift-pack-card.selected {
    border-color: rgba(255, 89, 255, 0.75) !important;
    box-shadow: 0 0 0 2px rgba(255, 89, 255, 0.20) inset !important;
}

/* Coin row: icon + 500.00 like reference */
#giftPickerModal .gift-pack-price {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

#giftPickerModal .gift-pack-coin-icon {
    width: 12px !important;
    height: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background:
        radial-gradient(circle at 30% 28%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 45%),
        radial-gradient(circle at 55% 60%, rgba(255, 215, 90, 0.95) 0%, rgba(255, 166, 0, 0.95) 60%, rgba(230, 146, 0, 0.95) 100%) !important;
    border: 1px solid rgba(255, 230, 140, 0.85) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22), 0 0 0 1px rgba(255, 200, 60, 0.22) inset !important;
    position: relative !important;
}

#giftPickerModal .gift-pack-coin-icon::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1px solid rgba(255, 238, 170, 0.65);
    opacity: 0.95;
}

#giftPickerModal .gift-pack-coin-val {
    font-variant-numeric: tabular-nums !important;
    letter-spacing: 0.1px;
    color: rgba(255, 233, 165, 0.98);
    text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

/* Footer: one line (coins left + qty + Send) */
#giftPickerModal .gift-picker-footer {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
}

#giftPickerModal .gift-wallet-left {
    white-space: nowrap !important;
    min-width: 60px !important;
    justify-content: center !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 212, 104, 0.22) !important;
    background: rgba(255, 212, 104, 0.10) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    color: rgba(255, 245, 210, 0.96) !important;
    text-shadow: 0 1px 0 rgba(0,0,0,0.35) !important;
}

#giftPickerModal .gift-coin-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    background:
        radial-gradient(circle at 30% 28%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 45%),
        radial-gradient(circle at 55% 60%, rgba(255, 215, 90, 0.95) 0%, rgba(255, 166, 0, 0.95) 60%, rgba(230, 146, 0, 0.95) 100%);
    border: 1px solid rgba(255, 230, 140, 0.85);
    box-shadow: 0 2px 10px rgba(0,0,0,0.22), 0 0 0 1px rgba(255, 200, 60, 0.22) inset;
    position: relative;
}

#giftPickerModal .gift-coin-icon::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(255, 238, 170, 0.65);
}

#giftPickerModal .gift-wallet-left::after {
    content: "›";
    margin-left: 8px;
    opacity: 0.8;
}

#giftPickerModal .gift-qty-pills {
    flex: 1 1 auto !important;
    justify-content: center !important;
}

#giftPickerModal #btnGiftSendSelected {
    margin-left: 0 !important;
    min-width: 84px !important;
    background: linear-gradient(135deg, var(--primary), var(--accent-2)) !important;
    border: 0 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.1px;
}

/* Light-theme overrides for chat bubbles to ensure chat is readable when `data-theme="light"` */
body[data-theme="light"] .chat-message.mine {
    background: #dcf8c6 !important;
    color: #1a1a1a !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

body[data-theme="light"] .chat-message.theirs {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid #e8e8e8 !important;
    box-shadow: none !important;
}

body[data-theme="light"] .chat-message .chat-message-meta {
    background: rgba(0,0,0,0.03) !important;
}

body[data-theme="light"] .chat-message-time,
body[data-theme="light"] .chat-ticks {
    color: #666 !important;
}

body[data-theme="light"] .chat-message.mine .chat-ticks.seen {
    color: #34b7f1 !important;
}


/* Light-theme overrides for call / room UI so chat call screen matches other light screens */
body[data-theme="light"] .room-fullscreen.videos {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,240,255,0.9) 100%) !important;
}

body[data-theme="light"] .room-fullscreen .video-wrapper.remote {
    background: rgba(255,255,255,0.95) !important;
    border: 1px solid rgba(220,220,230,0.8) !important;
    box-shadow: var(--shadow-card) !important;
}

body[data-theme="light"] .remote-peer {
    background: linear-gradient(145deg, #fff8fb 0%, #fff5f9 100%) !important;
    border: 1px solid rgba(200,160,200,0.35) !important;
    color: #2a1630 !important;
}

body[data-theme="light"] .call-top-bar {
    background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(250,245,255,0.95) 100%) !important;
    border-color: rgba(220,200,230,0.6) !important;
    box-shadow: 0 8px 20px rgba(50,20,60,0.06) !important;
}

body[data-theme="light"] .room-fullscreen .call-pip-controls .btn-call {
    background: var(--surface-elevated) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

/* Force light visual style for full chat conversation screen (image-2 style -> image-1 palette) */
body[data-theme="light"] .chat-screen-overlay {
    background: linear-gradient(180deg, #f4ddf7 0%, #d8eaf2 100%) !important;
}

body[data-theme="light"] .chat-screen {
    background:
        radial-gradient(120% 70% at 50% -6%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 52%),
        linear-gradient(180deg, #f3d9f4 0%, #e0e6f4 60%, #d5ebf3 100%) !important;
}

body[data-theme="light"] .chat-screen::before {
    opacity: 0.08 !important;
}

body[data-theme="light"] .chat-header {
    background: linear-gradient(145deg, rgba(172, 101, 214, 0.9) 0%, rgba(149, 84, 202, 0.9) 100%) !important;
    border-bottom: 1px solid rgba(194, 141, 224, 0.45) !important;
}

body[data-theme="light"] .chat-header-name,
body[data-theme="light"] .chat-header-back,
body[data-theme="light"] .chat-header-video-btn,
body[data-theme="light"] .chat-header-menu {
    color: #fffdfd !important;
}

body[data-theme="light"] .chat-header-status {
    color: #f5ebff !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

body[data-theme="light"] .chat-messages-wrap {
    background: transparent !important;
}

body[data-theme="light"] .chat-quick-chip {
    background: rgba(130, 84, 180, 0.12) !important;
    border-color: rgba(166, 118, 209, 0.35) !important;
    color: #4e2c76 !important;
}

body[data-theme="light"] .chat-input-bar {
    background: rgba(255, 248, 255, 0.96) !important;
    border: 1px solid rgba(203, 165, 225, 0.45) !important;
}

body[data-theme="light"] .chat-super-hi-pill {
    color: #5c358a !important;
    background: rgba(136, 98, 187, 0.1) !important;
    border-color: rgba(160, 125, 204, 0.3) !important;
}

body[data-theme="light"] .chat-input-field {
    color: #3b1f5b !important;
    background: transparent !important;
}

body[data-theme="light"] .chat-input-field::placeholder {
    color: #8d73a8 !important;
}

body[data-theme="light"] .chat-send-icon {
    background: linear-gradient(135deg, #c46cf4 0%, #8a78f8 100%) !important;
}

/* Bubble colors must strictly follow selected theme */
body[data-theme="light"] .chat-message.mine {
    background: linear-gradient(145deg, #fff8ff 0%, #f3e4ff 58%, #ffe6f4 100%) !important;
    color: #3e1f55 !important;
    border: 1px solid rgba(207, 174, 227, 0.78) !important;
}

body[data-theme="light"] .chat-message.theirs {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid #e6e6e6 !important;
}

body[data-theme="light"] .chat-message .chat-message-meta {
    background: rgba(0, 0, 0, 0.03) !important;
}

body[data-theme="light"] .chat-message-time,
body[data-theme="light"] .chat-ticks {
    color: #6d6d6d !important;
}

body:not([data-theme="light"]) .chat-message.mine {
    background: linear-gradient(145deg, #7d5dff 0%, #6550ff 100%) !important;
    color: #f7f5ff !important;
    border: 1px solid rgba(204, 203, 255, 0.36) !important;
}

body:not([data-theme="light"]) .chat-message.theirs {
    background: linear-gradient(145deg, #ff1f8f 0%, #f01284 100%) !important;
    color: #fff5fb !important;
    border: 1px solid rgba(255, 189, 220, 0.5) !important;
}

body:not([data-theme="light"]) .chat-message.mine .chat-message-meta {
    background: rgba(250, 248, 255, 0.2) !important;
}

body:not([data-theme="light"]) .chat-message.theirs .chat-message-meta {
    background: rgba(255, 241, 248, 0.2) !important;
}

body:not([data-theme="light"]) .chat-message-time,
body:not([data-theme="light"]) .chat-ticks {
    color: rgba(255, 250, 255, 0.95) !important;
}

body[data-theme="light"] .chat-message.mine .chat-ticks.seen,
body:not([data-theme="light"]) .chat-message.mine .chat-ticks.seen {
    color: #34b7f1 !important;
}

/* Chat overlay reference style (pastel/glass) */
#chatScreen.chat-screen-overlay {
    background:
        radial-gradient(130% 80% at 50% -12%, rgba(215, 123, 255, 0.55) 0%, rgba(215, 123, 255, 0) 58%),
        linear-gradient(180deg, #e9d8fb 0%, #dac7f3 55%, #dccff6 100%) !important;
}

#chatScreen .chat-screen {
    max-width: 480px;
    background:
        radial-gradient(120% 80% at 80% 10%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(180deg, rgba(247, 236, 255, 0.86) 0%, rgba(239, 228, 251, 0.86) 100%) !important;
}

#chatScreen .chat-screen::before {
    opacity: 0.14 !important;
}

#chatScreen .chat-header {
    background: linear-gradient(145deg, rgba(152, 88, 228, 0.9) 0%, rgba(132, 76, 214, 0.9) 100%) !important;
    border-bottom: 1px solid rgba(233, 211, 255, 0.45) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#chatScreen .chat-header-right {
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(234, 212, 255, 0.38);
    background: rgba(136, 84, 206, 0.28);
}

#chatScreen .chat-header-video-btn,
#chatScreen .chat-header-menu {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#chatScreen .chat-header-video-btn {
    border: 1px solid rgba(236, 220, 255, 0.42);
    background: rgba(255, 255, 255, 0.16);
}

body[data-theme="light"] #chatScreen .chat-header-video-btn {
    border-color: rgba(219, 189, 241, 0.62);
    background: rgba(255, 255, 255, 0.34);
    color: #ffffff;
}

body:not([data-theme="light"]) #chatScreen .chat-header-video-btn {
    border-color: rgba(236, 220, 255, 0.4);
    background: rgba(255, 255, 255, 0.14);
    color: #fdf4ff;
}

#chatScreen .chat-messages-wrap {
    padding: 12px 12px 10px;
}

#chatScreen .chat-message {
    border-radius: 22px;
    box-shadow: 0 8px 22px rgba(108, 72, 164, 0.16);
}

#chatScreen .chat-message.theirs {
    background: #ffffff !important;
    color: #35214f !important;
    border: 1px solid rgba(225, 214, 239, 0.9) !important;
}

#chatScreen .chat-message.mine {
    background: linear-gradient(145deg, #f8f2ff 0%, #eddfff 58%, #f4d9ef 100%) !important;
    color: #40245a !important;
    border: 1px solid rgba(211, 178, 236, 0.82) !important;
}

#chatScreen .chat-message .chat-message-meta {
    background: rgba(144, 97, 197, 0.12) !important;
}

#chatScreen .chat-message-time,
#chatScreen .chat-ticks {
    color: #6d558a !important;
}

#chatScreen .chat-ticks.seen {
    color: #4f9cff !important;
}

#chatScreen .chat-quick-replies {
    padding: 8px 10px;
    gap: 10px;
}

#chatScreen .chat-quick-chip {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(213, 182, 238, 0.82) !important;
    color: #563277 !important;
    font-weight: 600;
}

#chatScreen .chat-input-bar {
    margin: 0 10px 10px;
    height: 52px;
    min-height: 52px;
    padding: 4px 8px;
    border-radius: 25px;
    border: 1px solid rgba(206, 176, 233, 0.95) !important;
    background: rgba(243, 229, 255, 0.72) !important;
    box-shadow: 0 10px 24px rgba(138, 91, 187, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    gap: 4px;
    align-items: center;
}

#chatScreen #btnSuperHi {
    display: none !important;
}

#chatScreen .chat-bar-icon,
#chatScreen .chat-super-hi-pill {
    width: 31px;
    height: 31px;
    border: none !important;
    border-radius: 50%;
    background: transparent !important;
    color: #8f68b4 !important;
    font-size: 0.98rem;
    line-height: 1;
    box-shadow: none !important;
}

#chatScreen .chat-icon-svg {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#chatScreen .chat-icon-svg svg {
    width: 100%;
    height: 100%;
}

#chatScreen .chat-input-field {
    min-height: 39px;
    max-height: 96px;
    padding: 8px 11px;
    border: none !important;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.66) !important;
    color: #5a3b7f !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: inset 0 1px 3px rgba(120, 80, 170, 0.08);
}

#chatScreen .chat-input-field::placeholder {
    color: #8f75ad !important;
    font-weight: 500;
}

#chatScreen .chat-send-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #bb73f0 0%, #996af0 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(120, 76, 182, 0.35);
    font-size: 0.92rem;
}

#chatScreen #btnChatGift,
#chatScreen #btnChatUploadGallery,
#chatScreen #btnChatAudio {
    opacity: 0.98;
}

body[data-theme="light"] #chatScreen #btnChatGift,
body[data-theme="light"] #chatScreen #btnChatUploadGallery,
body[data-theme="light"] #chatScreen #btnChatAudio {
    background: rgba(255, 255, 255, 0.24) !important;
    border: 1px solid rgba(206, 176, 233, 0.42) !important;
}

body:not([data-theme="light"]) #chatScreen #btnChatGift,
body:not([data-theme="light"]) #chatScreen #btnChatUploadGallery,
body:not([data-theme="light"]) #chatScreen #btnChatAudio {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(233, 211, 255, 0.32) !important;
}

#chatScreen #btnChatAudio.recording {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ff5a8d 0%, #d93f76 100%) !important;
    border: 1px solid rgba(255, 214, 228, 0.8) !important;
    animation: chat-rec-pulse 1.05s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(255, 91, 142, 0.45);
}

#chatScreen #btnChatAudio.recording .chat-icon-svg {
    animation: chat-rec-icon-pop 1.05s ease-in-out infinite;
}

@keyframes chat-rec-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 91, 142, 0.42);
    }
    70% {
        transform: scale(1.06);
        box-shadow: 0 0 0 10px rgba(255, 91, 142, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 91, 142, 0);
    }
}

@keyframes chat-rec-icon-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

#chatScreen #btnChatUploadCamera {
    display: none !important;
}

body .bottom-nav {
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(228, 218, 241, 0.95);
    box-shadow: 0 -10px 24px rgba(106, 72, 148, 0.08);
}

body .bottom-nav .nav-item {
    gap: 4px;
    color: #927ba9;
    font-weight: 600;
}

body .bottom-nav .nav-item .nav-item-icon {
    width: 30px;
    height: 30px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body .bottom-nav .nav-item .nav-icon-bg {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f4edf9;
    border: 1px solid rgba(198, 177, 220, 0.4);
    transition: all 0.22s ease;
}

body .bottom-nav .nav-item .nav-icon-svg {
    position: absolute;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9a80b4;
    z-index: 1;
    transition: color 0.22s ease;
}

body .bottom-nav .nav-item .nav-icon-svg svg {
    width: 100%;
    height: 100%;
}

body .bottom-nav .nav-item .nav-item-label {
    font-size: 0.68rem;
    letter-spacing: 0.01em;
}

body .bottom-nav .nav-item.active {
    color: #6d4aa1;
}

body .bottom-nav .nav-item.active .nav-icon-bg {
    background: linear-gradient(135deg, #b97bf2 0%, #965fe7 100%);
    border-color: transparent;
    box-shadow: 0 7px 16px rgba(133, 88, 190, 0.32);
}

body .bottom-nav .nav-item.active .nav-icon-svg {
    color: #ffffff;
}

body .bottom-nav .nav-item .nav-item-indicator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: transparent;
    margin-top: 1px;
}

body .bottom-nav .nav-item.active .nav-item-indicator {
    background: #8b62c7;
}

body .bottom-nav .nav-item .nav-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ff4f7e;
    color: #fff;
    border: 2px solid #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body .bottom-nav .nav-item .nav-badge.hidden {
    display: none !important;
}

/* Call gift send/receive polish */
body.in-call .room-fullscreen .call-bottom-controls #btnCallGift {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
    padding: 0 !important;
}

body.in-call .room-fullscreen .call-bottom-controls #btnCallGift .btn-call-svg {
    width: 15px !important;
    height: 15px !important;
}

.call-gift-receive-fx {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 26;
    pointer-events: none;
    opacity: 0;
}

.call-gift-receive-fx.active {
    opacity: 1;
    animation: call-gift-receive-fade 2s ease forwards;
}

.call-gift-receive-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, rgba(181, 112, 239, 0.92), rgba(238, 147, 214, 0.9));
    border: 1px solid rgba(255, 240, 255, 0.75);
    box-shadow: 0 14px 28px rgba(95, 57, 137, 0.36);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.call-gift-receive-icon,
.call-gift-receive-icon-img {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 8px;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.25);
}

.call-gift-receive-text {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

@keyframes call-gift-receive-fade {
    0% {
        transform: translate(-50%, -42%) scale(0.85);
        opacity: 0;
    }
    14% {
        transform: translate(-50%, -50%) scale(1.04);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -58%) scale(0.96);
        opacity: 0;
    }
}

#chatScreen .chat-quick-replies {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#chatScreen .chat-quick-replies::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.call-chat-bubbles-list .call-chat-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 16px 16px 4px 16px;
    font-size: 0.87rem;
    word-break: break-word;
    line-height: 1.35;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(100, 150, 255, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.call-chat-bubbles-list .call-chat-bubble.mine {
    align-self: flex-end;
    border-radius: 16px 16px 16px 4px;
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: #fff;
    align-items: flex-end;
    border: none;
}

.call-chat-bubbles-list .call-chat-bubble.theirs {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    border: none;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
}

.call-chat-bubbles-list .call-chat-bubble .gift-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.call-chat-bubbles-list .call-chat-bubble .gift-sticker,
.call-chat-bubbles-list .call-chat-bubble .gift-sticker-fallback {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 8px;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.28);
}

.call-chat-bubbles-list .call-chat-bubble .gift-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}

.call-chat-bubbles-list .call-chat-bubble .gift-name-qty {
    font-size: 0.72rem;
    font-weight: 800;
    opacity: 0.92;
}

.profile-rich-user {
    position: relative;
}

.profile-premium-crown {
    position: absolute;
    left: 52px;
    top: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, #ffe79a 0%, #ffc933 60%, #f0a80b 100%);
    border: 1px solid rgba(255, 245, 214, 0.92);
    box-shadow: 0 4px 10px rgba(183, 132, 7, 0.35);
    font-size: 0.78rem;
    line-height: 1;
    z-index: 2;
}

body[data-theme="light"] .profile-premium-crown {
    box-shadow: 0 5px 12px rgba(196, 139, 7, 0.25);
}


@media (max-width: 420px) {
    .room-fullscreen .video-wrapper.local {
        width: 96px !important;
        height: 96px !important;
    }

    #roomSection {
        --call-pip-size: 96px;
    }

    .room-fullscreen .call-bottom-controls #btnMute,
    .room-fullscreen .call-bottom-controls #btnToggleVideo,
    .room-fullscreen .call-bottom-controls #btnSwitchCamera {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
    }
}
