/* Chat Section Styles */

.chat-section {
    display: none;
    padding: 40px 20px;
    min-height: 100vh;
    background: var(--dark-gradient);
    position: relative;
}

.chat-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(245, 87, 108, 0.1) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(1deg); }
    66% { transform: translate(20px, -10px) rotate(-1deg); }
}

.chat-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(30px);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.05;
    z-index: -1;
}

.chat-header {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    padding: 35px 30px;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.chat-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -20px) rotate(180deg); }
}

.chat-header h2 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
}

.chat-header p {
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.9;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.development-notice {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    margin: 15px 0;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    }
}

.chat-stats {
    display: flex;
    gap: 15px;
    font-size: 0.95rem;
    color: #ffffff;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.chat-stats span {
    background: var(--glass-bg);
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 700;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chat-stats span:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
    background: rgba(102, 126, 234, 0.1);
}

.chat-messages {
    height: 450px;
    overflow-y: auto;
    padding: 30px;
    background: var(--glass-bg);
    position: relative;
}

.chat-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.chat-welcome {
    text-align: center;
    padding: 80px 40px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
}

.chat-welcome::before {
    content: '💬';
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    opacity: 0.3;
    animation: bounce 2s ease-in-out infinite;
}

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

.chat-welcome h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 800;
}

.chat-welcome p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.chat-message {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    animation: slideInUp 0.4s ease-out;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.chat-message:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(102, 126, 234, 0.3);
}

.chat-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 20px 20px 0 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.message-username {
    font-weight: 800;
    color: #ffffff;
    font-size: 1.1rem;
    text-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    min-width: 0;
}

.message-timestamp {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 15px;
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-size: 1.05rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    clear: both;
    margin-top: 10px;
    font-weight: 500;
}

.chat-input-container {
    display: flex;
    gap: 15px;
    padding: 30px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.chat-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
}

.chat-input-container input {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    padding: 18px 28px;
    color: #ffffff;
    font-size: 1.05rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.chat-input-container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.8;
}

.chat-input-container input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.chat-input-container button {
    background: var(--primary-gradient);
    border: none;
    border-radius: 35px;
    padding: 18px 35px;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-input-container button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
}

.chat-input-container button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.chat-input-container button:hover::before {
    left: 100%;
}

.chat-input-container button:active {
    transform: translateY(-2px);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .chat-section {
        padding: 20px 10px;
    }
    
    .chat-container {
        border-radius: 20px;
    }
    
    .chat-header {
        padding: 25px 20px;
    }
    
    .chat-header h2 {
        font-size: 1.8rem;
    }
    
    .chat-messages {
        height: 350px;
        padding: 20px;
    }
    
    .chat-input-container {
        padding: 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .chat-input-container input {
        padding: 15px 20px;
    }
    
    .chat-input-container button {
        padding: 15px 25px;
        width: 100%;
    }
}

.chat-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.chat-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        padding: 10px;
    }
    
    .chat-wrapper {
        padding: 15px;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .chat-container {
        padding: 5px;
    }
    
    .chat-wrapper {
        padding: 10px;
        margin: 5px 0;
    }
}

/* Loading Animation */
.chat-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hide loading when widget is loaded */
.chat-wrapper widgetbot {
    display: block;
}

.chat-wrapper::before {
    display: none;
}
