:root {
    --bg-dark: #0b0e14;
    --bg-card: #1c222d;
    --accent: #7c4dff;
    --accent-glow: rgba(124, 77, 255, 0.5);
    --text: #ffffff;
    --text-dim: #94a3b8;
    --success: #00e676;
    --gold: #ffd700;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, system-ui, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text); height: 100dvh; width: 100%; overflow: hidden; display: flex; flex-direction: column; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; } }
@keyframes swipeCycle { 0%, 45% { transform: translateY(0); } 50%, 95% { transform: translateY(-100%); } 100% { transform: translateY(0); } }
@keyframes growIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.profile-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
header { height: 60px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; background: #0f1218; border-bottom: 1px solid rgba(124, 77, 255, 0.2); z-index: 100; flex-shrink: 0; }
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: 0.5px; }
.logo span { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.wallet-display { background: #000; border: 1px solid var(--gold); padding: 6px 14px; border-radius: 50px; color: var(--gold); font-weight: 800; font-size: 0.9rem; display: flex; align-items: center; gap: 5px; box-shadow: 0 4px 10px rgba(255, 215, 0, 0.1); }
.menu-btn { background: none; border: none; color: white; cursor: pointer; padding: 5px; }
 
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}
.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ff4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark);
    padding: 0 3px;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}


