:root {
    --wpc-primary: #6366f1;
    --wpc-primary-dark: #4f46e5;
    --wpc-primary-light: #818cf8;
    --wpc-primary-bg: #eef2ff;
    --wpc-success: #10b981;
    --wpc-danger: #ef4444;
    --wpc-warning: #f59e0b;
    --wpc-gray-50: #f9fafb;
    --wpc-gray-100: #f3f4f6;
    --wpc-gray-200: #e5e7eb;
    --wpc-gray-300: #d1d5db;
    --wpc-gray-400: #9ca3af;
    --wpc-gray-500: #6b7280;
    --wpc-gray-600: #4b5563;
    --wpc-gray-700: #374151;
    --wpc-gray-800: #1f2937;
    --wpc-gray-900: #111827;
    --wpc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wpc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --wpc-radius: 16px;
    --wpc-radius-sm: 8px;
    --wpc-radius-full: 9999px;
}

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

/* Footer Links */
footer li a {
    color: #00CED1 !important;
}

/* Main Container */
.wp-pro-chat-container {
    display: flex;
    height: 99vh;
    height: 99dvh;
    max-height: 99vh;
    max-height: 99dvh;
    position: relative;
    background: var(--wpc-gray-50);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    box-sizing: border-box;
}

/* Desktop Layout */
@media (min-width: 769px) {
    .wp-pro-chat-container {
        height: 99dvh;
        max-height: 99dvh;
        max-width: 1500px;
        margin: 0 auto;
    }

    /* Video Recorder Modal - Desktop */
    .wp-pro-chat-recorder-modal {
        z-index: 10000;
    }

    .wp-pro-chat-recorder-content {
        border-radius: 20px;
        max-width: 500px;
    }

    .wp-pro-chat-recorder-preview {
        position: relative;
        width: 100%;
        aspect-ratio: 16/9;
        background: #000;
    }

    .wp-pro-chat-recorder-preview video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .wp-pro-chat-recorder-header {
        padding: 16px 20px;
    }

    .wp-pro-chat-recorder-title {
        font-size: 16px;
    }

    .wp-pro-chat-recorder-controls {
        padding: 20px;
        gap: 24px;
    }

    .wp-pro-chat-recorder-mode {
        width: 54px;
        height: 54px;
        font-size: 22px;
    }

    .wp-pro-chat-recorder-start {
        width: 78px;
        height: 78px;
        font-size: 26px;
    }

    .wp-pro-chat-recorder-flip {
        width: 42px;
        height: 42px;
        font-size: 18px;
        top: 14px;
        right: 14px;
    }

    .wp-pro-chat-recorder-timer {
        top: 14px;
        left: 14px;
        font-size: 15px;
        padding: 5px 12px;
    }

    .wp-pro-chat-recorder-send {
        padding: 12px 28px;
        font-size: 15px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .wp-pro-chat-recorder-content {
        max-width: 560px;
    }

    .wp-pro-chat-recorder-preview {
        aspect-ratio: 16/9;
    }

    .wp-pro-chat-recorder-controls {
        padding: 24px;
        gap: 28px;
    }

    .wp-pro-chat-recorder-mode {
        width: 58px;
        height: 58px;
        font-size: 24px;
    }

    .wp-pro-chat-recorder-start {
        width: 84px;
        height: 84px;
        font-size: 28px;
    }

    .wp-pro-chat-recorder-send {
        padding: 14px 32px;
        font-size: 16px;
    }
}

/* Header */
.wp-pro-chat-header {
    display: none;
}

/* Sidebar - User List */
.wp-pro-chat-sidebar {
    width: 320px;
    background: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--wpc-gray-200);
    overflow: hidden;
    flex-shrink: 0;
}

.wp-pro-chat-sidebar-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white;
    flex-shrink: 0;
    box-sizing: border-box;
}

.wp-pro-chat-sidebar-header h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
}

.wp-pro-chat-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.wp-pro-chat-user-info > img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.wp-pro-chat-user-info span {
    font-weight: 500;
    font-size: 15px;
}

.wp-pro-chat-logout-btn {
    margin-left: auto;
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.wp-pro-chat-logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

.wp-pro-chat-logout-form {
    margin-left: auto;
    display: flex;
}

/* Header top row with 3-dot menu */
.wp-pro-chat-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wp-pro-chat-header-top h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.wp-pro-chat-header-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wp-pro-chat-menu-btn {
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    letter-spacing: 2px;
    padding: 0;
}

.wp-pro-chat-menu-btn:hover {
    background: rgba(255,255,255,0.3);
}

.wp-pro-chat-header-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 160px;
    z-index: 300;
    overflow: hidden;
    padding: 4px;
}

