.container-fluid {
    max-width: 100%;
    padding: 0;
}

.chat-container {
    padding: 0;
    min-height: calc(100vh - 80px);
}

.chat-grid {
    display: grid;
    grid-template-columns: 350px 1fr 300px;
    height: calc(100vh - 80px);
}

/* Specialists Sidebar */
.specialists-sidebar {
    background: var(--card-bg);
    border-right: 1px solid rgba(157, 78, 221, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
}

.sidebar-header h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 25px;
    color: var(--text-light);
    font-family: 'Cormorant Garamond', serif;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.filter-tabs {
    display: flex;
    padding: 15px 20px;
    gap: 10px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
}

.filter-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
}

.filter-tab.active, .filter-tab:hover {
    background: var(--gradient-1);
    border-color: var(--secondary-color);
}

.specialists-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.specialist-card {
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(157, 78, 221, 0.2);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.specialist-card:hover, .specialist-card.selected {
    background: rgba(157, 78, 221, 0.2);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.specialist-card.online {
    border-left: 4px solid #4CAF50;
}

.specialist-avatar {
    position: relative;
    min-width: 50px;
}

.specialist-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #666;
    border: 2px solid var(--card-bg);
    border-radius: 50%;
}

.status-dot.online {
    background: #4CAF50;
    box-shadow: 0 0 10px #4CAF50;
}

.specialist-info h4 {
    font-size: 18px;
    color: var(--accent-color);
    margin-bottom: 3px;
}

.specialist-title {
    font-size: 14px;
    color: rgba(224, 212, 247, 0.7);
    margin-bottom: 8px;
}

.specialist-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    margin-bottom: 5px;
}

.rating {
    color: var(--accent-color);
}

.price {
    color: #4CAF50;
}

.specialist-status {
    font-size: 13px;
    color: rgba(224, 212, 247, 0.6);
}

/* Chat Main Area */
.chat-main {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(10, 1, 24, 0.95) 0%, rgba(26, 15, 46, 0.95) 100%);
}

.chat-welcome {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.welcome-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    margin-bottom: 15px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-content p {
    font-size: 20px;
    color: rgba(224, 212, 247, 0.7);
    margin-bottom: 40px;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature {
    text-align: center;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.feature h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.feature p {
    font-size: 16px;
    color: rgba(224, 212, 247, 0.6);
}

/* Chat Interface */
.chat-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-interface.hidden {
    display: none;
}

.chat-header {
    background: var(--card-bg);
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-specialist-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.chat-specialist-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.chat-specialist-info h3 {
    font-size: 20px;
    color: var(--accent-color);
}

.chat-specialist-info p {
    font-size: 14px;
    color: rgba(224, 212, 247, 0.7);
}

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

.chat-action-btn {
    width: 40px;
    height: 40px;
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.chat-action-btn:hover {
    background: var(--gradient-1);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 15px;
    max-width: 70%;
    animation: slideIn 0.3s ease-out;
}

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

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.message-content {
    flex: 1;
}

.message-bubble {
    background: rgba(157, 78, 221, 0.2);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 5px;
}

.message.user .message-bubble {
    background: var(--gradient-1);
    border: none;
}

.message-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-light);
}

.message-time {
    font-size: 12px;
    color: rgba(224, 212, 247, 0.5);
    padding: 0 10px;
}

.message-attachment {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.attachment-icon {
    font-size: 32px;
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    font-size: 16px;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.attachment-size {
    font-size: 14px;
    color: rgba(224, 212, 247, 0.6);
}

.attachment-download {
    padding: 8px 20px;
    background: transparent;
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.attachment-download:hover {
    background: var(--secondary-color);
}

/* Typing Indicator */
.typing-indicator {
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease-out;
}

.typing-indicator.hidden {
    display: none;
}

.typing-dots {
    display: flex;
    gap: 5px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Chat Input */
.chat-input-area {
    border-top: 1px solid rgba(157, 78, 221, 0.3);
    background: var(--card-bg);
}

.chat-input-box {
    padding: 20px 30px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.input-btn {
    width: 40px;
    height: 40px;
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-btn:hover {
    background: var(--gradient-1);
    border-color: var(--accent-color);
}

#messageInput {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 25px;
    padding: 12px 20px;
    color: var(--text-light);
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    resize: none;
    max-height: 150px;
}

#messageInput:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.send-btn {
    padding: 12px 30px;
    background: var(--gradient-1);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(157, 78, 221, 0.5);
}

/* Profile Sidebar */
.profile-sidebar {
    background: var(--card-bg);
    border-left: 1px solid rgba(157, 78, 221, 0.3);
    overflow-y: auto;
}

.profile-sidebar.hidden {
    display: none;
}

.profile-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
}

.close-profile {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
}

.profile-header h3 {
    font-size: 20px;
    color: var(--accent-color);
}

.profile-content {
    padding: 25px 20px;
}

.profile-avatar {
    text-align: center;
    margin-bottom: 25px;
}

.profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    margin-bottom: 15px;
}

.profile-name {
    font-size: 24px;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.profile-role {
    font-size: 16px;
    color: rgba(224, 212, 247, 0.7);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(157, 78, 221, 0.3);
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
}

.profile-stat-label {
    font-size: 12px;
    color: rgba(224, 212, 247, 0.6);
}

.profile-bio {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.profile-bio h4 {
    font-size: 18px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.profile-bio p {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(224, 212, 247, 0.7);
}

.profile-specializations {
    margin: 20px 0;
}

.profile-specializations h4 {
    font-size: 18px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.specialization-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.specialization-tag {
    padding: 8px 15px;
    background: rgba(157, 78, 221, 0.2);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 20px;
    font-size: 14px;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.profile-action-btn {
    padding: 12px 20px;
    background: var(--gradient-1);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Cormorant Garamond', serif;
    transition: all 0.3s;
}

.profile-action-btn:hover {
    transform: scale(1.02);
}

.profile-action-btn.secondary {
    background: transparent;
    border: 2px solid var(--secondary-color);
}

/* Video Call Modal */
.modal-content.video-call {
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    background: #000;
}

.video-container {
    position: relative;
    width: 100%;
    height: calc(90vh - 80px);
    background: #000;
}

#remoteVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#localVideo {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 250px;
    height: 150px;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
    object-fit: cover;
}

.video-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
}

.video-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(157, 78, 221, 0.3);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.video-btn:hover {
    background: var(--gradient-1);
    transform: scale(1.1);
}

.video-btn.danger {
    background: #f44336;
    width: auto;
    padding: 0 30px;
    border-radius: 30px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
    .chat-grid {
        grid-template-columns: 300px 1fr;
    }
    
    .profile-sidebar {
        position: fixed;
        right: 0;
        top: 80px;
        width: 350px;
        height: calc(100vh - 80px);
        z-index: 1500;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 768px) {
    .chat-grid {
        grid-template-columns: 1fr;
    }
    
    .specialists-sidebar {
        position: fixed;
        left: -100%;
        top: 80px;
        width: 100%;
        max-width: 350px;
        height: calc(100vh - 80px);
        z-index: 1500;
        transition: left 0.3s;
    }
    
    .specialists-sidebar.open {
        left: 0;
    }
    
    .message {
        max-width: 85%;
    }
    
    #localVideo {
        width: 120px;
        height: 80px;
        bottom: 10px;
        right: 10px;
    }
}