.guests-grid { padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: rgba(0,0,0,0.2); flex-shrink: 0; min-height: 175px; align-content: start; }
.guest-box { background: var(--bg-card); border-radius: 10px; padding: 8px 5px; display: flex; flex-direction: column; align-items: center; border: 1px solid rgba(255,255,255,0.05); position: relative; }
.gains-counter { position: absolute; top: 2px; right: 4px; font-size: 0.55rem; font-weight: 800; color: var(--gold); background: rgba(0,0,0,0.4); padding: 1px 4px; border-radius: 8px; display: flex; align-items: center; gap: 2px; }
.gains-counter::before { content: '💎'; font-size: 0.5rem; }
.avatar-wrapper { width: 45px; height: 45px; margin-bottom: 8px; position: relative; overflow: visible; background: transparent; }
.avatar-mask { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; position: relative; z-index: 5; border: 2px solid var(--accent); background: #000; }
.avatar-slider { width: 100%; height: 100%; animation: swipeCycle 8s infinite ease-in-out; }
.grid-follow-badge { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: var(--accent); color: white; width: 18px; height: 18px; border-radius: 50%; font-size: 14px; font-weight: bold; line-height: 18px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-card); cursor: pointer; z-index: 20; }
.grid-follow-badge.following { background: var(--success); }
.slider-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slider-sticker { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff; text-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.sticker-bg-green { background: #00e676; }
.sticker-bg-pink { background: #ff4081; }
.sticker-bg-yellow { background: #ffea00; color: #000; }
.sticker-bg-red { background: #ff5252; }
.sticker-bg-purple { background: #7c4dff; }
.sticker-bg-blue { background: #448aff; }
.host-crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 1rem; z-index: 50; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); }
.guest-box span { font-size: 0.65rem; color: var(--text-dim); font-weight: 600; }
.request-btn-container { display: flex; justify-content: center; padding: 8px; flex-shrink: 0; }
.btn-request-join { background: linear-gradient(135deg, var(--accent), #4a2c96); border-radius: 30px; padding: 8px 24px; color: white; font-weight: 700; font-size: 0.75rem; display: flex; align-items: center; gap: 12px; box-shadow: 0 4px 15px var(--accent-glow); cursor: pointer; border: 1px solid rgba(255,255,255,0.1); }
.bottom-workspace { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.forum-topic-bar { background: linear-gradient(90deg, #1c222d, #141820); padding: 10px 15px; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topic-label { background: var(--accent); color: white; font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; font-weight: 800; }
.topic-text { color: #fff; font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shared-view { flex: 1; display: flex; overflow: hidden; }

/* FIX: Added min-width: 0 to stop chat from pushing suggestions out */
.chat-container { flex: 1.8; display: flex; flex-direction: column; background: rgba(0,0,0,0.1); min-width: 0; }

#chatHistory { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 12px; }
.msg-bubble { background: #252d3a; padding: 8px 12px; border-radius: 14px; max-width: 98%; border: 1px solid rgba(255,255,255,0.05); }
.msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.msg-avatar-small { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent); }
.msg-user { font-weight: bold; font-size: 0.8rem; color: white; }

/* FIX: Added word breaking so text wraps to new line */
.msg-content { 
    font-size: 0.9rem; 
    color: #cbd5e1; 
    padding-left: 36px;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

.rankings-aside { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 8px; background: #0f1218; overflow-y: auto; border-left: 1px solid rgba(255,255,255,0.1); }
.ranking-header { font-size: 0.6rem; color: var(--text-dim); text-align: center; font-weight: 700; display: flex; justify-content: space-between; align-items: center; width: 100%; }
.contributor-card { background: #1e2530; padding: 8px 10px; border-radius: 12px; display: flex; flex-direction: column; gap: 6px; border-left: 3px solid var(--accent); min-height: 60px; justify-content: center; }
.contributor-info { display: flex; align-items: center; gap: 8px; }
.c-img { width: 28px; height: 28px; border-radius: 50%; }
.c-name { font-size: 0.7rem; font-weight: bold; color: white; }
.mini-follow { font-size: 0.6rem; padding: 4px 10px; border-radius: 12px; background: var(--accent); color: white; border: none; font-weight: bold; cursor: pointer; }
.mini-follow.following { background: transparent; color: var(--success); border: 1px solid var(--success); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 20px; }
.hidden { display: none; }
.toast-card { background: var(--bg-card); width: 100%; max-width: 320px; padding: 25px; border-radius: 20px; border: 1px solid var(--accent); text-align: center; }
.btn-yes { background: var(--success); color: #000; border: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; }
.btn-no { background: #333; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; }
.active-request { animation: pulse 1s infinite; border: 1px solid var(--success) !important; }
.side-menu { position: fixed; top: 0; left: -300px; width: 300px; height: 100%; z-index: 2000; transition: left 0.4s; background: rgba(18,22,30,0.95); backdrop-filter: blur(15px); }
.side-menu.open { left: 0; }
.menu-content { padding: 40px 30px; display: flex; flex-direction: column; }
.menu-header { display: flex; justify-content: space-between; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.menu-header h3 { font-size: 1.4rem; color: #fff; }
.close-menu { background: rgba(255,255,255,0.1); border: none; color: white; width: 36px; height: 36px; border-radius: 50%; }
.menu-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.menu-links a, .menu-token-item { display: flex; align-items: center; padding: 16px 20px; color: #cbd5e1; text-decoration: none; font-weight: 600; cursor: pointer; }
.menu-token-item { justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 10px; padding-top: 25px; }
.recharge-badge { background: rgba(0,230,118,0.2); color: var(--success); border: 1px solid var(--success); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; }
.typing-area { padding: 12px 15px; background: #141820; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#chatInput { flex: 1; background: #0b0e14; border: 1px solid rgba(255,255,255,0.15); padding: 10px 15px; border-radius: 25px; color: var(--text); font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
#chatInput:focus { border-color: var(--accent); }
.btn-send { background: var(--accent); color: white; border: none; padding: 0 20px; height: 38px; border-radius: 20px; font-weight: 800; font-size: 0.75rem; cursor: pointer; box-shadow: 0 2px 10px rgba(124, 77, 255, 0.3); transition: transform 0.1s; }
.btn-send:active { transform: scale(0.95); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.price-grid button { background: #141820; border: 1px solid var(--accent); color: white; padding: 15px 5px; border-radius: 12px; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.price-grid button:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 5px 15px var(--accent-glow); }
.price-grid button span { font-size: 0.8rem; color: var(--gold); font-weight: 800; }
.custom-input-group { display: flex; gap: 10px; margin-bottom: 20px; }
.custom-input-group input { flex: 1; background: #000; border: 1px solid #333; padding: 10px; border-radius: 8px; color: white; text-align: center; }
.custom-input-group button { background: var(--success); color: #000; border: none; padding: 0 20px; border-radius: 8px; font-weight: bold; cursor: pointer; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(124, 77, 255, 0.3); border-top: 4px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px auto; }
.btn-cancel { background: transparent; border: 1px solid #444; color: #888; padding: 8px 20px; border-radius: 20px; cursor: pointer; font-size: 0.8rem; }
.btn-cancel:hover { color: white; border-color: white; }
.sugg-timer-line { width: 50px; height: 4px; background: #222; border-radius: 2px; overflow: hidden; }
.sugg-progress { height: 100%; background: var(--accent); width: 0%; transition: width 1s linear; }
#suggestions-list { overflow-y: auto; padding-bottom: 20px; flex: 1; }
.online-badge { font-size: 0.75rem; color: #00e676; border: 1px solid #00e676; border-radius: 12px; padding: 2px 8px; margin-left: 10px; display: inline-block; vertical-align: middle; font-weight: 600; }
.status-indicator { font-size: 0.65rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-right: 5px; vertical-align: middle; display: inline-block; }
.status-indicator.active { background: #00e676; color: #000; }
.status-indicator.inactive { background: #444; color: #888; }
.status-indicator.blocked { background: #ff4444; color: #fff; }
.audience-wrapper { padding: 10px 15px; margin-bottom: 10px; }
.audience-label { font-size: 0.8rem; color: #888; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.audience-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; -ms-overflow-style: none; }
.audience-list::-webkit-scrollbar { display: none; }
.audience-item { display: flex; flex-direction: column; align-items: center; min-width: 50px; cursor: pointer; }
.audience-img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #333; object-fit: cover; margin-bottom: 4px; transition: border-color 0.2s; }
.audience-item:hover .audience-img { border-color: #00e676; }
.audience-name { font-size: 0.65rem; color: #aaa; max-width: 50px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-history { margin-top: 20px; padding-top: 15px; border-top: 1px solid #333; }
.history-title { font-size: 0.7rem; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.h-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; color: #ccc; text-decoration: none; font-size: 0.9rem; }
.h-item:hover { color: white; }
.h-dot { width: 8px; height: 8px; border-radius: 50%; background: #444; }
.h-dot.active { background: #00e676; box-shadow: 0 0 5px #00e676; }

.ad-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 60;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    color: #fff;
}

.ad-promo {
    background: #2979ff; 
}
.guest-box.is-promo .avatar-mask {
    border-color: #2979ff !important;
    box-shadow: 0 0 10px rgba(41, 121, 255, 0.4);
}

.ad-bot {
    background: #ff9100; 
}
.guest-box.is-bot .avatar-mask {
    border-color: #ff9100 !important;
    border-style: dashed;
}

.beautiful-toast {
    background: rgba(28, 34, 45, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(124, 77, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 77, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    position: relative;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.toast-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.toast-desc {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 20px;
    line-height: 1.4;
}


.phone-input-group {
    display: flex;
    gap: 8px;
    background: #0b0e14;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 15px;
}

.country-select {
    background: transparent;
    color: #fff;
    border: none;
    padding: 0 10px;
    font-size: 0.9rem;
    font-weight: bold;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    appearance: none;
}

.phone-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 12px 5px;
    font-size: 0.95rem;
    outline: none;
}

.btn-whatsapp-save {
    background: linear-gradient(135deg, #00e676, #00c853);
    color: #000;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-whatsapp-save:active { transform: scale(0.96); }


.promo-btn {
    background: linear-gradient(135deg, var(--accent), #4a2c96);
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-weight: 800;
    margin-top: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.close-toast-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.close-toast-corner:hover { background: rgba(255,255,255,0.2); }