.wp-pro-chat-header-menu.active {
    display: block;
}

.wp-pro-chat-menu-form {
    margin: 0;
    display: block;
}

.wp-pro-chat-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--wpc-gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s;
    box-sizing: border-box;
    white-space: nowrap;
}

.wp-pro-chat-menu-item:hover {
    background: var(--wpc-gray-100);
    color: var(--wpc-gray-900);
}

.wp-pro-chat-menu-item svg {
    flex-shrink: 0;
    stroke: currentColor;
}

/* Tabs */
.wp-pro-chat-tabs {
    display: flex;
    background: rgba(255,255,255,0.15);
    border-radius: var(--wpc-radius-sm);
    padding: 4px;
}

.wp-pro-chat-tab {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.wp-pro-chat-tab:hover {
    color: white;
}

.wp-pro-chat-tab.active {
    background: white;
    color: var(--wpc-primary);
}

/* Mobile Navigation Buttons */
.wp-pro-chat-mobile-nav {
    display: none;
    background: rgba(255,255,255,0.15);
    border-radius: var(--wpc-radius-sm);
    padding: 4px;
}

.wp-pro-chat-mobile-btn {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.wp-pro-chat-mobile-btn:hover {
    color: white;
}

.wp-pro-chat-mobile-btn.active {
    background: white;
    color: var(--wpc-primary);
}

/* Search Box */
.wp-pro-chat-search-box {
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid var(--wpc-gray-100);
}

.wp-pro-chat-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--wpc-gray-200);
    border-radius: var(--wpc-radius-full);
    font-size: 14px;
    background: var(--wpc-gray-50);
    transition: all 0.2s;
    box-sizing: border-box;
}

.wp-pro-chat-search-input:focus {
    outline: none;
    border-color: var(--wpc-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wp-pro-chat-search-box {
    position: relative;
}

.wp-pro-chat-search-box::before {
    content: '🔍';
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}

/* User/Group List */
.wp-pro-chat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--wpc-gray-300) transparent;
    background: #f5f5f5;
}

.wp-pro-chat-list::-webkit-scrollbar {
    width: 6px;
}

.wp-pro-chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.wp-pro-chat-list::-webkit-scrollbar-thumb {
    background: var(--wpc-gray-300);
    border-radius: 3px;
}

.wp-pro-chat-list::-webkit-scrollbar {
    width: 6px;
}

.wp-pro-chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.wp-pro-chat-list::-webkit-scrollbar-thumb {
    background: var(--wpc-gray-300);
    border-radius: 3px;
}

/* List Item */
.wp-pro-chat-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: var(--wpc-radius);
    cursor: pointer;
    transition: all 0.15s;
    gap: 14px;
    margin-bottom: 4px;
}

.wp-pro-chat-item:hover {
    background: var(--wpc-gray-50);
}

.wp-pro-chat-item.active {
    background: var(--wpc-primary-bg);
}

.wp-pro-chat-item.active:hover {
    background: var(--wpc-primary-bg);
}

/* Avatar */
.wp-pro-chat-avatar {
    position: relative;
    flex-shrink: 0;
}

.wp-pro-chat-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.wp-pro-chat-avatar.group-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--wpc-radius-sm);
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.wp-pro-chat-avatar::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: var(--wpc-success);
    border-radius: 50%;
    border: 3px solid white;
    display: none;
}

.wp-pro-chat-item[data-online="true"] .wp-pro-chat-avatar::after {
    display: block;
}

/* Item Info */
.wp-pro-chat-item-info {
    flex: 1;
    min-width: 0;
}

.wp-pro-chat-item-name {
    font-weight: 600;
    font-size: 17px;
    color: var(--wpc-gray-900);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-pro-chat-item-preview {
    font-size: 16px;
    color: var(--wpc-gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-pro-chat-item-time {
    font-size: 13px;
    color: var(--wpc-gray-400);
    margin-left: 8px;
    flex-shrink: 0;
}

.wp-pro-chat-badge {
    background: var(--wpc-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: var(--wpc-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Empty State */
.wp-pro-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    margin: auto;
    width: 100%;
}

.wp-pro-chat-empty::before {
    content: '';
    display: block;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 100%);
    border-radius: 50%;
    opacity: 0.3;
}

.wp-pro-chat-empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
    filter: grayscale(100%);
    opacity: 0.4;
}

.wp-pro-chat-empty p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.3px;
}

/* New Message Indicator */
#new-message-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    animation: slideUp 0.3s ease;
}

#new-message-indicator:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Chat Area */
.wp-pro-chat-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    height: 100%;
}

