/* Chat Page Specific Styles */
.chat-item.active {
    background-color: #ececec;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f4f0ff;
    color: #8B5CF6;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.upgrade-btn .close-btn {
    font-size: 20px;
    color: #8B5CF6;
    margin-left: 4px;
}

.icon-btn {
    background: none;
    border: none;
    color: #8e8e8e;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: #f5f5f5;
    color: #202123;
}

.chat-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 40px 20px 120px;
}

.message {
    margin-bottom: 32px;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}

.user-message {
    display: flex;
    justify-content: flex-end;
}

.user-message .message-content {
    background-color: #f7f7f7;
    padding: 16px 20px;
    border-radius: 18px;
    max-width: 70%;
    font-size: 15px;
    line-height: 1.6;
}

.assistant-message .message-content {
    background-color: transparent;
    padding: 0;
}

.message-text {
    font-size: 15px;
    line-height: 1.7;
    color: #202123;
}

.message-text p {
    margin-bottom: 16px;
}

.message-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #202123;
}

.message-text strong {
    font-weight: 600;
}

.code-block {
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
}

.code-header span {
    color: #e5e5e5;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.copy-btn {
    background: none;
    border: none;
    color: #e5e5e5;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: #333;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
}

.code-block code {
    color: #e5e5e5;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
}

.input-container {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, #ffffff 80%, rgba(255, 255, 255, 0) 100%);
    display: flex;
    justify-content: center;
    z-index: 100;
}

.input-wrapper {
    width: 100%;
    max-width: 768px;
}

@media (max-width: 768px) {
    .user-message .message-content {
        max-width: 85%;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .upgrade-btn span:first-of-type {
        display: none;
    }
    
    .upgrade-btn .close-btn {
        margin-left: 0;
    }
    
    .input-container {
        left: 0;
        padding: 16px;
    }
    
    .chat-messages {
        padding: 20px 16px 120px;
    }
}

@media (max-width: 480px) {
    .message-text {
        font-size: 14px;
    }
    
    .code-block code {
        font-size: 13px;
    }
    
    .user-message .message-content {
        max-width: 90%;
        padding: 12px 16px;
    }
}
