/* Chat Viewer Styles - Black Theme with Combos */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    min-height: 100vh;
    color: #fff;
    overflow: hidden;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s, visibility 0.3s;
}

.settings-panel.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.settings-content {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.settings-content h2 {
    color: #00ff88;
    margin-bottom: 25px;
    font-size: 2em;
}

.setting-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.setting-group:last-child {
    border-bottom: none;
}

.setting-group h3 {
    color: #00ff88;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-weight: 600;
}

.input-group input[type="text"],
.input-group input[type="number"] {
    width: 100%;
    padding: 12px;
    background: #000;
    border: 2px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 1em;
    transition: border-color 0.3s;
}

/* Feedback box styling (chat settings) */
.feedback-box {
    margin-top: 8px;
}

.feedback-box .input-group label {
    color: #cfeee0;
    font-size: 0.95em;
}

.feedback-box select,
.feedback-box textarea,
.feedback-box input[type="text"] {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.45);
    border: 1px solid #222;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95em;
    transition: all 0.18s ease-in-out;
}

.feedback-box textarea {
    min-height: 100px;
    resize: vertical;
}

.feedback-box select:focus,
.feedback-box textarea:focus,
.feedback-box input[type="text"]:focus {
    outline: none;
    box-shadow: 0 6px 18px rgba(0,255,136,0.06);
    border-color: #00ff88;
}

.ticket-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.primary-btn {
    padding: 12px 18px;
    min-width: 180px;
}

.ticket-status {
    color: #2c7a7b;
    font-size: 14px;
    opacity: 0; /* hidden by default until set via JS */
    transition: opacity 0.2s, transform 0.18s;
    transform: translateY(-4px);
}

.ticket-status.show {
    opacity: 1;
    transform: translateY(0);
}

/* When on mobile, hide all page UI except the mobile-warning-banner */
body.mobile-restricted {
    overflow: hidden;
}

body.mobile-restricted>*:not(.mobile-warning-banner) {
    display: none !important;
}

/* Mobile not supported banner */
.mobile-warning-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin: 12px 0 6px 0;
    border-radius: 10px;
    /* background: linear-gradient(90deg, rgba(255,149,0,0.06), rgba(255,255,255,0.01)); */
    /* border-left: 4px solid #ff9500; */
    color: #ffdca6;
    font-size: 0.95em;
}

.mobile-warning-banner .mobile-warning-dismiss {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.disabled-btn {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    filter: grayscale(20%);
}

.input-group input[type="text"]:focus,
.input-group input[type="number"]:focus {
    outline: none;
    border-color: #00ff88;
}

.input-group input[type="range"] {
    width: 100%;
    margin-top: 5px;
}

.primary-btn, .secondary-btn, .danger-btn, .warning-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.primary-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6f);
    color: #000;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

.secondary-btn {
    background: #333;
    color: #fff;
}

.secondary-btn:hover {
    background: #444;
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.font-size-controls button {
    padding: 8px 16px;
    font-size: 1em;
    min-width: 60px;
}

#font-size-display {
    color: #00ff88;
    font-weight: 700;
    font-size: 1.2em;
    min-width: 60px;
    text-align: center;
}

.danger-btn {
    background: #ff3366;
    color: #fff;
}

.danger-btn:hover {
    background: #cc0033;
}

.warning-btn {
    background: linear-gradient(135deg, #ff9500, #cc7700);
    color: #fff;
}

.warning-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 149, 0, 0.4);
}

.status-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid #ff9500;
    color: #ff9500;
    font-size: 13px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ff3366;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    transform: rotate(90deg);
    background: #ff0044;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    color: #aaa;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Chat Viewer */
.chat-viewer {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 2px solid #00ff88;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1000;
}

/* Main Content Area */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* User List Sidebar */
.user-list-sidebar {
    width: 280px;
    background: rgba(15, 15, 15, 0.95);
    border-right: 2px solid #333;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    position: relative;
    z-index: 10;
}

.user-list-sidebar.hidden {
    transform: translateX(-280px);
    margin-left: -280px;
}