/* Chat Header */
.wp-pro-chat-chat-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: white;
    border-bottom: 1px solid var(--wpc-gray-100);
    gap: 14px;
    flex-shrink: 0;
    height: 60px;
    box-sizing: border-box;
}

.wp-pro-chat-back {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--wpc-gray-100);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wp-pro-chat-back:hover {
    background: var(--wpc-gray-200);
}

.wp-pro-chat-header-avatar img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}

.wp-pro-chat-header-avatar.group-avatar {
    width: 46px;
    height: 46px;
    border-radius: var(--wpc-radius-sm);
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.wp-pro-chat-header-info {
    flex: 1;
}

.wp-pro-chat-header-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--wpc-gray-900);
}

.wp-pro-chat-header-status {
    font-size: 13px;
    color: var(--wpc-gray-500);
}

.wp-pro-chat-header-status.online {
    color: var(--wpc-success);
}

.wp-pro-chat-header-actions {
    display: flex;
    gap: 8px;
}

.wp-pro-chat-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--wpc-gray-100);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wp-pro-chat-action-btn:hover {
    background: var(--wpc-gray-200);
}

.wp-pro-chat-action-btn.danger {
    background: #fef2f2;
    color: var(--wpc-danger);
}

.wp-pro-chat-action-btn.danger:hover {
    background: #fee2e2;
}

/* Messages Area */
.wp-pro-chat-messages {
    flex: 1;
    min-height: 200px;
    max-height: none;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    box-sizing: border-box;
    position: relative;
}

.wp-pro-chat-messages::-webkit-scrollbar {
    width: 15px;
}

.wp-pro-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.wp-pro-chat-messages::-webkit-scrollbar-thumb {
    background: var(--wpc-gray-300);
    border-radius: 3px;
}

.wp-pro-chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--wpc-gray-400);
}

/* Message Bubble */
.wp-pro-chat-message {
    display: flex;
    max-width: 75%;
}

.wp-pro-chat-message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.wp-pro-chat-message.received {
    align-self: flex-start;
}

.wp-pro-chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 10px;
    flex-shrink: 0;
    align-self: flex-end;
}

.wp-pro-chat-message-content {
    display: flex;
    flex-direction: column;
}

.wp-pro-chat-message-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--wpc-primary);
    margin-bottom: 4px;
    margin-left: 12px;
}

.wp-pro-chat-message-bubble {
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 20px;
    line-height: 1.5;
    word-break: break-word;
}

.wp-pro-chat-bubble-text {
    word-break: break-word;
}

.wp-pro-chat-message.sent .wp-pro-chat-message-bubble {
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white;
    border-bottom-right-radius: 6px;
}

.wp-pro-chat-message.sent .wp-pro-chat-bubble-text {
    color: white;
}

.wp-pro-chat-message.received .wp-pro-chat-message-bubble {
    background: white;
    color: var(--wpc-gray-800);
    border-bottom-left-radius: 6px;
    box-shadow: var(--wpc-shadow);
}

.wp-pro-chat-message-time {
    font-size: 11px;
    color: var(--wpc-gray-400);
    margin-top: 4px;
    padding: 0 4px;
}

.wp-pro-chat-message-attachment {
    margin: -11px -11px 4px -11px;
    padding: 1px;
    border-radius: 10px;
}

.wp-pro-chat-message-attachment:last-child {
    margin-bottom: 0;
}

.wp-pro-chat-media-link {
    display: block;
}

.wp-pro-chat-media-img {
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    max-width: 320px;
    max-height: 280px;
    object-fit: cover;
}

.wp-pro-chat-media-img[src*=".gif"],
.wp-pro-chat-media-img.gif-image {
    object-fit: contain;
}

.wp-pro-chat-media-img:hover {
    transform: scale(1.02);
}

.wp-pro-chat-video-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    max-width: 320px;
    max-height: 250px;
}

.wp-pro-chat-video {
    width: 100%;
    max-height: 250px;
    display: block;
    background: #000;
}

.wp-pro-chat-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background 0.3s;
}

.wp-pro-chat-video-container:hover .wp-pro-chat-video-overlay {
    background: rgba(0,0,0,0.2);
}

.wp-pro-chat-play-btn {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    padding-left: 4px;
    transition: transform 0.2s, background 0.2s;
}

.wp-pro-chat-video-container:hover .wp-pro-chat-play-btn {
    transform: scale(1.1);
    background: white;
}

.wp-pro-chat-video::-webkit-media-controls {
    display: flex !important;
}

.wp-pro-chat-file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-pro-chat-message.received .wp-pro-chat-file-link {
    background: var(--wpc-gray-100);
    color: var(--wpc-primary);
}

