/* Developer Chat Pro - Main Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --dcp-primary: #6366f1;
    --dcp-primary-dark: #4f46e5;
    --dcp-male: #3b82f6;
    --dcp-male-light: #dbeafe;
    --dcp-male-bg: #eff6ff;
    --dcp-female: #ec4899;
    --dcp-female-light: #fce7f3;
    --dcp-female-bg: #fdf2f8;
    --dcp-bg: #f1f5f9;
    --dcp-sidebar: #ffffff;
    --dcp-card: #ffffff;
    --dcp-border: #e2e8f0;
    --dcp-text: #1e293b;
    --dcp-text-muted: #64748b;
    --dcp-text-light: #94a3b8;
    --dcp-success: #22c55e;
    --dcp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --dcp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --dcp-radius: 16px;
    --dcp-radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

.dcp-chat-app {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--dcp-text);
}

/* ========== REGISTRATION MODAL ========== */
.dcp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.dcp-modal-content {
    background: var(--dcp-card);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.4s ease;
}

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

.dcp-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.dcp-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.dcp-logo-icon {
    font-size: 36px;
    animation: bounce 2s infinite;
}

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

.dcp-logo h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dcp-modal-subtitle {
    color: var(--dcp-text-muted);
    margin: 0;
    font-size: 15px;
}

.dcp-register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dcp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dcp-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--dcp-text);
}

.dcp-form-group input[type="text"],
.dcp-form-group input[type="number"] {
    padding: 14px 16px;
    border: 2px solid var(--dcp-border);
    border-radius: var(--dcp-radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--dcp-bg);
}

.dcp-form-group input:focus {
    outline: none;
    border-color: var(--dcp-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.dcp-form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
}

/* Gender Selection */
.dcp-gender-select {
    display: flex;
    gap: 12px;
}

.dcp-gender-option {
    flex: 1;
    cursor: pointer;
}

.dcp-gender-option input {
    display: none;
}

.dcp-gender-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    border: 2px solid var(--dcp-border);
    border-radius: var(--dcp-radius-sm);
    transition: all 0.2s ease;
    background: var(--dcp-bg);
}

.dcp-gender-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s ease;
}

.dcp-gender-option.male .dcp-gender-icon {
    background: var(--dcp-male-light);
    color: var(--dcp-male);
}

.dcp-gender-option.female .dcp-gender-icon {
    background: var(--dcp-female-light);
    color: var(--dcp-female);
}

.dcp-gender-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--dcp-text-muted);
}

.dcp-gender-option input:checked + .dcp-gender-box {
    background: white;
}

.dcp-gender-option.male input:checked + .dcp-gender-box {
    border-color: var(--dcp-male);
    box-shadow: 0 0 0 4px var(--dcp-male-light);
}

.dcp-gender-option.female input:checked + .dcp-gender-box {
    border-color: var(--dcp-female);
    box-shadow: 0 0 0 4px var(--dcp-female-light);
}

.dcp-gender-option.male input:checked + .dcp-gender-box .dcp-gender-icon {
    background: var(--dcp-male);
    color: white;
}

.dcp-gender-option.female input:checked + .dcp-gender-box .dcp-gender-icon {
    background: var(--dcp-female);
    color: white;
}

/* Submit Button */
.dcp-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--dcp-radius-sm);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.dcp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.5);
}

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

.dcp-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.dcp-terms {
    text-align: center;
    font-size: 12px;
    color: var(--dcp-text-light);
    margin: 20px 0 0 0;
}

/* ========== CHAT CONTAINER ========== */
.dcp-chat-container {
    display: flex;
    height: 85vh;
    min-height: 550px;
    max-height: 850px;
    background: var(--dcp-bg);
    border-radius: var(--dcp-radius);
    overflow: hidden;
    box-shadow: var(--dcp-shadow-lg);
}

/* ========== SIDEBAR ========== */
.dcp-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--dcp-sidebar);
    border-right: 1px solid var(--dcp-border);
    display: flex;
    flex-direction: column;
}

/* User Profile */
.dcp-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--dcp-border);
    position: relative;
    flex-wrap: wrap;
}

#dcp-logout-btn {
    background: var(--dcp-primary);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: auto;
}

#dcp-logout-btn:hover {
    background: var(--dcp-primary-dark);
    transform: translateY(-1px);
}