.sidebar-header {
    padding: 15px;
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 2px solid #00ff88;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: #00ff88;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-count {
    background: rgba(0, 255, 136, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.9em;
}

.filter-active-banner {
    background: rgba(255, 0, 255, 0.2);
    border: 1px solid #ff00ff;
    border-radius: 8px;
    padding: 8px 12px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.filter-active-banner.show {
    display: flex;
}

.filter-username {
    color: #fff;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clear-filter-btn {
    background: transparent;
    border: 1px solid #ff00ff;
    color: #ff00ff;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s;
}

.clear-filter-btn:hover {
    background: #ff00ff;
    color: #fff;
}

.toggle-sidebar-btn {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-sidebar-btn:hover {
    border-color: #00ff88;
    color: #00ff88;
}

.user-search {
    padding: 15px;
    border-bottom: 1px solid #333;
}

.user-search input {
    width: 100%;
    padding: 10px 15px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95em;
    transition: all 0.3s;
}

.user-search input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.user-search input::placeholder {
    color: #666;
}

.users-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(30, 30, 30, 0.5);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.user-item:hover {
    background: rgba(40, 40, 40, 0.7);
    transform: translateX(5px);
}

.user-item.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 1em;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-messages {
    color: #888;
    font-size: 0.85em;
}

.user-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.user-action-btn:hover:not(:disabled) {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    transform: scale(1.1);
}

.user-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.no-users {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

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

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    transition: all 0.3s;
}

.status-dot.connecting {
    background: #ff9900;
    animation: pulse 1.5s infinite;
}

.status-dot.connected {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

#status-text {
    font-weight: 600;
    color: #fff;
    font-size: 1.1em;
}

.stats-section {
    display: flex;
    gap: 25px;
}

.stat-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stat-label {
    color: #888;
    font-size: 0.9em;
}

.stat-value {
    color: #00ff88;
    font-weight: 700;
    font-size: 1.1em;
}

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

.icon-btn {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    color: #00ff88;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: #00ff88;
    color: #000;
    transform: scale(1.1);
}

/* Hide user list button initially (shown only when TikTok is connected) */
#toggle-users-btn {
    display: none;
}

/* Chat Content with Split View (Side by Side) */
.chat-content {
    flex: 0 0 66.666%;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    gap: 0;
    background: #000;
}

/* Empty State */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-style: italic;
    font-size: 1.1em;
}

/* Messages Container */
.messages-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 30px;
    background: #000;
    position: relative;
}

/* TikTok Messages Container - 100% of chat-content when WhatsApp hidden, 50% when visible */
#all-messages-container {
    flex: 1;
    border-right: 1px solid rgba(0, 255, 136, 0.2);
    min-width: 0; /* Prevent overflow */
}

/* WhatsApp Container (50% of chat-content when visible, hidden takes no space) */
.whatsapp-full-height {
    flex: 0 0 50%;
    border-right: 1px solid rgba(0, 255, 136, 0.2);
    min-width: 0; /* Prevent overflow */
}

.whatsapp-full-height.hidden {
    flex: 0 0 0;
    display: none;
}

/* Right Panel Container (Combos + Gifts) (33.333% of total screen) */
.right-panel-horizontal {
    flex: 0 0 33.333%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0; /* Prevent overflow */
}

/* Combos Section (Full 33% column with gifts at bottom) */
.combos-section {
    flex: 1;
    border-left: none;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    position: relative;
}

/* Gifts Container (Compact at bottom) */
.gifts-container {
    flex: 0 0 120px;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gifts-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
}

.gifts-list::-webkit-scrollbar {
    width: 1px;
}

.gifts-list::-webkit-scrollbar-track {
    background: #111;
}

.gifts-list::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 10px;
}

.no-gifts {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-style: italic;
    font-size: 0.85em;
}

.gift-item {
    background: rgba(20, 20, 20, 0.5);
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    animation: giftSlideIn 0.3s ease-out;
}