.wp-pro-chat-file-link:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.wp-pro-chat-message.sent .wp-pro-chat-message-time {
    text-align: right;
}

/* Input Area */
.wp-pro-chat-input {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid var(--wpc-gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    height: auto;
    min-height: 70px;
    box-sizing: border-box;
    position: relative;
}

.wp-pro-chat-input form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wp-pro-chat-input-field {
    flex: 1;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: var(--wpc-radius-full);
    padding: 6px 6px 6px 16px;
    transition: all 0.2s;
    min-width: 0;
}

.wp-pro-chat-input-field:focus-within {
    border-color: var(--wpc-primary);
    background: #ffffff;
}

.wp-pro-chat-input-field input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 8px;
    font-size: 15px;
    outline: none;
    min-width: 0;
    width: 100%;
    color: #000000;
}

.wp-pro-chat-send-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: none;
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wp-pro-chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.wp-pro-chat-send-btn:active {
    transform: scale(0.95);
}

/* Emoji Picker */
.wp-pro-chat-emoji-btn,
.wp-pro-chat-attach-btn,
.wp-pro-chat-gif-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: none;
    background: var(--wpc-gray-100);
    color: var(--wpc-gray-600);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wp-pro-chat-emoji-btn:hover,
.wp-pro-chat-attach-btn:hover {
    background: var(--wpc-gray-200);
    transform: scale(1.05);
}

.wp-pro-chat-camera-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: none;
    background: var(--wpc-gray-100);
    color: var(--wpc-gray-600);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wp-pro-chat-camera-btn:hover {
    background: var(--wpc-gray-200);
    transform: scale(1.05);
}

/* Video Recorder Modal */
.wp-pro-chat-recorder-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
}

.wp-pro-chat-recorder-modal.active {
    display: block;
}

#recorder-error {
    display: none;
    position: absolute;
    bottom: 100px;
    left: 10px;
    right: 10px;
    padding: 10px 15px;
    background: #dc3545;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    z-index: 10001;
}

.wp-pro-chat-recorder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
}

.wp-pro-chat-recorder-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 420px;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

.wp-pro-chat-recorder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #2a2a2a;
}

.wp-pro-chat-recorder-title {
    color: white;
    font-weight: 600;
    font-size: 15px;
}