.dcp-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    position: relative;
}

.dcp-avatar.male {
    background: linear-gradient(135deg, var(--dcp-male) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.dcp-avatar.female {
    background: linear-gradient(135deg, var(--dcp-female) 0%, #db2777 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

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

.dcp-user-name {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--dcp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dcp-user-meta {
    display: block;
    font-size: 13px;
    color: var(--dcp-text-muted);
}

.dcp-online-dot {
    width: 10px;
    height: 10px;
    background: var(--dcp-success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1); }
}

/* Online Count */
.dcp-online-count {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 13px;
    color: var(--dcp-text-muted);
    border-bottom: 1px solid var(--dcp-border);
}

.dcp-pulse {
    width: 8px;
    height: 8px;
    background: var(--dcp-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Tabs */
.dcp-tabs {
    display: flex;
    padding: 12px;
    gap: 8px;
    border-bottom: 1px solid var(--dcp-border);
}

.dcp-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--dcp-radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--dcp-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dcp-tab:hover {
    background: var(--dcp-bg);
    color: var(--dcp-text);
}

.dcp-tab.active {
    background: var(--dcp-primary);
    color: white;
}

.dcp-badge {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.dcp-tab:not(.active) .dcp-badge {
    background: var(--dcp-bg);
    color: var(--dcp-text-muted);
}

/* Tab Content */
.dcp-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.dcp-tab-content.active {
    display: block;
}

/* Groups List */
.dcp-groups-list,
.dcp-users-list {
    padding: 12px;
}

.dcp-group-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--dcp-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    background: var(--dcp-bg);
}

.dcp-group-item:hover {
    background: var(--dcp-border);
}

.dcp-group-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.dcp-group-item .icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: var(--dcp-shadow);
}

.dcp-group-item .info {
    flex: 1;
    min-width: 0;
}

.dcp-group-item .name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--dcp-text);
    margin-bottom: 2px;
}

.dcp-group-item .count {
    display: block;
    font-size: 12px;
    color: var(--dcp-text-muted);
}

/* Users List */
.dcp-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--dcp-radius-sm);
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.dcp-user-item:hover {
    background: var(--dcp-bg);
}

.dcp-user-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.dcp-user-item .avatar.male {
    background: var(--dcp-male-light);
    color: var(--dcp-male);
}

.dcp-user-item .avatar.female {
    background: var(--dcp-female-light);
    color: var(--dcp-female);
}

.dcp-user-item .details {
    flex: 1;
}

.dcp-user-item .name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--dcp-text);
}

.dcp-user-item .meta {
    display: block;
    font-size: 12px;
    color: var(--dcp-text-muted);
}

.dcp-user-item .status {
    width: 8px;
    height: 8px;
    background: var(--dcp-success);
    border-radius: 50%;
}

/* ========== MAIN CHAT AREA ========== */
.dcp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--dcp-bg);
}

/* Chat Header */
.dcp-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--dcp-card);
    border-bottom: 1px solid var(--dcp-border);
}

.dcp-group-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

#dcp-back-to-groups {
    display: none;
    background: rgba(99, 102, 241, 0.1);
    border: none;
    color: var(--dcp-primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    transition: all 0.2s ease;
    line-height: 1;
}

#dcp-back-to-groups:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateX(-2px);
}

.dcp-group-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dcp-bg);
    border-radius: 14px;
}

.dcp-group-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--dcp-text);
}

.dcp-group-info span {
    font-size: 13px;
    color: var(--dcp-text-muted);
}

.dcp-group-users {
    font-size: 13px;
    color: var(--dcp-text-muted);
    background: var(--dcp-bg);
    padding: 8px 14px;
    border-radius: 20px;
}

/* Messages Area */
.dcp-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dcp-loading {
    text-align: center;
    padding: 40px;
    color: var(--dcp-text-muted);
}

.dcp-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--dcp-text-muted);
}

.dcp-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Message Styles */
.dcp-message {
    display: flex;
    gap: 12px;
    max-width: 70%;
    animation: msgIn 0.3s ease;
}

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

.dcp-message.own {
    flex-direction: row-reverse;
    margin-left: auto;
}