/* High value gift (500+ diamonds) */
.gift-item-high {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.gift-item-high .gift-name {
    color: #ffed4e;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.gift-item-high .gift-diamonds {
    color: #ffd700;
    font-weight: 700;
}

@keyframes giftSlideIn {
    0% { transform: translateX(-10px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.gift-icon {
    font-size: 1.2em;
    line-height: 1;
}

.gift-name {
    color: #ffd700;
    font-weight: 600;
    white-space: nowrap;
}

.gift-sender {
    color: #00ff88;
    white-space: nowrap;
}

.gift-count {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
}

.gift-diamonds {
    color: #999;
    font-size: 0.9em;
    white-space: nowrap;
}

.messages-container::-webkit-scrollbar {
    width: 1px;
}

.messages-container::-webkit-scrollbar-track {
    background: #111;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 10px;
}

/* Scroll to Bottom Button */
.scroll-to-bottom-btn {
    position: fixed;
    bottom: 40px;
    background: rgba(37, 211, 102, 0.95);
    color: #000;
    border: 2px solid rgba(37, 211, 102, 0.3);
    border-radius: 30px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    white-space: nowrap;
}

/* Position for left container (TikTok/WhatsApp) */
#scroll-to-bottom-left {
    left: 25%;
    transform: translateX(-50%);
}

/* Position for right container (Combos) */
#scroll-to-bottom-right {
    left: 75%;
    transform: translateX(-50%);
}

.scroll-to-bottom-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
    background: rgba(37, 211, 102, 1);
}

.scroll-to-bottom-btn:active {
    transform: translateX(-50%) scale(0.98);
}

.scroll-to-bottom-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

/* Welcome Message */
.welcome-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0a0a;
    z-index: 1;
}

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

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