.wp-pro-chat-recorder-close {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.wp-pro-chat-recorder-close:hover {
    color: white;
}

.wp-pro-chat-recorder-preview {
    position: relative;
    background: #000;
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wp-pro-chat-recorder-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-pro-chat-recorder-timer {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-family: monospace;
    z-index: 5;
    display: none;
}

.wp-pro-chat-recorder-timer.active {
    display: block;
}

.wp-pro-chat-recorder-flip {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
}

.wp-pro-chat-recorder-flip:hover {
    background: rgba(0,0,0,0.8);
}

.wp-pro-chat-recorder-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 16px;
}

.wp-pro-chat-recorder-mode {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #444;
    background: transparent;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-pro-chat-recorder-mode.active {
    border-color: #4a9eff;
    color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

.wp-pro-chat-recorder-start {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid white;
    background: #e74c3c;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.wp-pro-chat-recorder-start:hover {
    background: #c0392b;
}

.wp-pro-chat-recorder-start.recording {
    background: #e74c3c;
    animation: pulse-recording 1s infinite;
}

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

.wp-pro-chat-recorder-send {
    padding: 10px 24px;
    border-radius: 24px;
    border: none;
    background: #27ae60;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
}

.wp-pro-chat-recorder-send.active {
    display: block;
}

.wp-pro-chat-recorder-send:hover {
    background: #219a52;
}

.wp-pro-chat-recorder-preview canvas {
    display: none;
}

/* Attachment Preview */
.wp-pro-chat-attachment-preview {
    position: absolute;
    bottom: 80px;
    left: 16px;
    background: white;
    border-radius: var(--wpc-radius);
    box-shadow: var(--wpc-shadow-lg);
    padding: 8px;
    max-width: 200px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 200;
}

.wp-pro-chat-attachment-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.wp-pro-chat-attachment-content img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.wp-pro-chat-attachment-content .file-name {
    font-size: 12px;
    color: var(--wpc-gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.wp-pro-chat-remove-attachment {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--wpc-gray-100);
    color: var(--wpc-gray-500);
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wp-pro-chat-remove-attachment:hover {
    background: var(--wpc-danger);
    color: white;
}

.wp-pro-chat-emoji-picker {
    display: none;
    position: absolute;
    bottom: 80px;
    left: 16px;
    background: white;
    border-radius: var(--wpc-radius);
    box-shadow: var(--wpc-shadow-lg);
    width: 350px;
    z-index: 200;
    flex-direction: column;
    overflow: hidden;
}

.wp-pro-chat-emoji-picker.active {
    display: flex;
}

.wp-pro-chat-emoji-tabs {
    display: flex;
    flex-shrink: 0;
    padding: 6px 8px 0 8px;
    gap: 2px;
    border-bottom: 1px solid var(--wpc-gray-200);
    background: var(--wpc-gray-50);
}

.wp-pro-chat-emoji-tab {
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.15s;
    opacity: 0.5;
    filter: grayscale(1);
}

.wp-pro-chat-emoji-tab:hover {
    opacity: 0.8;
    background: var(--wpc-gray-100);
}

.wp-pro-chat-emoji-tab.active {
    opacity: 1;
    filter: grayscale(0);
    background: white;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
}

.wp-pro-chat-emoji-body {
    display: flex;
    flex-direction: column;
    padding: 8px;
    overflow-y: auto;
    max-height: 300px;
    gap: 2px;
}

.wp-pro-chat-emoji-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding-bottom: 8px;
}

.wp-pro-chat-emoji-category {
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    color: var(--wpc-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 0 4px 4px;
    margin-bottom: 2px;
}

.wp-pro-chat-emoji {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.12s;
    flex-shrink: 0;
}

.wp-pro-chat-emoji:hover {
    background: var(--wpc-gray-100);
    transform: scale(1.25);
}

/* Create Group Form */
.wp-pro-chat-create {
    padding: 12px;
    margin-bottom: 8px;
}

.wp-pro-chat-create form {
    display: flex;
    gap: 8px;
}

.wp-pro-chat-create input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--wpc-gray-200);
    border-radius: var(--wpc-radius);
    font-size: 13px;
}

.wp-pro-chat-create input:focus {
    outline: none;
    border-color: var(--wpc-primary);
}

.wp-pro-chat-create button {
    padding: 10px 16px;
    background: var(--wpc-primary);
    color: white;
    border: none;
    border-radius: var(--wpc-radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* Auth Forms */
.wp-pro-chat-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 32px;
    background: white;
    border-radius: var(--wpc-radius);
    box-shadow: var(--wpc-shadow-lg);
}

.wp-pro-chat-form h2 {
    margin: 0 0 24px 0;
    font-size: 24px;
    color: var(--wpc-gray-900);
    text-align: center;
}

.wp-pro-chat-field {
    margin-bottom: 20px;
}

.wp-pro-chat-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--wpc-gray-700);
    margin-bottom: 8px;
}

.wp-pro-chat-field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--wpc-gray-300);
    border-radius: var(--wpc-radius);
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.wp-pro-chat-field input:focus {
    outline: none;
    border-color: var(--wpc-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wp-pro-chat-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--wpc-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wp-pro-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.wp-pro-chat-alert {
    padding: 14px 16px;
    border-radius: var(--wpc-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.wp-pro-chat-alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.wp-pro-chat-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.wp-pro-chat-notice {
    padding: 40px 20px;
    text-align: center;
    color: var(--wpc-gray-600);
    background: var(--wpc-gray-50);
    border-radius: var(--wpc-radius);
    margin: 40px auto;
    max-width: 400px;
}

/* Modern Auth Container */
.wp-pro-chat-auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.wp-pro-chat-auth-card {
    background: white;
    border-radius: 24px;
    padding: 48px 40px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: wpProChatFadeIn 0.5s ease-out;
}

@keyframes wpProChatFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-pro-chat-auth-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: wpProChatBounce 2s infinite;
}

@keyframes wpProChatBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.wp-pro-chat-auth-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.wp-pro-chat-auth-card p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.wp-pro-chat-auth-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white !important;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.wp-pro-chat-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.wp-pro-chat-auth-error .wp-pro-chat-auth-icon {
    animation: none;
}

.wp-pro-chat-auth-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.wp-pro-chat-auth-error h2 {
    color: #dc2626;
}

.wp-pro-chat-auth-roles {
    font-size: 14px;
    color: #991b1b;
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    display: inline-block;
}

/* Mobile Auth */
@media (max-width: 768px) {
    .wp-pro-chat-auth-card {
        padding: 36px 24px;
        border-radius: 20px;
    }
    
    .wp-pro-chat-auth-icon {
        font-size: 48px;
    }
    
    .wp-pro-chat-auth-card h2 {
        font-size: 24px;
    }
    
    .wp-pro-chat-auth-btn {
        padding: 14px 32px;
        font-size: 15px;
    }
}

.wp-pro-chat-logged-in {
    padding: 20px;
    text-align: center;
    background: #dcfce7;
    color: #166534;
    border-radius: var(--wpc-radius);
    margin: 40px auto;
    max-width: 400px;
}

/* Loading */
.wp-pro-chat-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--wpc-gray-400);
    font-size: 14px;
}

/* Inline Forms */
.inline {
    display: inline;
}

/* ==================== */
/* RESPONSIVE - TABLET  */
/* ==================== */
@media (min-width: 481px) and (max-width: 768px) {
    .wp-pro-chat-recorder-content {
        max-width: 440px;
        border-radius: 16px;
    }

    .wp-pro-chat-recorder-preview {
        aspect-ratio: 4/3;
    }

    .wp-pro-chat-recorder-controls {
        padding: 18px;
        gap: 22px;
    }

    .wp-pro-chat-recorder-mode {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .wp-pro-chat-recorder-start {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }

    .wp-pro-chat-recorder-send {
        padding: 11px 24px;
        font-size: 14px;
    }

    .wp-pro-chat-recorder-send.active {
        display: block;
    }

    .wp-pro-chat-recorder-flip {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .wp-pro-chat-recorder-timer {
        font-size: 14px;
        padding: 4px 10px;
    }
}

/* ==================== */
/* RESPONSIVE - MOBILE (Small) */
/* ==================== */
@media (max-width: 480px) {
    .wp-pro-chat-recorder-modal {
        z-index: 100000;
    }

    .wp-pro-chat-recorder-content {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 90dvh;
        display: flex;
        flex-direction: column;
    }

    .wp-pro-chat-recorder-preview {
        position: relative;
        width: 100%;
        aspect-ratio: 9/16;
        background: #000;
        flex-shrink: 0;
        max-height: 55vh;
    }

    .wp-pro-chat-recorder-preview video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .wp-pro-chat-recorder-header {
        padding: 12px 16px;
        flex-shrink: 0;
    }

    .wp-pro-chat-recorder-title {
        font-size: 15px;
    }

    .wp-pro-chat-recorder-close {
        width: 34px;
        height: 34px;
        font-size: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
    }

    .wp-pro-chat-recorder-controls {
        padding: 16px 12px;
        gap: 16px;
        flex-shrink: 0;
    }

    .wp-pro-chat-recorder-mode {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .wp-pro-chat-recorder-start {
        width: 66px;
        height: 66px;
        font-size: 20px;
    }

    .wp-pro-chat-recorder-send {
        padding: 10px 20px;
        font-size: 14px;
    }

    .wp-pro-chat-recorder-send.active {
        display: block;
    }

    .wp-pro-chat-recorder-flip {
        width: 34px;
        height: 34px;
        font-size: 16px;
        top: 8px;
        right: 8px;
    }

    .wp-pro-chat-recorder-timer {
        top: 8px;
        left: 8px;
        font-size: 13px;
        padding: 4px 10px;
    }
    
    .wp-pro-chat-sidebar {
        width: 100%;
        max-width: 100%;
        flex: 1;
        min-height: 0;
    }
    
    .wp-pro-chat-sidebar-header {
        padding: 10px 12px;
    }
    
    .wp-pro-chat-header-top {
        margin-bottom: 8px;
    }
    
    .wp-pro-chat-header-top h3 {
        font-size: 16px;
    }
    
    .wp-pro-chat-menu-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .wp-pro-chat-header-menu {
        min-width: 140px;
    }
    
    .wp-pro-chat-user-info img,
    .wp-pro-chat-avatar-wrap {
        width: 32px;
        height: 32px;
    }
    
    .wp-pro-chat-user-info span {
        font-size: 20px;
    }
    
    .wp-pro-chat-tabs {
        display: none;
    }
    
    .wp-pro-chat-mobile-nav {
        display: flex;
    }
    
    .wp-pro-chat-search-box {
        padding: 8px 12px;
    }
    
    .wp-pro-chat-search-input {
        padding: 10px 14px 10px 38px;
        font-size: 16px;
    }
    
    .wp-pro-chat-list {
        background: #f5f5f5;
    }
    
    .wp-pro-chat-item {
        padding: 10px 12px;
        gap: 12px;
    }
    
    .wp-pro-chat-avatar img,
    .wp-pro-chat-avatar.group-avatar {
        width: 44px;
        height: 44px;
    }
    
    .wp-pro-chat-item-name {
        font-size: 17px;
    }
    
    .wp-pro-chat-item-preview {
        font-size: 16px;
    }
    
    .wp-pro-chat-main {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        background: white;
        display: none;
        flex: 1;
        min-height: 0;
        width: 100%;
    }
    
    .wp-pro-chat-main.active {
        display: flex !important;
    }
    
    .wp-pro-chat-back {
        display: flex;
        width: 40px;
        height: 40px;
    }
    
    .wp-pro-chat-chat-header {
        padding: 8px 12px;
        height: 52px;
        gap: 12px;
        background: #e8e8e8;
    }
    
    .wp-pro-chat-header-avatar img,
    .wp-pro-chat-header-avatar.group-avatar {
        width: 40px;
        height: 40px;
    }
    
    .wp-pro-chat-header-name {
        font-size: 15px;
    }
    
    .wp-pro-chat-header-status {
        font-size: 12px;
    }
    
    .wp-pro-chat-messages {
        padding: 12px 10px;
        flex: 1;
        height: auto;
        max-height: none;
        min-height: 150px;
        background: #fafafa;
    }
    
    .wp-pro-chat-message {
        max-width: 85%;
    }
    
    .wp-pro-chat-message-bubble {
        padding: 10px 14px;
        font-size: 20px;
    }
    
    .wp-pro-chat-message-avatar {
        width: 28px;
        height: 28px;
    }
    
    .wp-pro-chat-input {
        height: auto;
        min-height: 54px;
        padding: 6px 10px;
        gap: 8px;
        background: #1a1a1a;
    }
    
    .wp-pro-chat-input-field {
        padding: 4px 4px 4px 14px;
        background: #ffffff;
    }
    
    .wp-pro-chat-input-field input {
        padding: 8px 6px;
        font-size: 15px;
        color: #000000;
    }
    
    .wp-pro-chat-input-field input::placeholder {
        color: #888;
    }
    
    .wp-pro-chat-send-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
    
    .wp-pro-chat-emoji-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 24px;
    }
    
    .wp-pro-chat-camera-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 24px;
    }
    
    .wp-pro-chat-attach-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 24px;
    }
    
    .wp-pro-chat-emoji-picker {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 60px;
    }
    
    .wp-pro-chat-emoji-body {
        max-height: 180px;
    }
    
    #new-message-indicator {
        bottom: 70px;
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .wp-pro-chat-message {
        max-width: 90%;
    }
    
    .wp-pro-chat-message-bubble {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .wp-pro-chat-avatar img,
    .wp-pro-chat-avatar.group-avatar {
        width: 44px;
        height: 44px;
    }
    
    .wp-pro-chat-input {
        padding: 8px 10px;
    }
    
    .wp-pro-chat-input-field {
        border-radius: 22px;
    }
    
    .wp-pro-chat-input-field input {
        font-size: 15px;
    }
    
    #new-message-indicator {
        bottom: 65px;
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .wp-pro-chat-send-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
}

/* ==================== */
/* MODERN AUTH FORM     */
/* ==================== */
.wpc-auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 99dvh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wpc-auth-card {
    background: white;
    border-radius: 24px;
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: wpcAuthFadeIn 0.5s ease-out;
}

@keyframes wpcAuthFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.wpc-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.wpc-auth-logo {
    font-size: 48px;
    margin-bottom: 12px;
    animation: wpcAuthBounce 2s infinite;
}

@keyframes wpcAuthBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.wpc-auth-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px 0;
}

.wpc-auth-header p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

.wpc-auth-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: wpcAuthSlideIn 0.3s ease;
}

@keyframes wpcAuthSlideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.wpc-auth-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.wpc-auth-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.wpc-auth-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.wpc-auth-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.25s;
}