.dcp-message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.dcp-message .avatar.male {
    background: linear-gradient(135deg, var(--dcp-male) 0%, #2563eb 100%);
    color: white;
}

.dcp-message .avatar.female {
    background: linear-gradient(135deg, var(--dcp-female) 0%, #db2777 100%);
    color: white;
}

.dcp-message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dcp-message.own .dcp-message-content {
    align-items: flex-end;
}

.dcp-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.dcp-message.own .dcp-message-header {
    flex-direction: row-reverse;
}

.dcp-message-header .name {
    font-weight: 600;
}

.dcp-message-header .name.male {
    color: var(--dcp-male);
}

.dcp-message-header .name.female {
    color: var(--dcp-female);
}

.dcp-message-header .age {
    color: var(--dcp-text-light);
    font-size: 11px;
}

.dcp-message-header .time {
    color: var(--dcp-text-light);
}

.dcp-message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: var(--dcp-shadow);
}

.dcp-message:not(.own) .dcp-message-bubble {
    background: var(--dcp-card);
    border-top-left-radius: 4px;
    color: var(--dcp-text);
}

.dcp-message:not(.own).male .dcp-message-bubble {
    background: linear-gradient(135deg, var(--dcp-male-bg) 0%, #dbeafe 100%);
    border-left: 3px solid var(--dcp-male);
}

.dcp-message:not(.own).female .dcp-message-bubble {
    background: linear-gradient(135deg, var(--dcp-female-bg) 0%, #fce7f3 100%);
    border-left: 3px solid var(--dcp-female);
}

.dcp-message.own .dcp-message-bubble {
    border-top-right-radius: 4px;
    color: white;
}

.dcp-message.own.male .dcp-message-bubble {
    background: linear-gradient(135deg, var(--dcp-male) 0%, #2563eb 100%);
}

.dcp-message.own.female .dcp-message-bubble {
    background: linear-gradient(135deg, var(--dcp-female) 0%, #db2777 100%);
}

/* Image in message */
.dcp-message-image {
    max-width: 280px;
    border-radius: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dcp-message-image:hover {
    transform: scale(1.02);
}

/* File in message */
.dcp-message-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    margin-top: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.dcp-message-file:hover {
    background: rgba(0,0,0,0.1);
}

.dcp-message.own .dcp-message-file {
    background: rgba(255,255,255,0.2);
}

.dcp-message.own .dcp-message-file:hover {
    background: rgba(255,255,255,0.3);
}

.dcp-message-file .file-name {
    font-size: 13px;
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== INPUT AREA ========== */
.dcp-input-area {
    padding: 16px 24px;
    background: var(--dcp-card);
    border-top: 1px solid var(--dcp-border);
}

.dcp-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--dcp-bg);
    border-radius: 28px;
    padding: 8px 8px 8px 20px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.dcp-input-wrapper:focus-within {
    border-color: var(--dcp-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.dcp-attach-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--dcp-text-muted);
    transition: all 0.2s ease;
}

.dcp-attach-btn:hover {
    background: var(--dcp-border);
    color: var(--dcp-primary);
}

.dcp-message-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--dcp-text);
    outline: none;
    padding: 8px 0;
}

.dcp-message-input::placeholder {
    color: var(--dcp-text-light);
}

.dcp-send-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dcp-primary) 0%, #8b5cf6 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dcp-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.dcp-send-btn:active {
    transform: scale(0.95);
}

/* File Preview */
.dcp-file-preview {
    margin-top: 12px;
    padding: 12px;
    background: var(--dcp-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dcp-file-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.dcp-file-preview .file-info {
    flex: 1;
}

.dcp-file-preview .file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dcp-text);
    margin-bottom: 4px;
}

.dcp-file-preview .file-size {
    font-size: 12px;
    color: var(--dcp-text-muted);
}

.dcp-file-preview .remove-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--dcp-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dcp-file-preview .remove-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Scrollbar */
.dcp-messages::-webkit-scrollbar,
.dcp-tab-content::-webkit-scrollbar {
    width: 6px;
}

.dcp-messages::-webkit-scrollbar-track,
.dcp-tab-content::-webkit-scrollbar-track {
    background: transparent;
}

.dcp-messages::-webkit-scrollbar-thumb,
.dcp-tab-content::-webkit-scrollbar-thumb {
    background: var(--dcp-border);
    border-radius: 3px;
}

.dcp-messages::-webkit-scrollbar-thumb:hover,
.dcp-tab-content::-webkit-scrollbar-thumb:hover {
    background: var(--dcp-text-light);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .dcp-chat-container {
        flex-direction: column;
        height: 95vh;
        max-height: none;
    }
    
    .dcp-sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 50vh;
    }
    
    .dcp-message {
        max-width: 85%;
    }
}

@media (max-width: 500px) {
    .dcp-modal-content {
        padding: 24px;
    }
    
    .dcp-form-row {
        grid-template-columns: 1fr;
    }
    
    .dcp-gender-select {
        justify-content: center;
    }
}

/* ========== MOBILE-FIRST ENHANCEMENTS ========== */

/* Full screen mobile chat */
@media (max-width: 768px) {
    .dcp-chat-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        max-width: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        z-index: 999999 !important;
    }
    
    .dcp-chat-main {
        height: 100vh !important;
        height: -webkit-fill-available !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .dcp-chat-header {
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 100 !important;
    }
    
    .dcp-messages-container,
    .dcp-messages {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: env(safe-area-inset-bottom, 20px) !important;
        max-height: calc(100vh - 140px) !important;
        min-height: 0 !important;
    }
    
    .dcp-input-area {
        flex-shrink: 0 !important;
        position: sticky !important;
        bottom: 0 !important;
        padding-bottom: env(safe-area-inset-bottom, 10px) !important;
        background: var(--dcp-card) !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    }
    
    .dcp-input-wrapper {
        padding: 12px 15px !important;
    }
    
    .dcp-message-input {
        min-height: 44px !important;
        max-height: 120px !important;
        font-size: 16px !important;
        resize: none !important;
        border-radius: 24px !important;
        padding: 12px 50px 12px 18px !important;
    }
    
    .dcp-send-button {
        position: absolute !important;
        right: 20px !important;
        bottom: 18px !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Hide sidebar on mobile */
    .dcp-sidebar {
        position: fixed !important;
        left: -100% !important;
        top: 0 !important;
        height: 100vh !important;
        z-index: 1000 !important;
        transition: left 0.3s ease !important;
    }
    
    .dcp-sidebar.active {
        left: 0 !important;
    }
    
    /* Mobile overlay */
    .dcp-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .dcp-mobile-overlay.active {
        display: block;
    }
    
    /* Mobile menu button */
    .dcp-mobile-menu-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        color: inherit;
        font-size: 24px;
        cursor: pointer;
    }
}

/* Desktop view */
@media (min-width: 769px) {
    .dcp-mobile-menu-btn {
        display: none !important;
    }
    
    .dcp-mobile-overlay {
        display: none !important;
    }
}

/* ========== DIRECT MESSAGES UI ========== */

.dcp-dm-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dcp-bg);
    z-index: 999999;
    display: none;
    flex-direction: column;
}