.welcome-message h1 {
    font-size: 5em;
    color: #00ff88;
    margin-bottom: 30px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.welcome-message .subtitle {
    font-size: 1.3em;
    color: #00ff88;
    margin-bottom: 10px;
}

.welcome-message .subtitle strong {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.welcome-message .instruction {
    font-size: 1.5em;
    color: #888;
    margin-top: 30px;
}

/* Message Combo */
.message-combo {
    margin-bottom: 15px;
    padding: 15px 20px;
    background: rgba(20, 20, 20, 0.5);
    border-radius: 12px;
    transition: all 0.3s;
}

.message-combo:hover {
    background: rgba(30, 30, 30, 0.7);
}

/* Moderator Message - Light Blue Background */
.message-combo.moderator-message {
    background: rgba(100, 180, 255, 0.15);
    border-left: 3px solid rgba(100, 180, 255, 0.6);
}

.message-combo.moderator-message:hover {
    background: rgba(100, 180, 255, 0.25);
}

.combo-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.combo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

/* Username Display */
.message-username {
    color: #00ff88;
    font-weight: 700;
    font-size: 0.95em;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.clickable-username {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-username:hover {
    color: #00ffaa;
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
}

/* Moderator Badge */
.mod-badge {
    display: inline-block;
    background: rgba(100, 180, 255, 0.3);
    color: #64b4ff;
    font-size: 0.7em;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-shadow: 0 0 8px rgba(100, 180, 255, 0.5);
    border: 1px solid rgba(100, 180, 255, 0.5);
}

/* First Time Chatter Badge */
.first-time-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    font-size: 0.7em;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.5);
}

/* First Time Chatter Message Highlight */
.first-time-message {
    background: rgba(255, 215, 0, 0.08) !important;
}

/* Link Message Highlight - Blue Background */
.link-message {
    background: rgba(30, 144, 255, 0.15) !important;
    border-left: 3px solid rgba(30, 144, 255, 0.6) !important;
}

.link-message .message-text {
    color: #87ceeb;
}

/* Timestamp Display */
.message-timestamp {
    color: #888;
    font-size: 0.85em;
    opacity: 0.5;
    margin-left: 10px;
}

/* Combo Badge */
.combo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff00ff, #ff0088);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9em;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Question Badge */
.question-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffa500, #ff8c00);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9em;
    margin-left: 6px;
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

/* Question Message Highlight */
.question-message {
    background: rgba(255, 165, 0, 0.15) !important;
}

.question-message .message-text {
    color: #ffe4b3;
}

.message-count {
    display: inline-block;
    background: rgba(0, 255, 136, 0.2);
    border: 2px solid #00ff88;
    color: #00ff88;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Message Text */
.message-text {
    font-size: 1.2em;
    color: #fff;
    line-height: 1.5;
    word-wrap: break-word;
    flex: 1;
}

/* @Mention Highlighting */
.message-text .mention {
    background: #00ff88;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    cursor: pointer;
    transition: all 0.2s;
}

.message-text .mention:hover {
    background: #00cc6a;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

/* Message Meta */
.message-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #888;
    flex-wrap: wrap;
}

.meta-username,
.meta-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-username {
    color: #00ff88;
    font-weight: 600;
}

/* Variations - Always visible with fixed height */
.variations-container {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #333;
}

.variations-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 120px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.variations-list::-webkit-scrollbar {
    width: 1px;
}

.variations-list::-webkit-scrollbar-track {
    background: #111;
}

.variations-list::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 10px;
}

.variations-list li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    color: #ccc;
    font-size: 0.95em;
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.variation-username {
    color: #00ff88;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: color 0.2s;
}

.variation-username:hover {
    color: #00ffaa;
    text-decoration: underline;
}

.variation-text {
    color: #ccc;
    font-size: 0.95em;
}

/* Mentioned user highlight box - Separate element */
.mentioned-user-box {
    margin: 10px 0;
    padding: 10px 12px;
    background: rgba(255, 215, 0, 0.15);
    border-left: 3px solid #ffd700;
    border-radius: 6px;
    animation: slideIn 0.3s ease-out;
}

.mentioned-user-header {
    color: #ffd700;
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mentioned-user-count {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 700;
}

.mentioned-user-name {
    color: #ffd700;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
}

.mentioned-user-name:hover {
    color: #ffed4e;
    text-decoration: underline;
}

.mentioned-user-message {
    color: #fff;
    font-size: 0.95em;
    margin-top: 4px;
}

/* Scrollbar for settings */
.settings-content::-webkit-scrollbar {
    width: 1px;
}

.settings-content::-webkit-scrollbar-track {
    background: #000;
    border-radius: 10px;
}

.settings-content::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 10px;
}

.settings-content::-webkit-scrollbar-thumb:hover {
    background: #00cc6f;
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .top-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .features {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .welcome-message h1 {
        font-size: 2.5em;
    }
    
    .welcome-message p {
        font-size: 1.2em;
    }
    
    .message-text {
        font-size: 1.2em;
    }
    
    .combo-badge {
        font-size: 1em;
    }
}

/* TikTok Messages (33% width, full height) */
.tiktok-messages {
    flex: 1;
    min-width: 250px;
}

/* WhatsApp Container (33% width, full height) - No rounded corners */
.whatsapp-container {
    background: rgba(10, 10, 10, 0.8);
    border-radius: 0;
    padding: 0;
    border: none;
    border-right: 1px solid rgba(0, 255, 136, 0.2);
    display: flex;
    flex-direction: column;
}

.whatsapp-full-height {
    flex: 0 0 50%;
    min-width: 250px;
    max-height: none;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

.whatsapp-status {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    text-align: center;
    color: #888;
}

.whatsapp-status.connected {
    background: rgba(37, 211, 102, 0.2);
    color: #25D366;
}

.whatsapp-status.error {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

.whatsapp-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin: 15px 0;
}

.whatsapp-qr p {
    margin: 0 0 15px 0;
    color: #000;
    font-weight: 600;
}

#whatsapp-qr-canvas {
    border-radius: 8px;
}

.whatsapp-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    min-height: 200px;
}

.whatsapp-message {
    background: transparent;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.whatsapp-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.whatsapp-sender {
    color: #25D366;
    font-weight: 700;
    font-size: 0.95em;
}

.whatsapp-number {
    color: #888;
    font-size: 0.85em;
    font-weight: 400;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    user-select: none;
}

.whatsapp-number:hover {
    opacity: 1;
    color: #25D366;
}

.whatsapp-timestamp {
    color: #888;
    font-size: 0.8em;
}

.whatsapp-group-badge {
    display: inline-block;
    background: rgba(37, 211, 102, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    margin-left: 6px;
    color: #25D366;
}

.whatsapp-message-body {
    color: #fff;
    line-height: 1.4;
    word-wrap: break-word;
}

.whatsapp-reply-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: transparent;
    color: #25D366;
    border: 1px solid #25D366;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

.whatsapp-reply-btn:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: #20b858;
    color: #20b858;
}

.whatsapp-filter {
    padding: 10px;
    background: rgba(15, 15, 15, 0.95);
    border-bottom: 1px solid #333;
    display: flex;
    gap: 8px;
}

.whatsapp-filter input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9em;
}

.whatsapp-filter input:focus {
    outline: none;
    border-color: #25D366;
}

.whatsapp-filter button {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.whatsapp-filter button:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* WhatsApp Input Container */
.whatsapp-input-container {
    padding: 12px;
    background: rgba(15, 15, 15, 0.95);
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

.whatsapp-input-container input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95em;
}

.whatsapp-input-container input:focus {
    outline: none;
    border-color: #25D366;
}

.whatsapp-input-container input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.whatsapp-input-container button {
    padding: 10px 20px;
    background: #25D366;
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.whatsapp-input-container button:hover:not(:disabled) {
    background: #20b858;
}

.whatsapp-input-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(37, 211, 102, 0.3);
}

/* WhatsApp Sent Message */
.whatsapp-sent-message {
    background: transparent !important;
    border-left: none !important;
}

.whatsapp-sent-message .whatsapp-sender {
    color: #0088ff;
}

.whatsapp-media {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.whatsapp-media img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.whatsapp-media-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #25D366;
}

.no-messages {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

/* WhatsApp Settings Section */
.whatsapp-settings-status {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    color: #888;
}

.whatsapp-settings-status.connected {
    background: rgba(37, 211, 102, 0.2);
    color: #25D366;
}

.whatsapp-settings-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin: 15px 0;
}

.whatsapp-settings-qr p {
    margin: 0 0 15px 0;
    color: #000;
    font-weight: 600;
}

/* TikTok Settings Section */
.tiktok-settings-status {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    color: #888;
}

.tiktok-settings-status.connected {
    background: rgba(0, 242, 234, 0.2);
    color: #00f2ea;
}

.tiktok-settings-status.connecting {
    background: rgba(255, 149, 0, 0.2);
    color: #ff9500;
}

.tiktok-settings-status.rate-limited {
    background: rgba(255, 149, 0, 0.2);
    color: #ff9500;
}

/* YouTube Settings Section */
.youtube-settings-status {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    color: #888;
}

.youtube-settings-status.connected {
    background: rgba(255, 0, 0, 0.2);
    color: #FF0000;
}

/* YouTube Badge */
.youtube-badge {
    display: inline-block;
    background: #FF0000;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    margin-right: 6px;
    vertical-align: middle;
}

/* TikTok Badge */
.tiktok-badge {
    display: inline-block;
    background: #666;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    margin-right: 6px;
    vertical-align: middle;
}

#whatsapp-settings-qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 256px;
    min-width: 256px;
}

#whatsapp-settings-qr-code img {
    border-radius: 8px;
    display: block;
}

/* Fullscreen Image Viewer */
.image-viewer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-viewer-overlay.active {
    display: flex;
}

.image-viewer-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-viewer-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 32px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10001;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, opacity 0.3s;
    z-index: 10001;
}

.image-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-viewer-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-viewer-prev {
    left: 20px;
}

.image-viewer-next {
    right: 20px;
}

.image-viewer-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10001;
}

/* Billing Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