.wpc-auth-tab:hover {
    color: #374151;
}

.wpc-auth-tab.active {
    background: white;
    color: var(--wpc-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wpc-auth-panel {
    display: none;
}

.wpc-auth-panel.active {
    display: block;
    animation: wpcAuthFadeIn 0.3s ease;
}

.wpc-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wpc-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wpc-auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.wpc-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wpc-auth-input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    pointer-events: none;
    flex-shrink: 0;
}

.wpc-auth-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.2s;
    box-sizing: border-box;
}

.wpc-auth-input-wrap input::placeholder {
    color: #9ca3af;
}

.wpc-auth-input-wrap input:focus {
    outline: none;
    border-color: var(--wpc-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wpc-auth-confirm-icon {
    position: absolute;
    right: 48px;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: all 0.2s;
}

.wpc-auth-eye-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    z-index: 2;
}

.wpc-auth-eye-btn:hover {
    color: #374151;
    background: #f3f4f6;
}

.wpc-auth-confirm-icon.match {
    color: #10b981;
}

.wpc-auth-confirm-icon.no-match {
    color: #ef4444;
}

.wpc-auth-username-status {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    pointer-events: none;
    width: 20px;
    height: 20px;
    justify-content: center;
    transition: all 0.2s;
}

.wpc-auth-username-status.available {
    color: #10b981;
}

.wpc-auth-username-status.taken {
    color: #ef4444;
}

.wpc-auth-username-status.checking {
    color: #9ca3af;
}

.wpc-auth-checking-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--wpc-primary, #6366f1);
    border-radius: 50%;
    animation: wpc-spin 0.6s linear infinite;
}

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