.dcp-dm-container.active {
    display: flex;
}

.dcp-dm-header {
    background: var(--dcp-primary);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--dcp-shadow);
}

.dcp-dm-back {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dcp-dm-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dcp-dm-user-info {
    flex: 1;
}

.dcp-dm-user-name {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.dcp-dm-user-status {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.dcp-dm-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    -webkit-overflow-scrolling: touch;
}

.dcp-dm-message {
    display: flex;
    margin-bottom: 12px;
    animation: slideIn 0.3s ease;
}

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

.dcp-dm-message.own {
    flex-direction: row-reverse;
}

.dcp-dm-message-bubble {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dcp-dm-message.own .dcp-dm-message-bubble {
    background: var(--dcp-primary);
    color: white;
}

.dcp-dm-message-text {
    margin: 0;
    word-wrap: break-word;
    line-height: 1.4;
}

.dcp-dm-message-time {
    font-size: 11px;
    color: var(--dcp-text-light);
    margin-top: 4px;
}

.dcp-dm-message.own .dcp-dm-message-time {
    color: rgba(255, 255, 255, 0.8);
}

.dcp-dm-input-area {
    padding: 10px 15px;
    padding-bottom: env(safe-area-inset-bottom, 10px);
    background: white;
    border-top: 1px solid var(--dcp-border);
}

.dcp-dm-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.dcp-dm-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 18px;
    border: 1px solid var(--dcp-border);
    border-radius: 24px;
    font-size: 16px;
    font-family: inherit;
    resize: none;
}

.dcp-dm-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--dcp-primary);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dcp-dm-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* DM Conversations List */
.dcp-conversations-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.dcp-conversation-item {
    padding: 15px;
    border-bottom: 1px solid var(--dcp-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.dcp-conversation-item:hover {
    background: var(--dcp-bg);
}

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

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

.dcp-conversation-name {
    font-weight: 600;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dcp-conversation-last-message {
    font-size: 14px;
    color: var(--dcp-text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dcp-conversation-meta {
    text-align: right;
    flex-shrink: 0;
}

.dcp-conversation-time {
    font-size: 12px;
    color: var(--dcp-text-light);
}

.dcp-conversation-unread {
    background: var(--dcp-primary);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

/* ========== NOTIFICATIONS ========== */

.dcp-notification-icon {
    position: relative;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dcp-notification-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dcp-notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.dcp-notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-top: 10px;
    display: none;
    z-index: 1000;
}

.dcp-notifications-dropdown.active {
    display: block;
}

.dcp-notifications-header {
    padding: 15px;
    background: var(--dcp-bg);
    font-weight: 600;
    border-bottom: 1px solid var(--dcp-border);
}

.dcp-notifications-list {
    max-height: 350px;
    overflow-y: auto;
}

.dcp-notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--dcp-border);
    cursor: pointer;
    transition: background 0.2s;
}

.dcp-notification-item:hover {
    background: var(--dcp-bg);
}

.dcp-notification-item:last-child {
    border-bottom: none;
}

.dcp-notification-message {
    font-size: 14px;
    margin: 0 0 4px 0;
}

.dcp-notification-time {
    font-size: 12px;
    color: var(--dcp-text-light);
}

.dcp-notifications-empty {
    padding: 30px;
    text-align: center;
    color: var(--dcp-text-muted);
}

/* ========== LOCATION MODAL ========== */

.dcp-location-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}

.dcp-location-modal.active {
    display: flex;
}

.dcp-location-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dcp-location-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.dcp-location-modal-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.dcp-location-modal-header p {
    margin: 0;
    color: var(--dcp-text-muted);
    font-size: 14px;
}

.dcp-location-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dcp-location-input {
    padding: 12px;
    border: 1px solid var(--dcp-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.dcp-location-input:focus {
    outline: none;
    border-color: var(--dcp-primary);
}

.dcp-location-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.dcp-location-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dcp-location-btn-primary {
    background: var(--dcp-primary);
    color: white;
}

.dcp-location-btn-secondary {
    background: var(--dcp-bg);
    color: var(--dcp-text);
}

/* ========== USER DISCOVERY (LOCATION FILTER) ========== */

.dcp-location-filter {
    padding: 15px;
    background: white;
    border-radius: var(--dcp-radius);
    margin-bottom: 20px;
}

.dcp-location-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.dcp-location-filter-title {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.dcp-location-filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dcp-location-filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--dcp-border);
    background: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.dcp-location-filter-btn.active {
    background: var(--dcp-primary);
    color: white;
    border-color: var(--dcp-primary);
}

.dcp-location-filter-btn:hover:not(.active) {
    background: var(--dcp-bg);
}

.dcp-nearby-users-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.dcp-nearby-user-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--dcp-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dcp-nearby-user-item:last-child {
    border-bottom: none;
}

.dcp-nearby-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.dcp-nearby-user-info {
    flex: 1;
}

.dcp-nearby-user-name {
    font-weight: 600;
    margin: 0 0 4px 0;
}

.dcp-nearby-user-location {
    font-size: 13px;
    color: var(--dcp-text-muted);
    margin: 0;
}

.dcp-nearby-user-dm-btn {
    padding: 8px 16px;
    background: var(--dcp-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Mention autocomplete */
.dcp-mention-suggestions {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.dcp-mention-suggestions.active {
    display: block;
}

.dcp-mention-suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--dcp-border);
}

.dcp-mention-suggestion-item:hover {
    background: var(--dcp-bg);
}

.dcp-mention-suggestion-item:last-child {
    border-bottom: none;
}

/* ========== @MENTION AUTOCOMPLETE ========== */
.dcp-mention-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--dcp-border);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.dcp-mention-dropdown.active {
    display: block;
}

.dcp-mention-dropdown-header {
    padding: 12px 15px;
    background: var(--dcp-bg);
    font-size: 13px;
    font-weight: 600;
    color: var(--dcp-text-muted);
    border-bottom: 1px solid var(--dcp-border);
}

.dcp-mention-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--dcp-border);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.dcp-mention-item:hover,
.dcp-mention-item.selected {
    background: var(--dcp-bg);
}

.dcp-mention-item:last-child {
    border-bottom: none;
}

.dcp-mention-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: var(--dcp-primary);
    color: white;
}

.dcp-mention-avatar.male {
    background: var(--dcp-male);
}

.dcp-mention-avatar.female {
    background: var(--dcp-female);
}

.dcp-mention-info {
    flex: 1;
}

.dcp-mention-name {
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

.dcp-mention-meta {
    font-size: 12px;
    color: var(--dcp-text-muted);
    margin: 0;
}

/* ========== USER CLICK TO DM ========== */
.dcp-user-item {
    cursor: pointer;
    position: relative;
}

.dcp-user-actions {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.dcp-user-item:hover .dcp-user-actions {
    opacity: 1;
}

.dcp-user-dm-btn,
.dcp-user-mention-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--dcp-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.dcp-user-dm-btn:hover {
    background: var(--dcp-primary-dark);
    transform: scale(1.1);
}

.dcp-user-mention-btn {
    background: var(--dcp-success);
}

.dcp-user-mention-btn:hover {
    background: #16a34a;
    transform: scale(1.1);
}

/* Mobile adjustments for user actions */
@media (max-width: 768px) {
    .dcp-user-actions {
        opacity: 1;
    }
    
    .dcp-user-dm-btn,
    .dcp-user-mention-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ========== LOCATION FILTERS IN SIDEBAR ========== */
.dcp-location-section {
    padding: 20px 15px;
    border-bottom: 1px solid var(--dcp-border);
    background: white;
}

.dcp-location-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.dcp-location-title {
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    color: var(--dcp-text);
}

.dcp-location-badge {
    background: var(--dcp-primary);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.dcp-location-info {
    background: var(--dcp-bg);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.dcp-location-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--dcp-text-muted);
    margin-bottom: 4px;
}

.dcp-location-row:last-child {
    margin-bottom: 0;
}

.dcp-location-icon {
    font-size: 16px;
}

.dcp-location-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dcp-location-filter-btn {
    padding: 10px 15px;
    border: 1px solid var(--dcp-border);
    background: white;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}

.dcp-location-filter-btn:hover {
    background: var(--dcp-bg);
    border-color: var(--dcp-primary);
}

.dcp-location-filter-btn.active {
    background: var(--dcp-primary);
    color: white;
    border-color: var(--dcp-primary);
}

.dcp-location-filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.dcp-location-filter-btn:not(.active) .dcp-location-filter-count {
    background: var(--dcp-bg);
    color: var(--dcp-text-muted);
}

.dcp-location-change-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--dcp-border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--dcp-text-muted);
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.dcp-location-change-btn:hover {
    background: var(--dcp-bg);
    color: var(--dcp-text);
}

/* Enhanced notification badge for mentions */
.dcp-user-item.has-mention {
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.05));
}

.dcp-user-item.has-mention::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--dcp-primary);
}


/* DM Messages in Main Area */
.dcp-dm-message {
    display: flex;
    gap: 12px;
    max-width: 70%;
    animation: msgIn 0.3s ease;
    margin-bottom: 12px;
}

.dcp-dm-message.own {
    flex-direction: row-reverse;
    margin-left: auto;
}

.dcp-dm-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: var(--dcp-shadow);
}

.dcp-dm-message:not(.own) .dcp-dm-bubble {
    background: var(--dcp-bg);
    border-top-left-radius: 4px;
    color: var(--dcp-text);
}

.dcp-dm-message.own .dcp-dm-bubble {
    background: linear-gradient(135deg, var(--dcp-primary) 0%, var(--dcp-primary-dark) 100%);
    border-top-right-radius: 4px;
    color: white;
}

.dcp-dm-text {
    margin: 0;
}

.dcp-dm-time {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
}

.dcp-dm-message.own .dcp-dm-time {
    text-align: right;
}