.wpc-auth-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--wpc-primary) 0%, var(--wpc-primary-dark) 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 4px;
}

.wpc-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.wpc-auth-submit:active {
    transform: translateY(0);
}

.wpc-auth-forgot-wrap {
    text-align: center;
    margin-top: 4px;
}

.wpc-auth-forgot-btn {
    background: none;
    border: none;
    color: var(--wpc-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.wpc-auth-forgot-btn:hover {
    background: var(--wpc-primary-bg);
    text-decoration: underline;
}

.wpc-auth-logged-in {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 420px;
    margin: 40px auto;
    animation: wpcAuthFadeIn 0.3s ease;
}

.wpc-auth-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.wpc-auth-avatar-text {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--wpc-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.wpc-auth-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wpc-auth-user-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.wpc-auth-user-email {
    font-size: 13px;
    color: #6b7280;
}

.wpc-auth-logout-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.wpc-auth-logout-link:hover {
    background: #fee2e2;
}

.wpc-auth-logout-form {
    display: flex;
    align-items: center;
}

.wpc-auth-divider {
    text-align: center;
    margin: 20px 0 16px;
    position: relative;
}

.wpc-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.wpc-auth-divider span {
    position: relative;
    background: white;
    padding: 0 12px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.wpc-auth-skip-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wpc-auth-skip-btn:hover {
    border-color: var(--wpc-primary);
    color: var(--wpc-primary);
    background: var(--wpc-primary-bg);
}

.wpc-auth-guest-form {
    display: none;
    margin-top: 16px;
    animation: wpcAuthFadeIn 0.3s ease;
}

.wpc-auth-guest-form.active {
    display: block;
}

.wpc-auth-submit-ghost {
    background: transparent;
    border: 2px solid var(--wpc-primary);
    color: var(--wpc-primary);
    box-shadow: none;
}

.wpc-auth-submit-ghost:hover {
    background: var(--wpc-primary);
    color: white;
    box-shadow: none;
}

.wp-pro-chat-guest-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.wp-pro-chat-guest-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fef3c7;
    color: #92400e;
    font-size: 13px;
    font-weight: 500;
    border-top: 1px solid #fde68a;
}

.wp-pro-chat-guest-notice a {
    color: var(--wpc-primary);
    font-weight: 600;
    text-decoration: none;
}

.wp-pro-chat-guest-notice a:hover {
    text-decoration: underline;
}

.wp-pro-chat-avatar-wrap {
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    line-height: 0;
    border: 2px solid rgba(255,255,255,0.3);
    width: 40px;
    height: 40px;
}

.wp-pro-chat-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.2s;
}

.wp-pro-chat-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 50%;
    color: white;
    pointer-events: none;
}

.wp-pro-chat-avatar-wrap:hover .wp-pro-chat-avatar-overlay {
    opacity: 1;
}

.wp-pro-chat-avatar-wrap.uploading img {
    filter: blur(3px);
}

.wp-pro-chat-avatar-wrap.uploading .wp-pro-chat-avatar-overlay {
    opacity: 1;
    background: rgba(0,0,0,0.6);
}

.wp-pro-chat-avatar-wrap.uploading .wp-pro-chat-avatar-overlay::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: wpcSpin 0.6s linear infinite;
    position: absolute;
}

@keyframes wpcSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .wpc-auth-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .wpc-auth-logo {
        font-size: 40px;
    }

    .wpc-auth-header h2 {
        font-size: 22px;
    }

    .wpc-auth-logged-in {
        flex-wrap: wrap;
        padding: 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wp-pro-chat-container {
        background: var(--wpc-gray-800);
    }
    
    .wp-pro-chat-sidebar {
        background: var(--wpc-gray-900);
        border-color: var(--wpc-gray-700);
    }
    
    .wp-pro-chat-messages {
        background: var(--wpc-gray-800);
    }
    
    .wp-pro-chat-message.received .wp-pro-chat-message-bubble {
        background: var(--wpc-gray-700);
        color: var(--wpc-gray-100);
    }
    
    .wp-pro-chat-item:hover {
        background: var(--wpc-gray-800);
    }
}
